Skip to content

Commit

Permalink
[ci] Update pinned toolchain versions (#185) (#224)
Browse files Browse the repository at this point in the history
Also rename `tests/ui` to `tests/ui-nightly` since it now only contains
nightly tests (it used to also contain beta tests when we tested on beta
in CI). Same for zerocopy-derive.
  • Loading branch information
joshlf committed Aug 3, 2023
1 parent 82264e5 commit 9c67ff4
Show file tree
Hide file tree
Showing 32 changed files with 91 additions and 91 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ jobs:
set -e
cargo fmt --check -p zerocopy
cargo fmt --check -p zerocopy-derive
rustfmt --check tests/ui/*.rs
rustfmt --check zerocopy-derive/tests/ui/*.rs
rustfmt --check tests/ui-nightly/*.rs
rustfmt --check zerocopy-derive/tests/ui-nightly/*.rs
check_readme:
runs-on: ubuntu-latest
Expand Down
16 changes: 8 additions & 8 deletions tests/trybuild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
// pin to specific versions in CI (a specific stable version, a specific date of
// the nightly compiler, and a specific MSRV). Updating those pinned versions
// may also require updating these tests.
// - `tests/ui` - Contains the source of truth for our UI test source files
// (`.rs`), and contains `.err` and `.out` files for nightly and beta
// - `tests/ui-stable` - Contains symlinks to the `.rs` files in `tests/ui`, and
// contains `.err` and `.out` files for stable
// - `tests/ui-msrv` - Contains symlinks to the `.rs` files in `tests/ui`, and
// contains `.err` and `.out` files for MSRV
// - `tests/ui-nightly` - Contains the source of truth for our UI test source
// files (`.rs`), and contains `.err` and `.out` files for nightly
// - `tests/ui-stable` - Contains symlinks to the `.rs` files in
// `tests/ui-nightly`, and contains `.err` and `.out` files for stable
// - `tests/ui-msrv` - Contains symlinks to the `.rs` files in
// `tests/ui-nightly`, and contains `.err` and `.out` files for MSRV

#[rustversion::any(nightly, beta)]
const SOURCE_FILES_GLOB: &str = "tests/ui/*.rs";
#[rustversion::any(nightly)]
const SOURCE_FILES_GLOB: &str = "tests/ui-nightly/*.rs";
#[rustversion::all(stable, not(stable(1.61.0)))]
const SOURCE_FILES_GLOB: &str = "tests/ui-stable/*.rs";
#[rustversion::stable(1.61.0)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui-msrv/transmute-illegal.rs
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `*const usize: AsBytes` is not satisfied
--> tests/ui/transmute-illegal.rs:10:30
--> tests/ui-nightly/transmute-illegal.rs:10:30
|
10 | const POINTER_VALUE: usize = zerocopy::transmute!(&0usize as *const usize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -18,7 +18,7 @@ error[E0277]: the trait bound `*const usize: AsBytes` is not satisfied
isize
and $N others
note: required by a bound in `POINTER_VALUE::transmute`
--> tests/ui/transmute-illegal.rs:10:30
--> tests/ui-nightly/transmute-illegal.rs:10:30
|
10 | const POINTER_VALUE: usize = zerocopy::transmute!(&0usize as *const usize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `POINTER_VALUE::transmute`
Expand Down
2 changes: 1 addition & 1 deletion tests/ui-stable/transmute-illegal.rs
16 changes: 8 additions & 8 deletions zerocopy-derive/tests/trybuild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
// pin to specific versions in CI (a specific stable version, a specific date of
// the nightly compiler, and a specific MSRV). Updating those pinned versions
// may also require updating these tests.
// - `tests/ui` - Contains the source of truth for our UI test source files
// (`.rs`), and contains `.err` and `.out` files for nightly and beta
// - `tests/ui-stable` - Contains symlinks to the `.rs` files in `tests/ui`, and
// contains `.err` and `.out` files for stable
// - `tests/ui-msrv` - Contains symlinks to the `.rs` files in `tests/ui`, and
// contains `.err` and `.out` files for MSRV
// - `tests/ui-nightly` - Contains the source of truth for our UI test source
// files (`.rs`), and contains `.err` and `.out` files for nightly
// - `tests/ui-stable` - Contains symlinks to the `.rs` files in
// `tests/ui-nightly`, and contains `.err` and `.out` files for stable
// - `tests/ui-msrv` - Contains symlinks to the `.rs` files in
// `tests/ui-nightly`, and contains `.err` and `.out` files for MSRV

#[rustversion::any(nightly, beta)]
const SOURCE_FILES_GLOB: &str = "tests/ui/*.rs";
#[rustversion::any(nightly)]
const SOURCE_FILES_GLOB: &str = "tests/ui-nightly/*.rs";
#[rustversion::all(stable, not(stable(1.61.0)))]
const SOURCE_FILES_GLOB: &str = "tests/ui-stable/*.rs";
#[rustversion::stable(1.61.0)]
Expand Down
2 changes: 1 addition & 1 deletion zerocopy-derive/tests/ui-msrv/derive_transparent.rs
2 changes: 1 addition & 1 deletion zerocopy-derive/tests/ui-msrv/enum.rs
2 changes: 1 addition & 1 deletion zerocopy-derive/tests/ui-msrv/late_compile_pass.rs
2 changes: 1 addition & 1 deletion zerocopy-derive/tests/ui-msrv/struct.rs
2 changes: 1 addition & 1 deletion zerocopy-derive/tests/ui-msrv/union.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `NotZerocopy: FromBytes` is not satisfied
--> tests/ui/derive_transparent.rs:33:18
--> tests/ui-nightly/derive_transparent.rs:33:18
|
33 | assert_impl_all!(TransparentStruct<NotZerocopy>: FromBytes);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromBytes` is not implemented for `NotZerocopy`
Expand All @@ -15,19 +15,19 @@ error[E0277]: the trait bound `NotZerocopy: FromBytes` is not satisfied
I64<O>
and $N others
note: required for `TransparentStruct<NotZerocopy>` to implement `FromBytes`
--> tests/ui/derive_transparent.rs:23:19
--> tests/ui-nightly/derive_transparent.rs:23:19
|
23 | #[derive(AsBytes, FromBytes, Unaligned)]
| ^^^^^^^^^
note: required by a bound in `_::{closure#0}::assert_impl_all`
--> tests/ui/derive_transparent.rs:33:1
--> tests/ui-nightly/derive_transparent.rs:33:1
|
33 | assert_impl_all!(TransparentStruct<NotZerocopy>: FromBytes);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `_::{closure#0}::assert_impl_all`
= note: this error originates in the derive macro `FromBytes` which comes from the expansion of the macro `assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `NotZerocopy: AsBytes` is not satisfied
--> tests/ui/derive_transparent.rs:34:18
--> tests/ui-nightly/derive_transparent.rs:34:18
|
34 | assert_impl_all!(TransparentStruct<NotZerocopy>: AsBytes);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsBytes` is not implemented for `NotZerocopy`
Expand All @@ -43,19 +43,19 @@ error[E0277]: the trait bound `NotZerocopy: AsBytes` is not satisfied
I64<O>
and $N others
note: required for `TransparentStruct<NotZerocopy>` to implement `AsBytes`
--> tests/ui/derive_transparent.rs:23:10
--> tests/ui-nightly/derive_transparent.rs:23:10
|
23 | #[derive(AsBytes, FromBytes, Unaligned)]
| ^^^^^^^
note: required by a bound in `_::{closure#0}::assert_impl_all`
--> tests/ui/derive_transparent.rs:34:1
--> tests/ui-nightly/derive_transparent.rs:34:1
|
34 | assert_impl_all!(TransparentStruct<NotZerocopy>: AsBytes);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `_::{closure#0}::assert_impl_all`
= note: this error originates in the derive macro `AsBytes` which comes from the expansion of the macro `assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `NotZerocopy: Unaligned` is not satisfied
--> tests/ui/derive_transparent.rs:35:18
--> tests/ui-nightly/derive_transparent.rs:35:18
|
35 | assert_impl_all!(TransparentStruct<NotZerocopy>: Unaligned);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Unaligned` is not implemented for `NotZerocopy`
Expand All @@ -71,12 +71,12 @@ error[E0277]: the trait bound `NotZerocopy: Unaligned` is not satisfied
ManuallyDrop<T>
and $N others
note: required for `TransparentStruct<NotZerocopy>` to implement `Unaligned`
--> tests/ui/derive_transparent.rs:23:30
--> tests/ui-nightly/derive_transparent.rs:23:30
|
23 | #[derive(AsBytes, FromBytes, Unaligned)]
| ^^^^^^^^^
note: required by a bound in `_::{closure#0}::assert_impl_all`
--> tests/ui/derive_transparent.rs:35:1
--> tests/ui-nightly/derive_transparent.rs:35:1
|
35 | assert_impl_all!(TransparentStruct<NotZerocopy>: Unaligned);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `_::{closure#0}::assert_impl_all`
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,171 +1,171 @@
error: unrecognized representation hint
--> tests/ui/enum.rs:15:8
--> tests/ui-nightly/enum.rs:15:8
|
15 | #[repr("foo")]
| ^^^^^

error: unrecognized representation hint
--> tests/ui/enum.rs:21:8
--> tests/ui-nightly/enum.rs:21:8
|
21 | #[repr(foo)]
| ^^^

error: unsupported representation for deriving FromBytes, AsBytes, or Unaligned on an enum
--> tests/ui/enum.rs:27:8
--> tests/ui-nightly/enum.rs:27:8
|
27 | #[repr(transparent)]
| ^^^^^^^^^^^

error: conflicting representation hints
--> tests/ui/enum.rs:33:8
--> tests/ui-nightly/enum.rs:33:8
|
33 | #[repr(u8, u16)]
| ^^^^^^^

error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout
--> tests/ui/enum.rs:38:10
--> tests/ui-nightly/enum.rs:38:10
|
38 | #[derive(FromBytes)]
| ^^^^^^^^^
|
= note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
--> tests/ui/enum.rs:48:8
--> tests/ui-nightly/enum.rs:48:8
|
48 | #[repr(C)]
| ^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
--> tests/ui/enum.rs:54:8
--> tests/ui-nightly/enum.rs:54:8
|
54 | #[repr(usize)]
| ^^^^^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
--> tests/ui/enum.rs:60:8
--> tests/ui-nightly/enum.rs:60:8
|
60 | #[repr(isize)]
| ^^^^^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
--> tests/ui/enum.rs:66:8
--> tests/ui-nightly/enum.rs:66:8
|
66 | #[repr(u32)]
| ^^^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
--> tests/ui/enum.rs:72:8
--> tests/ui-nightly/enum.rs:72:8
|
72 | #[repr(i32)]
| ^^^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
--> tests/ui/enum.rs:78:8
--> tests/ui-nightly/enum.rs:78:8
|
78 | #[repr(u64)]
| ^^^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
--> tests/ui/enum.rs:84:8
--> tests/ui-nightly/enum.rs:84:8
|
84 | #[repr(i64)]
| ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
--> tests/ui/enum.rs:94:8
--> tests/ui-nightly/enum.rs:94:8
|
94 | #[repr(C)]
| ^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
--> tests/ui/enum.rs:100:8
--> tests/ui-nightly/enum.rs:100:8
|
100 | #[repr(u16)]
| ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
--> tests/ui/enum.rs:106:8
--> tests/ui-nightly/enum.rs:106:8
|
106 | #[repr(i16)]
| ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
--> tests/ui/enum.rs:112:8
--> tests/ui-nightly/enum.rs:112:8
|
112 | #[repr(u32)]
| ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
--> tests/ui/enum.rs:118:8
--> tests/ui-nightly/enum.rs:118:8
|
118 | #[repr(i32)]
| ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
--> tests/ui/enum.rs:124:8
--> tests/ui-nightly/enum.rs:124:8
|
124 | #[repr(u64)]
| ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
--> tests/ui/enum.rs:130:8
--> tests/ui-nightly/enum.rs:130:8
|
130 | #[repr(i64)]
| ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
--> tests/ui/enum.rs:136:8
--> tests/ui-nightly/enum.rs:136:8
|
136 | #[repr(usize)]
| ^^^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
--> tests/ui/enum.rs:142:8
--> tests/ui-nightly/enum.rs:142:8
|
142 | #[repr(isize)]
| ^^^^^

error: cannot derive Unaligned with repr(align(N > 1))
--> tests/ui/enum.rs:148:12
--> tests/ui-nightly/enum.rs:148:12
|
148 | #[repr(u8, align(2))]
| ^^^^^^^^

error: cannot derive Unaligned with repr(align(N > 1))
--> tests/ui/enum.rs:154:12
--> tests/ui-nightly/enum.rs:154:12
|
154 | #[repr(i8, align(2))]
| ^^^^^^^^

error: cannot derive Unaligned with repr(align(N > 1))
--> tests/ui/enum.rs:160:18
--> tests/ui-nightly/enum.rs:160:18
|
160 | #[repr(align(1), align(2))]
| ^^^^^^^^

error: cannot derive Unaligned with repr(align(N > 1))
--> tests/ui/enum.rs:166:8
--> tests/ui-nightly/enum.rs:166:8
|
166 | #[repr(align(2), align(4))]
| ^^^^^^^^

error[E0565]: meta item in `repr` must be an identifier
--> tests/ui/enum.rs:15:8
--> tests/ui-nightly/enum.rs:15:8
|
15 | #[repr("foo")]
| ^^^^^

error[E0552]: unrecognized representation hint
--> tests/ui/enum.rs:21:8
--> tests/ui-nightly/enum.rs:21:8
|
21 | #[repr(foo)]
| ^^^
|
= help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`

error[E0566]: conflicting representation hints
--> tests/ui/enum.rs:33:8
--> tests/ui-nightly/enum.rs:33:8
|
33 | #[repr(u8, u16)]
| ^^ ^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: FromBytes only supported on repr(u8) enum with 256 variants
--> tests/ui/enum_from_bytes_u8_too_few.rs:11:1
--> tests/ui-nightly/enum_from_bytes_u8_too_few.rs:11:1
|
11 | / #[repr(u8)]
12 | | enum Foo {
Expand Down

0 comments on commit 9c67ff4

Please sign in to comment.