@@ -33,35 +33,10 @@ mod macros;
33
33
cfg_if ! {
34
34
if #[ cfg( feature = "rustc-dep-of-std" ) ] {
35
35
extern crate rustc_std_workspace_core as core;
36
- #[ allow( unused_imports) ]
37
- use core:: iter;
38
- #[ allow( unused_imports) ]
39
- use core:: ops;
40
- #[ allow( unused_imports) ]
41
- use core:: option;
42
36
}
43
37
}
44
38
45
- #[ doc( hidden) ]
46
- #[ allow( unused_imports) ]
47
- use core:: clone:: Clone ;
48
- #[ allow( unused_imports) ]
49
- use core:: ffi;
50
39
pub use core:: ffi:: c_void;
51
- #[ allow( unused_imports) ]
52
- use core:: fmt;
53
- #[ allow( unused_imports) ]
54
- use core:: hash;
55
- #[ doc( hidden) ]
56
- #[ allow( unused_imports) ]
57
- use core:: marker:: { Copy , Send , Sync } ;
58
- #[ allow( unused_imports) ]
59
- use core:: mem;
60
- #[ allow( unused_imports) ]
61
- use core:: num;
62
- #[ doc( hidden) ]
63
- #[ allow( unused_imports) ]
64
- use core:: option:: Option ;
65
40
66
41
cfg_if ! {
67
42
if #[ cfg( windows) ] {
@@ -70,78 +45,104 @@ cfg_if! {
70
45
71
46
mod windows;
72
47
pub use crate :: windows:: * ;
48
+
49
+ prelude!( ) ;
73
50
} else if #[ cfg( target_os = "fuchsia" ) ] {
74
51
mod fixed_width_ints;
75
52
pub use crate :: fixed_width_ints:: * ;
76
53
77
54
mod fuchsia;
78
55
pub use crate :: fuchsia:: * ;
56
+
57
+ prelude!( ) ;
79
58
} else if #[ cfg( target_os = "switch" ) ] {
80
59
mod fixed_width_ints;
81
60
pub use fixed_width_ints:: * ;
82
61
83
62
mod switch;
84
63
pub use switch:: * ;
64
+
65
+ prelude!( ) ;
85
66
} else if #[ cfg( target_os = "psp" ) ] {
86
67
mod fixed_width_ints;
87
68
pub use crate :: fixed_width_ints:: * ;
88
69
89
70
mod psp;
90
71
pub use crate :: psp:: * ;
72
+
73
+ prelude!( ) ;
91
74
} else if #[ cfg( target_os = "vxworks" ) ] {
92
75
mod fixed_width_ints;
93
76
pub use crate :: fixed_width_ints:: * ;
94
77
95
78
mod vxworks;
96
79
pub use crate :: vxworks:: * ;
80
+
81
+ prelude!( ) ;
97
82
} else if #[ cfg( target_os = "solid_asp3" ) ] {
98
83
mod fixed_width_ints;
99
84
pub use crate :: fixed_width_ints:: * ;
100
85
101
86
mod solid;
102
87
pub use crate :: solid:: * ;
88
+
89
+ prelude!( ) ;
103
90
} else if #[ cfg( unix) ] {
104
91
mod fixed_width_ints;
105
92
pub use crate :: fixed_width_ints:: * ;
106
93
107
94
mod unix;
108
95
pub use crate :: unix:: * ;
96
+
97
+ prelude!( ) ;
109
98
} else if #[ cfg( target_os = "hermit" ) ] {
110
99
mod fixed_width_ints;
111
100
pub use crate :: fixed_width_ints:: * ;
112
101
113
102
mod hermit;
114
103
pub use crate :: hermit:: * ;
104
+
105
+ prelude!( ) ;
115
106
} else if #[ cfg( target_os = "teeos" ) ] {
116
107
mod fixed_width_ints;
117
108
pub use fixed_width_ints:: * ;
118
109
119
110
mod teeos;
120
111
pub use teeos:: * ;
112
+
113
+ prelude!( ) ;
121
114
} else if #[ cfg( target_os = "trusty" ) ] {
122
115
mod fixed_width_ints;
123
116
pub use crate :: fixed_width_ints:: * ;
124
117
125
118
mod trusty;
126
119
pub use crate :: trusty:: * ;
120
+
121
+ prelude!( ) ;
127
122
} else if #[ cfg( all( target_env = "sgx" , target_vendor = "fortanix" ) ) ] {
128
123
mod fixed_width_ints;
129
124
pub use crate :: fixed_width_ints:: * ;
130
125
131
126
mod sgx;
132
127
pub use crate :: sgx:: * ;
128
+
129
+ prelude!( ) ;
133
130
} else if #[ cfg( any( target_env = "wasi" , target_os = "wasi" ) ) ] {
134
131
mod fixed_width_ints;
135
132
pub use crate :: fixed_width_ints:: * ;
136
133
137
134
mod wasi;
138
135
pub use crate :: wasi:: * ;
136
+
137
+ prelude!( ) ;
139
138
} else if #[ cfg( target_os = "xous" ) ] {
140
139
mod fixed_width_ints;
141
140
pub use crate :: fixed_width_ints:: * ;
142
141
143
142
mod xous;
144
143
pub use crate :: xous:: * ;
144
+
145
+ prelude!( ) ;
145
146
} else {
146
147
// non-supported targets: empty...
147
148
}
0 commit comments