Skip to content

Commit 3390061

Browse files
authored
Update to 1.86 (#78)
1 parent 377b9b5 commit 3390061

File tree

12 files changed

+277
-58
lines changed

12 files changed

+277
-58
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ name: CI
1212
jobs:
1313
lint:
1414
name: Lint
15-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-24.04
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- uses: dtolnay/rust-toolchain@stable
1919
with:
2020
components: "clippy, rustfmt"
@@ -32,10 +32,10 @@ jobs:
3232
name: Test
3333
strategy:
3434
matrix:
35-
toolchain: [1.70.0, stable]
36-
runs-on: ubuntu-22.04
35+
toolchain: [1.85.0, stable]
36+
runs-on: ubuntu-24.04
3737
steps:
38-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
3939
- uses: dtolnay/rust-toolchain@master
4040
with:
4141
toolchain: ${{ matrix.toolchain }}
@@ -51,16 +51,16 @@ jobs:
5151

5252
deny-check:
5353
name: cargo-deny
54-
runs-on: ubuntu-22.04
54+
runs-on: ubuntu-24.04
5555
steps:
56-
- uses: actions/checkout@v3
57-
- uses: EmbarkStudios/cargo-deny-action@v1
56+
- uses: actions/checkout@v4
57+
- uses: EmbarkStudios/cargo-deny-action@v2
5858

5959
publish-check:
6060
name: Publish Check
61-
runs-on: ubuntu-22.04
61+
runs-on: ubuntu-24.04
6262
steps:
63-
- uses: actions/checkout@v3
63+
- uses: actions/checkout@v4
6464
- uses: dtolnay/rust-toolchain@stable
6565
- run: cargo fetch
6666
- name: cargo publish check

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
<!-- next-header -->
1111
## [Unreleased] - ReleaseDate
12+
### Changed
13+
- [PR#78](https://github.com/EmbarkStudios/cfg-expr/pull/78) updated the builtin target list to 1.86.0.
14+
- [PR#78](https://github.com/EmbarkStudios/cfg-expr/pull/78) changed the MSRV to 1.85.0 and the edition to 2024.
15+
1216
## [0.18.0] - 2025-02-20
1317
### Changed
1418
- [PR#77](https://github.com/EmbarkStudios/cfg-expr/pull/77) updated the builtin target list to 1.84.1 and 1.85.0.

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ authors = [
77
"Embark <[email protected]>",
88
"Jake Shadle <[email protected]>",
99
]
10-
edition = "2021"
10+
edition = "2024"
1111
license = "MIT OR Apache-2.0"
1212
readme = "README.md"
13-
rust-version = "1.70.0"
13+
rust-version = "1.85.0"
1414
documentation = "https://docs.rs/cfg-expr"
1515
homepage = "https://github.com/EmbarkStudios/cfg-expr"
1616
keywords = ["cargo", "rustc", "cfg"]
@@ -23,8 +23,8 @@ default = []
2323
targets = ["target-lexicon"]
2424

2525
[dependencies]
26-
smallvec = "1.8"
26+
smallvec = "1.14"
2727
target-lexicon = { version = "=0.13.2", optional = true }
2828

2929
[dev-dependencies]
30-
similar-asserts = "1.1"
30+
similar-asserts = "1.7"

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
# `⚙️ cfg-expr`
66

7-
**A parser and evaluator for Rust `cfg()` expressions. Builtin targets as of [1.85.0] are supported.**
7+
**A parser and evaluator for Rust `cfg()` expressions. Builtin targets as of [1.86.0] are supported.**
88

99
[![Build Status](https://github.com/EmbarkStudios/cfg-expr/workflows/CI/badge.svg)](https://github.com/EmbarkStudios/cfg-expr/actions?workflow=CI)
1010
[![Crates.io](https://img.shields.io/crates/v/cfg-expr.svg)](https://crates.io/crates/cfg-expr)
1111
[![Docs](https://docs.rs/cfg-expr/badge.svg)](https://docs.rs/cfg-expr)
1212
[![Minimum Stable Rust Version](https://img.shields.io/badge/Rust%20MSRV-1.70.0-blue?color=fc8d62&logo=rust)](https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html)
13-
[![Rust Targets](https://img.shields.io/badge/Rust%20Targets-1.85.0-blue.svg)](https://forge.rust-lang.org/release/platform-support.html)
13+
[![Rust Targets](https://img.shields.io/badge/Rust%20Targets-1.86.0-blue.svg)](https://forge.rust-lang.org/release/platform-support.html)
1414
[![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
1515
[![Embark](https://img.shields.io/badge/embark-open%20source-blueviolet.svg)](https://embark.dev)
1616
</div>
@@ -24,7 +24,7 @@
2424

2525
`cfg-expr` is a crate that can be used to parse and evaluate Rust `cfg()` expressions, both as declarable in Rust code itself, as well in cargo manifests' `[target.'cfg()'.dependencies]` sections.
2626

27-
It contains a list of all builtin targets known to rustc as of [1.85.0] that can be used to determine if a particular cfg expression is satisfiable.
27+
It contains a list of all builtin targets known to rustc as of [1.86.0] that can be used to determine if a particular cfg expression is satisfiable.
2828

2929
```rust
3030
use cfg_expr::{targets::get_builtin_target_by_triple, Expression, Predicate};
@@ -110,4 +110,4 @@ at your option.
110110

111111
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
112112

113-
[1.85.0]: (https://forge.rust-lang.org/release/platform-support.html)
113+
[1.86.0]: (https://forge.rust-lang.org/release/platform-support.html)

deny.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
[graph]
2+
all-features = true
3+
14
[advisories]
2-
vulnerability = "deny"
3-
unmaintained = "deny"
4-
notice = "deny"
55
ignore = [
66
]
77

@@ -13,9 +13,6 @@ unknown-registry = "deny"
1313
unknown-git = "deny"
1414

1515
[licenses]
16-
unlicensed = "deny"
17-
allow-osi-fsf-free = "neither"
18-
copyleft = "deny"
1916
# We want really high confidence when inferring licenses from text
2017
confidence-threshold = 0.93
2118
allow = [

examples/eval.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use cfg_expr::{targets::get_builtin_target_by_triple, Expression, Predicate};
1+
use cfg_expr::{Expression, Predicate, targets::get_builtin_target_by_triple};
22

33
fn main() {
44
let specific = Expression::parse(

src/expr.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ impl TargetMatcher for target_lexicon::Triple {
100100
#[allow(clippy::cognitive_complexity)]
101101
#[allow(clippy::match_same_arms)]
102102
fn matches(&self, tp: &TargetPredicate) -> bool {
103-
use target_lexicon::*;
104103
use TargetPredicate::{
105104
Abi, Arch, Endian, Env, Family, HasAtomic, Os, Panic, PointerWidth, Vendor,
106105
};
106+
use target_lexicon::*;
107107

108108
const NUTTX: target_lexicon::Vendor =
109109
target_lexicon::Vendor::Custom(target_lexicon::CustomVendor::Static("nuttx"));
@@ -143,6 +143,8 @@ impl TargetMatcher for target_lexicon::Triple {
143143
Mips64Architecture::Mipsisa64r6 | Mips64Architecture::Mipsisa64r6el
144144
)
145145
)
146+
} else if arch == &targ::Arch::amdgpu {
147+
self.architecture == Architecture::AmdGcn
146148
} else {
147149
match arch.0.parse::<Architecture>() {
148150
Ok(a) => match (self.architecture, a) {
@@ -263,9 +265,9 @@ impl TargetMatcher for target_lexicon::Triple {
263265
Family(fam) => {
264266
use OperatingSystem::{
265267
Aix, AmdHsa, Bitrig, Cloudabi, Cuda, Darwin, Dragonfly, Emscripten, Espidf,
266-
Freebsd, Fuchsia, Haiku, Hermit, Horizon, Hurd, Illumos, L4re, Linux, MacOSX,
267-
Nebulet, Netbsd, None_, Openbsd, Redox, Solaris, TvOS, Uefi, Unknown, VisionOS,
268-
VxWorks, Wasi, WasiP1, WasiP2, WatchOS, Windows, IOS,
268+
Freebsd, Fuchsia, Haiku, Hermit, Horizon, Hurd, IOS, Illumos, L4re, Linux,
269+
MacOSX, Nebulet, Netbsd, None_, Openbsd, Redox, Solaris, TvOS, Uefi, Unknown,
270+
VisionOS, VxWorks, Wasi, WasiP1, WasiP2, WatchOS, Windows,
269271
};
270272

271273
match self.operating_system {

src/expr/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::{
22
error::{ParseError, Reason},
33
expr::{
4-
lexer::{Lexer, Token},
54
ExprNode, Expression, Func, InnerPredicate,
5+
lexer::{Lexer, Token},
66
},
77
};
88
use smallvec::SmallVec;
@@ -200,7 +200,7 @@ impl Expression {
200200
"target_pointer_width",
201201
"target_vendor",
202202
]),
203-
})
203+
});
204204
}
205205
};
206206

0 commit comments

Comments
 (0)