Skip to content

Commit

Permalink
Raise minimum rustc to 1.60
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jan 7, 2023
1 parent 1f36272 commit fe16a5d
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
10 changes: 2 additions & 8 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion flags/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gen/build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion gen/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit fe16a5d

Please sign in to comment.