File tree 3 files changed +11
-5
lines changed
3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ fn main() {
7
7
rustc_minor_version ( ) . expect ( "Failed to get rustc version" ) ;
8
8
let rustc_dep_of_std = env:: var ( "CARGO_FEATURE_RUSTC_DEP_OF_STD" ) . is_ok ( ) ;
9
9
let align_cargo_feature = env:: var ( "CARGO_FEATURE_ALIGN" ) . is_ok ( ) ;
10
- #[ allow( unused) ]
11
10
let libc_ci = env:: var ( "LIBC_CI" ) . is_ok ( ) ;
12
11
13
12
if env:: var ( "CARGO_FEATURE_USE_STD" ) . is_ok ( ) {
@@ -28,6 +27,11 @@ fn main() {
28
27
Some ( _) | None => println ! ( "cargo:rustc-cfg=freebsd11" ) ,
29
28
}
30
29
30
+ // On CI: deny all warnings
31
+ if libc_ci {
32
+ println ! ( "cargo:rustc-cfg=libc_deny_warnings" ) ;
33
+ }
34
+
31
35
// Rust >= 1.15 supports private module use:
32
36
if rustc_minor_ver >= 15 || rustc_dep_of_std {
33
37
println ! ( "cargo:rustc-cfg=libc_priv_mod_use" ) ;
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ jobs:
136
136
- template : azure-install-rust.yml
137
137
- script : sh ci/style.sh
138
138
displayName : Check style
139
- - script : sh ci/dox.sh
139
+ - script : LIBC_CI=1 sh ci/dox.sh
140
140
displayName : Generate documentation
141
141
- template : azure-configs/static-websites.yml@rustinfra
142
142
parameters :
@@ -169,7 +169,7 @@ jobs:
169
169
vmImage : ubuntu-16.04
170
170
steps :
171
171
- template : azure-install-rust.yml
172
- - script : sh ./ci/build.sh
172
+ - script : LIBC_CI=1 sh ./ci/build.sh
173
173
displayName : Execute build.sh
174
174
strategy :
175
175
matrix :
@@ -198,7 +198,7 @@ jobs:
198
198
vmImage : macos-10.13
199
199
steps :
200
200
- template : azure-install-rust.yml
201
- - script : sh ./ci/build.sh
201
+ - script : LIBC_CI=1 sh ./ci/build.sh
202
202
displayName : Execute build.sh
203
203
strategy :
204
204
matrix :
Original file line number Diff line number Diff line change 14
14
//! [pd]: https://rust-lang.github.io/libc/#platform-specific-documentation
15
15
#![ crate_name = "libc" ]
16
16
#![ crate_type = "rlib" ]
17
- #![ cfg_attr( not ( feature = "rustc-dep-of-std" ) , deny( warnings) ) ]
17
+ #![ cfg_attr( libc_deny_warnings , deny( warnings) ) ]
18
18
#![ allow( bad_style, overflowing_literals, improper_ctypes, unknown_lints) ]
19
+ // FIXME: this is due to a rustc bug
20
+ #![ allow( redundant_semicolon) ]
19
21
// Attributes needed when building as part of the standard library
20
22
#![ cfg_attr(
21
23
feature = "rustc-dep-of-std" ,
You can’t perform that action at this time.
0 commit comments