Skip to content

Commit 6325b92

Browse files
authored
Merge pull request rust-lang#332 from tgross35/msrv-test
Set the MSRV to 1.63
2 parents 6278178 + cd33925 commit 6325b92

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.github/workflows/main.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,17 @@ jobs:
3535
- run: cargo generate-lockfile
3636
- run: ./ci/run-docker.sh ${{ matrix.target }}
3737

38-
stable:
39-
name: Build succeeds on stable
38+
msrv:
39+
name: Check MSRV
4040
runs-on: ubuntu-latest
4141
steps:
4242
- uses: actions/checkout@master
43+
- run: |
44+
msrv="$(perl -ne 'print if s/rust-version\s*=\s*"(.*)"/\1/g' Cargo.toml)"
45+
echo "MSRV: $msrv"
46+
echo "MSRV=$msrv" >> "$GITHUB_ENV"
4347
- name: Install Rust
44-
run: rustup update stable && rustup default stable
48+
run: rustup update "$MSRV" && rustup default "$MSRV"
4549
- run: cargo build -p libm
4650

4751

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ repository = "https://github.com/rust-lang/libm"
1111
version = "0.2.9"
1212
edition = "2021"
1313
exclude = ["/ci/", "/.github/workflows/"]
14+
rust-version = "1.63"
1415

1516
[features]
1617
default = []

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ To run all benchmarks:
3434

3535
Please check [CONTRIBUTING.md](CONTRIBUTING.md)
3636

37+
## Minimum Rust version policy
38+
39+
This crate supports rustc 1.63 and newer.
40+
3741
## License
3842

3943
Usage is licensed under the MIT license ([LICENSE-MIT](LICENSE-MIT) or

build.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ use std::env;
22

33
fn main() {
44
println!("cargo:rerun-if-changed=build.rs");
5-
println!("cargo::rustc-check-cfg=cfg(assert_no_panic)");
6-
println!("cargo::rustc-check-cfg=cfg(feature, values(\"unstable\"))");
5+
println!("cargo:rustc-check-cfg=cfg(assert_no_panic)");
6+
println!("cargo:rustc-check-cfg=cfg(feature, values(\"unstable\"))");
77

8-
println!("cargo::rustc-check-cfg=cfg(feature, values(\"checked\"))");
8+
println!("cargo:rustc-check-cfg=cfg(feature, values(\"checked\"))");
99

1010
#[allow(unexpected_cfgs)]
1111
if !cfg!(feature = "checked") {

0 commit comments

Comments
 (0)