Skip to content

Commit b2f1a1d

Browse files
committed
Rollup merge of #23004 - alexcrichton:libc-stable, r=brson
This same source is being built in the Cargo ecosystem and hence needs to build on stable Rust as well. This commit places the `no_std` attribute along with the `no_std` feature behind a `cfg_attr` flag so they are not processed when compiled on crates.io
2 parents cc1a240 + 9893b44 commit b2f1a1d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/liblibc/lib.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@
1010

1111
#![crate_name = "libc"]
1212
#![crate_type = "rlib"]
13-
#![cfg_attr(not(feature = "cargo-build"),
14-
unstable(feature = "libc"))]
15-
#![cfg_attr(not(feature = "cargo-build"), feature(staged_api))]
13+
#![cfg_attr(not(feature = "cargo-build"), unstable(feature = "libc"))]
14+
#![cfg_attr(not(feature = "cargo-build"), feature(staged_api, core, no_std))]
1615
#![cfg_attr(not(feature = "cargo-build"), staged_api)]
17-
#![cfg_attr(not(feature = "cargo-build"), feature(core))]
18-
#![feature(no_std)]
19-
#![no_std]
16+
#![cfg_attr(not(feature = "cargo-build"), no_std)]
2017
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
2118
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
2219
html_root_url = "http://doc.rust-lang.org/nightly/",

0 commit comments

Comments
 (0)