mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-22 22:59:52 +00:00
Raise minimum rustc to 1.60
This commit is contained in:
parent
1f3627267a
commit
fe16a5dea3
@ -12,7 +12,7 @@ keywords = ["ffi", "c++"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
links = "cxxbridge1"
|
||||
repository = "https://github.com/dtolnay/cxx"
|
||||
rust-version = "1.48"
|
||||
rust-version = "1.60"
|
||||
|
||||
[features]
|
||||
default = ["std", "cxxbridge-flags/default"] # c++11
|
||||
|
@ -24,7 +24,7 @@ cxx = "1.0"
|
||||
cxx-build = "1.0"
|
||||
```
|
||||
|
||||
*Compiler support: requires rustc 1.48+ and c++11 or newer*<br>
|
||||
*Compiler support: requires rustc 1.60+ and c++11 or newer*<br>
|
||||
*[Release notes](https://github.com/dtolnay/cxx/releases)*
|
||||
|
||||
<br>
|
||||
|
10
build.rs
10
build.rs
@ -21,19 +21,13 @@ fn main() {
|
||||
}
|
||||
|
||||
if let Some(rustc) = rustc_version() {
|
||||
if rustc.minor < 48 {
|
||||
println!("cargo:warning=The cxx crate requires a rustc version 1.48.0 or newer.");
|
||||
if rustc.minor < 60 {
|
||||
println!("cargo:warning=The cxx crate requires a rustc version 1.60.0 or newer.");
|
||||
println!(
|
||||
"cargo:warning=You appear to be building with: {}",
|
||||
rustc.version,
|
||||
);
|
||||
}
|
||||
|
||||
if rustc.minor < 52 {
|
||||
// #![deny(unsafe_op_in_unsafe_fn)].
|
||||
// https://github.com/rust-lang/rust/issues/71668
|
||||
println!("cargo:rustc-cfg=no_unsafe_op_in_unsafe_fn_lint");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ description = "Compiler configuration of the `cxx` crate (implementation detail)
|
||||
edition = "2018"
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/dtolnay/cxx"
|
||||
rust-version = "1.48"
|
||||
rust-version = "1.60"
|
||||
|
||||
[features]
|
||||
default = [] # c++11
|
||||
|
@ -10,7 +10,7 @@ homepage = "https://cxx.rs"
|
||||
keywords = ["ffi", "build-dependencies"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/dtolnay/cxx"
|
||||
rust-version = "1.48"
|
||||
rust-version = "1.60"
|
||||
|
||||
[features]
|
||||
parallel = ["cc/parallel"]
|
||||
|
@ -9,7 +9,7 @@ exclude = ["build.rs"]
|
||||
keywords = ["ffi"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/dtolnay/cxx"
|
||||
rust-version = "1.48"
|
||||
rust-version = "1.60"
|
||||
|
||||
[dependencies]
|
||||
codespan-reporting = "0.11"
|
||||
|
@ -10,7 +10,7 @@ homepage = "https://cxx.rs"
|
||||
keywords = ["ffi"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/dtolnay/cxx"
|
||||
rust-version = "1.48"
|
||||
rust-version = "1.60"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
11
src/lib.rs
11
src/lib.rs
@ -18,7 +18,7 @@
|
||||
//!
|
||||
//! <br>
|
||||
//!
|
||||
//! *Compiler support: requires rustc 1.48+ and c++11 or newer*<br>
|
||||
//! *Compiler support: requires rustc 1.60+ and c++11 or newer*<br>
|
||||
//! *[Release notes](https://github.com/dtolnay/cxx/releases)*
|
||||
//!
|
||||
//! <br>
|
||||
@ -365,9 +365,12 @@
|
||||
|
||||
#![no_std]
|
||||
#![doc(html_root_url = "https://docs.rs/cxx/1.0.86")]
|
||||
#![deny(improper_ctypes, improper_ctypes_definitions, missing_docs)]
|
||||
#![cfg_attr(not(no_unsafe_op_in_unsafe_fn_lint), deny(unsafe_op_in_unsafe_fn))]
|
||||
#![cfg_attr(no_unsafe_op_in_unsafe_fn_lint, allow(unused_unsafe))]
|
||||
#![deny(
|
||||
improper_ctypes,
|
||||
improper_ctypes_definitions,
|
||||
missing_docs,
|
||||
unsafe_op_in_unsafe_fn
|
||||
)]
|
||||
#![cfg_attr(doc_cfg, feature(doc_cfg))]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(
|
||||
|
Loading…
Reference in New Issue
Block a user