Skip to content

Commit

Permalink
Update no_atomic.rs and fix CI failures (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jul 14, 2024
1 parent c8668b0 commit 171d50a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 38 deletions.
1 change: 1 addition & 0 deletions tests/tests/derive.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg(feature = "derive")]
#![allow(dead_code)]

use valuable::Valuable;

Expand Down
72 changes: 36 additions & 36 deletions tests/tests/ui/not_valuable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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<S>,
| ^^^^^^^^^ the trait `Valuable` is not implemented for `S`
| ^^^^^^^^^ the trait `Valuable` is not implemented for `S`, which is required by `Option<S>: 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<S>` to implement `Valuable`

Expand All @@ -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<S>);
| ^^^^^^^^^ the trait `Valuable` is not implemented for `S`
| ^^^^^^^^^ the trait `Valuable` is not implemented for `S`, which is required by `Option<S>: 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<S>` to implement `Valuable`

Expand All @@ -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<S> },
| ^^^^^^^^^ the trait `Valuable` is not implemented for `S`
| ^^^^^^^^^ the trait `Valuable` is not implemented for `S`, which is required by `&Option<S>: 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<S>` to implement `Valuable`
= note: 1 redundant requirement hidden
Expand All @@ -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<S>),
| ^^^^^^^^^ the trait `Valuable` is not implemented for `S`
| ^^^^^^^^^ the trait `Valuable` is not implemented for `S`, which is required by `&Option<S>: 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<S>` to implement `Valuable`
= note: 1 redundant requirement hidden
Expand Down
5 changes: 3 additions & 2 deletions valuable/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -34,6 +37,4 @@ fn main() {
} else {
// Otherwise, assuming `"max-atomic-width" == 64`.
}

println!("cargo:rerun-if-changed=no_atomic.rs");
}
3 changes: 3 additions & 0 deletions valuable/no_atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 171d50a

Please sign in to comment.