Skip to content

Commit 1ca0a66

Browse files
committed
Reset MSRV to 1.65 by not running the generic tests on older rustc version
The code compiles fine, but using it require more recent rustc version
1 parent d5106ae commit 1ca0a66

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-20.04
1212
strategy:
1313
matrix:
14-
rust-version: ["1.78", stable, beta, nightly]
14+
rust-version: ["1.65", stable, beta, nightly]
1515
steps:
1616
- uses: actions/checkout@v3
1717
with:

Cargo.toml

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "soa_derive"
33
version = "0.13.0"
44
edition = "2018"
5-
rust-version = "1.78"
5+
rust-version = "1.65"
66

77
authors = ["Guillaume Fraux <[email protected]>"]
88
license = "MIT/Apache-2.0"
@@ -28,6 +28,9 @@ bencher = "0.1"
2828
serde = { version = "1", features = ["derive"] }
2929
serde_json = "1"
3030

31+
[build-dependencies]
32+
rustc_version = "0.4"
33+
3134
[[bench]]
3235
name = "soa"
33-
harness = false
36+
harness = false

build.rs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
use rustc_version::Version;
2+
3+
fn main() {
4+
if rustc_version::version().unwrap() >= Version::parse("1.78.0").unwrap() {
5+
println!("cargo:rustc-cfg=rustc_is_at_least_1_78");
6+
}
7+
}

soa-derive-internal/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "soa_derive_internal"
33
version = "0.13.4"
44
edition = "2018"
5-
rust-version = "1.63"
5+
rust-version = "1.65"
66

77
authors = ["Guillaume Fraux <[email protected]>"]
88
license = "MIT/Apache-2.0"

tests/generic.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#![allow(unexpected_cfgs)]
2+
#![cfg(rustc_is_at_least_1_78)]
3+
14
mod particles;
25
use std::marker::PhantomData;
36
use std::fmt::Debug;

0 commit comments

Comments
 (0)