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