Skip to content

Commit

Permalink
Update to 1.68.2 (#58)
Browse files Browse the repository at this point in the history
* Update to 1.68.2

* Update CHANGELOG

* Fix clippy lints

* Fix doctest

* Fix misattribution
  • Loading branch information
Jake-Shadle authored Apr 4, 2023
1 parent f769aed commit 8e5db5b
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- next-header -->
## [Unreleased] - ReleaseDate
### Changed
- [PR#58](https://github.com/EmbarkStudios/cfg-expr/pull/58) updated the builtin target list to 1.68.2.

## [0.14.0] - 2023-01-27
### Changed
- [PR#57](https://github.com/EmbarkStudios/cfg-expr/pull/57) updated the builtin target list to 1.67.0.
Expand Down
11 changes: 6 additions & 5 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,15 @@ impl TargetMatcher for target_lexicon::Triple {
}
Family(fam) => {
use target_lexicon::OperatingSystem::{
AmdHsa, Bitrig, Cloudabi, Cuda, Darwin, Dragonfly, Emscripten, Espidf, Freebsd,
Fuchsia, Haiku, Hermit, Horizon, Illumos, Ios, L4re, Linux, MacOSX, Nebulet,
Netbsd, None_, Openbsd, Redox, Solaris, Tvos, Uefi, Unknown, VxWorks, Wasi,
Watchos, Windows,
Aix, AmdHsa, Bitrig, Cloudabi, Cuda, Darwin, Dragonfly, Emscripten, Espidf,
Freebsd, Fuchsia, Haiku, Hermit, Horizon, Illumos, Ios, L4re, Linux, MacOSX,
Nebulet, Netbsd, None_, Openbsd, Redox, Solaris, Tvos, Uefi, Unknown, VxWorks,
Wasi, Watchos, Windows,
};
match self.operating_system {
AmdHsa | Bitrig | Cloudabi | Cuda | Hermit | Nebulet | None_ | Uefi => false,
Darwin
Aix
| Darwin
| Dragonfly
| Espidf
| Freebsd
Expand Down
4 changes: 2 additions & 2 deletions src/expr/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ impl<'a> Iterator for Lexer<'a> {

#[inline]
fn is_ident_start(ch: char) -> bool {
ch == '_' || (('a'..='z').contains(&ch) || ('A'..='Z').contains(&ch))
ch == '_' || ch.is_ascii_lowercase() || ch.is_ascii_uppercase()
}

#[inline]
fn is_ident_rest(ch: char) -> bool {
is_ident_start(ch) || ('0'..='9').contains(&ch)
is_ident_start(ch) || ch.is_ascii_digit()
}

match self.inner.chars().next() {
Expand Down
2 changes: 1 addition & 1 deletion src/targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ pub fn get_builtin_target_by_triple(triple: &str) -> Option<&'static TargetInfo>
/// versions.
///
/// ```
/// assert_eq!("1.67.0", cfg_expr::targets::rustc_version());
/// assert_eq!("1.68.2", cfg_expr::targets::rustc_version());
/// ```
pub fn rustc_version() -> &'static str {
builtins::RUSTC_VERSION
Expand Down
48 changes: 45 additions & 3 deletions src/targets/builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

use super::*;

pub(crate) const RUSTC_VERSION: &str = "1.67.0";
pub(crate) const RUSTC_VERSION: &str = "1.68.2";

pub const ALL_BUILTINS: &[TargetInfo] = &[
TargetInfo {
Expand Down Expand Up @@ -182,6 +182,19 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[
has_atomics: HasAtomics::atomic_8_16_32_64_128_ptr,
panic: Panic::unwind,
},
TargetInfo {
triple: Triple::new_const("aarch64-unknown-fuchsia"),
os: Some(Os::fuchsia),
abi: None,
arch: Arch::aarch64,
env: None,
vendor: Some(Vendor::unknown),
families: Families::unix,
pointer_width: 64,
endian: Endian::little,
has_atomics: HasAtomics::atomic_8_16_32_64_128_ptr,
panic: Panic::unwind,
},
TargetInfo {
triple: Triple::new_const("aarch64-unknown-hermit"),
os: Some(Os::hermit),
Expand Down Expand Up @@ -637,6 +650,19 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[
has_atomics: HasAtomics::atomic_8_16_32_64_ptr,
panic: Panic::unwind,
},
TargetInfo {
triple: Triple::new_const("armv7-sony-vita-newlibeabihf"),
os: Some(Os::vita),
abi: None,
arch: Arch::arm,
env: Some(Env::newlib),
vendor: Some(Vendor::sony),
families: Families::unix,
pointer_width: 32,
endian: Endian::little,
has_atomics: HasAtomics::atomic_8_16_32_ptr,
panic: Panic::abort,
},
TargetInfo {
triple: Triple::new_const("armv7-unknown-freebsd"),
os: Some(Os::freebsd),
Expand Down Expand Up @@ -894,7 +920,7 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[
families: Families::new_const(&[]),
pointer_width: 64,
endian: Endian::big,
has_atomics: HasAtomics::new_const(&[]),
has_atomics: HasAtomics::atomic_64_ptr,
panic: Panic::abort,
},
TargetInfo {
Expand All @@ -907,7 +933,7 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[
families: Families::new_const(&[]),
pointer_width: 64,
endian: Endian::little,
has_atomics: HasAtomics::new_const(&[]),
has_atomics: HasAtomics::atomic_64_ptr,
panic: Panic::abort,
},
TargetInfo {
Expand Down Expand Up @@ -2366,6 +2392,19 @@ pub const ALL_BUILTINS: &[TargetInfo] = &[
has_atomics: HasAtomics::atomic_8_16_32_64_ptr,
panic: Panic::unwind,
},
TargetInfo {
triple: Triple::new_const("x86_64-unknown-fuchsia"),
os: Some(Os::fuchsia),
abi: None,
arch: Arch::x86_64,
env: None,
vendor: Some(Vendor::unknown),
families: Families::unix,
pointer_width: 64,
endian: Endian::little,
has_atomics: HasAtomics::atomic_8_16_32_64_ptr,
panic: Panic::unwind,
},
TargetInfo {
triple: Triple::new_const("x86_64-unknown-haiku"),
os: Some(Os::haiku),
Expand Down Expand Up @@ -2632,6 +2671,7 @@ impl super::Os {
pub const tvos: Os = Os::new_const("tvos");
pub const uefi: Os = Os::new_const("uefi");
pub const unknown: Os = Os::new_const("unknown");
pub const vita: Os = Os::new_const("vita");
pub const vxworks: Os = Os::new_const("vxworks");
pub const wasi: Os = Os::new_const("wasi");
pub const watchos: Os = Os::new_const("watchos");
Expand Down Expand Up @@ -2692,13 +2732,15 @@ const __has_atomics_8_16_32_ptr: &[HasAtomic] = &[
HasAtomic::IntegerSize(32),
HasAtomic::Pointer,
];
const __has_atomics_64_ptr: &[HasAtomic] = &[HasAtomic::IntegerSize(64), HasAtomic::Pointer];

impl super::HasAtomics {
pub const atomic_8_16_32_64_128_ptr: HasAtomics =
HasAtomics::new_const(__has_atomics_8_16_32_64_128_ptr);
pub const atomic_8_16_32_64_ptr: HasAtomics =
HasAtomics::new_const(__has_atomics_8_16_32_64_ptr);
pub const atomic_8_16_32_ptr: HasAtomics = HasAtomics::new_const(__has_atomics_8_16_32_ptr);
pub const atomic_64_ptr: HasAtomics = HasAtomics::new_const(__has_atomics_64_ptr);
}

impl super::Panic {
Expand Down

0 comments on commit 8e5db5b

Please sign in to comment.