diff --git a/tests/tests/derive.rs b/tests/tests/derive.rs index 91224e0..df46084 100644 --- a/tests/tests/derive.rs +++ b/tests/tests/derive.rs @@ -1,4 +1,5 @@ #![cfg(feature = "derive")] +#![allow(dead_code)] use valuable::Valuable; diff --git a/tests/tests/ui/not_valuable.stderr b/tests/tests/ui/not_valuable.stderr index 9992dfb..60af2c0 100644 --- a/tests/tests/ui/not_valuable.stderr +++ b/tests/tests/ui/not_valuable.stderr @@ -5,17 +5,17 @@ error[E0277]: the trait bound `S: Valuable` is not satisfied | -------- required by a bound introduced by this call 6 | struct Struct { 7 | f: Option, - | ^^^^^^^^^ the trait `Valuable` is not implemented for `S` + | ^^^^^^^^^ the trait `Valuable` is not implemented for `S`, which is required by `Option: Valuable` | = help: the following other types implement trait `Valuable`: - bool - char - isize - i8 - i16 - i32 - i64 - i128 + &T + &[T] + &mut T + &std::path::Path + &str + () + (T0, T1) + (T0, T1, T2) and $N others = note: required for `Option` to implement `Valuable` @@ -25,17 +25,17 @@ error[E0277]: the trait bound `S: Valuable` is not satisfied 10 | #[derive(Valuable)] | -------- required by a bound introduced by this call 11 | struct Tuple(Option); - | ^^^^^^^^^ the trait `Valuable` is not implemented for `S` + | ^^^^^^^^^ the trait `Valuable` is not implemented for `S`, which is required by `Option: Valuable` | = help: the following other types implement trait `Valuable`: - bool - char - isize - i8 - i16 - i32 - i64 - i128 + &T + &[T] + &mut T + &std::path::Path + &str + () + (T0, T1) + (T0, T1, T2) and $N others = note: required for `Option` to implement `Valuable` @@ -46,17 +46,17 @@ error[E0277]: the trait bound `S: Valuable` is not satisfied | -------- required by a bound introduced by this call 14 | enum Enum { 15 | Struct { f: Option }, - | ^^^^^^^^^ the trait `Valuable` is not implemented for `S` + | ^^^^^^^^^ the trait `Valuable` is not implemented for `S`, which is required by `&Option: Valuable` | = help: the following other types implement trait `Valuable`: - bool - char - isize - i8 - i16 - i32 - i64 - i128 + &T + &[T] + &mut T + &std::path::Path + &str + () + (T0, T1) + (T0, T1, T2) and $N others = note: required for `Option` to implement `Valuable` = note: 1 redundant requirement hidden @@ -69,17 +69,17 @@ error[E0277]: the trait bound `S: Valuable` is not satisfied | -------- required by a bound introduced by this call ... 16 | Tuple(Option), - | ^^^^^^^^^ the trait `Valuable` is not implemented for `S` + | ^^^^^^^^^ the trait `Valuable` is not implemented for `S`, which is required by `&Option: Valuable` | = help: the following other types implement trait `Valuable`: - bool - char - isize - i8 - i16 - i32 - i64 - i128 + &T + &[T] + &mut T + &std::path::Path + &str + () + (T0, T1) + (T0, T1, T2) and $N others = note: required for `Option` to implement `Valuable` = note: 1 redundant requirement hidden diff --git a/valuable/build.rs b/valuable/build.rs index ad0dd06..77a8645 100644 --- a/valuable/build.rs +++ b/valuable/build.rs @@ -8,6 +8,9 @@ include!("no_atomic.rs"); // opening a GitHub issue if your build environment requires some way to enable // these cfgs other than by executing our build script. fn main() { + println!("cargo:rerun-if-changed=no_atomic.rs"); + println!("cargo:rustc-check-cfg=cfg(valuable_no_atomic_cas,valuable_no_atomic,valuable_no_atomic_64)"); + let target = match env::var("TARGET") { Ok(target) => target, Err(e) => { @@ -34,6 +37,4 @@ fn main() { } else { // Otherwise, assuming `"max-atomic-width" == 64`. } - - println!("cargo:rerun-if-changed=no_atomic.rs"); } diff --git a/valuable/no_atomic.rs b/valuable/no_atomic.rs index 1df2439..d679dfe 100644 --- a/valuable/no_atomic.rs +++ b/valuable/no_atomic.rs @@ -28,6 +28,7 @@ const NO_ATOMIC_64: &[&str] = &[ "csky-unknown-linux-gnuabiv2", "csky-unknown-linux-gnuabiv2hf", "hexagon-unknown-linux-musl", + "hexagon-unknown-none-elf", "m68k-unknown-linux-gnu", "mips-unknown-linux-gnu", "mips-unknown-linux-musl", @@ -52,9 +53,11 @@ const NO_ATOMIC_64: &[&str] = &[ "riscv32gc-unknown-linux-musl", "riscv32i-unknown-none-elf", "riscv32im-unknown-none-elf", + "riscv32ima-unknown-none-elf", "riscv32imac-esp-espidf", "riscv32imac-unknown-none-elf", "riscv32imac-unknown-xous-elf", + "riscv32imafc-esp-espidf", "riscv32imafc-unknown-none-elf", "riscv32imc-esp-espidf", "riscv32imc-unknown-none-elf",