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
This commit is contained in:
Manish Goregaokar 2015-03-04 15:46:51 +05:30
commit bedfca0fb3

View File

@ -10,13 +10,10 @@
#![crate_name = "libc"] #![crate_name = "libc"]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![cfg_attr(not(feature = "cargo-build"), #![cfg_attr(not(feature = "cargo-build"), unstable(feature = "libc"))]
unstable(feature = "libc"))] #![cfg_attr(not(feature = "cargo-build"), feature(staged_api, core, no_std))]
#![cfg_attr(not(feature = "cargo-build"), feature(staged_api))]
#![cfg_attr(not(feature = "cargo-build"), staged_api)] #![cfg_attr(not(feature = "cargo-build"), staged_api)]
#![cfg_attr(not(feature = "cargo-build"), feature(core))] #![cfg_attr(not(feature = "cargo-build"), no_std)]
#![feature(no_std)]
#![no_std]
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/nightly/", html_root_url = "http://doc.rust-lang.org/nightly/",