forked from rust-lang/libc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#340 - kamalmarhubi:allow-raw-pointer-derive-w…
…arning, r=posborne Fix raw_pointer_derive warning This commit adds a small build script to detect if we need to `#[allow(raw_pointer_derive)]` and makes the attribute conditional. Refs rust-lang#337
- Loading branch information
Showing
3 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
extern crate rustc_version; | ||
extern crate semver; | ||
|
||
use semver::Version; | ||
|
||
fn main() { | ||
if rustc_version::version() >= Version::parse("1.6.0").unwrap() { | ||
println!("cargo:rustc-cfg=raw_pointer_derive_allowed"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters