Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion anneal/tests/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn ui() {
unsafe { std::env::set_var("ANNEAL_UI_TEST_MODE", "true") };

let mut config = Config::rustc(PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/ui"));
config.program.args.push("--diagnostic-width=100".into());
config.program.args.push("--diagnostic-width=1000".into());

let args = Args::test().unwrap();
config.with_args(&args);
Expand Down
4 changes: 2 additions & 2 deletions tools/ui-runner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ fn main() {
// starting in 1.62.0), so we only pass it if we're not on our MSRV
// toolchain (which is 1.56.0).
if toolchain_meta_name != "msrv" {
config.program.args.push("--diagnostic-width=100".into());
config.program.args.push("--diagnostic-width=1000".into());
}

// These environment variables are usually respected by CLI tools (including
// rustc) to determine the terminal width. As of this writing, rustc sometimes
// ignores them and discovers the real terminal width anyway; the
// `--diagnostic-width` flag above is more reliable.
config.program.envs.push(("TERM".into(), Some("dumb".into())));
config.program.envs.push(("COLUMNS".into(), Some("100".into())));
config.program.envs.push(("COLUMNS".into(), Some("1000".into())));

// Set `-Wwarnings` in the `RUSTFLAGS` environment variable to ensure that
// `.stderr` files reflect what the typical user would encounter.
Expand Down
8 changes: 0 additions & 8 deletions zerocopy/tests/ui/diagnostic-not-implemented.nightly.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ note: required by a bound in `takes_from_bytes`
|
77 | fn takes_from_bytes<T: FromBytes>() {}
| ^^^^^^^^^ required by this bound in `takes_from_bytes`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied
--> $DIR/diagnostic-not-implemented.rs:18:24
Expand Down Expand Up @@ -55,8 +53,6 @@ note: required by a bound in `takes_from_zeros`
|
78 | fn takes_from_zeros<T: FromZeros>() {}
| ^^^^^^^^^ required by this bound in `takes_from_zeros`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0277]: the trait bound `NotZerocopy: Immutable` is not satisfied
--> $DIR/diagnostic-not-implemented.rs:20:23
Expand Down Expand Up @@ -85,8 +81,6 @@ note: required by a bound in `takes_immutable`
|
79 | fn takes_immutable<T: Immutable>() {}
| ^^^^^^^^^ required by this bound in `takes_immutable`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0277]: the trait bound `NotZerocopy: IntoBytes` is not satisfied
--> $DIR/diagnostic-not-implemented.rs:22:24
Expand Down Expand Up @@ -171,8 +165,6 @@ note: required by a bound in `takes_try_from_bytes`
|
82 | fn takes_try_from_bytes<T: TryFromBytes>() {}
| ^^^^^^^^^^^^ required by this bound in `takes_try_from_bytes`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0277]: the trait bound `NotZerocopy: zerocopy::Unaligned` is not satisfied
--> $DIR/diagnostic-not-implemented.rs:28:23
Expand Down
8 changes: 0 additions & 8 deletions zerocopy/tests/ui/diagnostic-not-implemented.stable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ note: required by a bound in `takes_from_bytes`
|
77 | fn takes_from_bytes<T: FromBytes>() {}
| ^^^^^^^^^ required by this bound in `takes_from_bytes`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0277]: the trait bound `NotZerocopy: FromZeros` is not satisfied
--> $DIR/diagnostic-not-implemented.rs:18:24
Expand Down Expand Up @@ -55,8 +53,6 @@ note: required by a bound in `takes_from_zeros`
|
78 | fn takes_from_zeros<T: FromZeros>() {}
| ^^^^^^^^^ required by this bound in `takes_from_zeros`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0277]: the trait bound `NotZerocopy: Immutable` is not satisfied
--> $DIR/diagnostic-not-implemented.rs:20:23
Expand Down Expand Up @@ -85,8 +81,6 @@ note: required by a bound in `takes_immutable`
|
79 | fn takes_immutable<T: Immutable>() {}
| ^^^^^^^^^ required by this bound in `takes_immutable`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0277]: the trait bound `NotZerocopy: IntoBytes` is not satisfied
--> $DIR/diagnostic-not-implemented.rs:22:24
Expand Down Expand Up @@ -171,8 +165,6 @@ note: required by a bound in `takes_try_from_bytes`
|
82 | fn takes_try_from_bytes<T: TryFromBytes>() {}
| ^^^^^^^^^^^^ required by this bound in `takes_try_from_bytes`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0277]: the trait bound `NotZerocopy: zerocopy::Unaligned` is not satisfied
--> $DIR/diagnostic-not-implemented.rs:28:23
Expand Down
2 changes: 0 additions & 2 deletions zerocopy/tests/ui/include_value.nightly.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ note: required by a bound in `NOT_FROM_BYTES::transmute`
| |
| required by a bound in this function
| required by this bound in `transmute`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `$crate::transmute` which comes from the expansion of the macro `zerocopy::include_value` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error
Expand Down
2 changes: 0 additions & 2 deletions zerocopy/tests/ui/include_value.stable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ note: required by a bound in `NOT_FROM_BYTES::transmute`
| |
| required by a bound in this function
| required by this bound in `transmute`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `$crate::transmute` which comes from the expansion of the macro `zerocopy::include_value` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error
Expand Down
8 changes: 4 additions & 4 deletions zerocopy/tests/ui/late-compile-pass.nightly.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ error[E0015]: cannot call non-const method `zerocopy::util::macro_util::Wrap::<&
error[E0080]: transmuting from 4-byte type to 8-byte type: `[u8; 4]` -> `u64`
--> $DIR/late-compile-pass.rs:50:39
|
50 | ...IZE: u64 = zerocopy::include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `INCLUDE_VALUE_WRONG_SIZE` failed here
50 | const INCLUDE_VALUE_WRONG_SIZE: u64 = zerocopy::include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `INCLUDE_VALUE_WRONG_SIZE` failed here
|
= note: this error originates in the macro `$crate::transmute` which comes from the expansion of the macro `zerocopy::include_value` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand Down Expand Up @@ -96,8 +96,8 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> $DIR/late-compile-pass.rs:50:39
|
50 | ...G_SIZE: u64 = zerocopy::include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50 | const INCLUDE_VALUE_WRONG_SIZE: u64 = zerocopy::include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: `[u8; 4]` (32 bits)
= note: target type: `u64` (64 bits)
Expand Down
8 changes: 4 additions & 4 deletions zerocopy/tests/ui/late-compile-pass.stable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ error[E0015]: cannot call non-const method `Wrap::<&mut [u8; 2], &mut [u8; 2]>::
error[E0080]: transmuting from 4-byte type to 8-byte type: `[u8; 4]` -> `u64`
--> $DIR/late-compile-pass.rs:50:39
|
50 | ...IZE: u64 = zerocopy::include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `INCLUDE_VALUE_WRONG_SIZE` failed here
50 | const INCLUDE_VALUE_WRONG_SIZE: u64 = zerocopy::include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `INCLUDE_VALUE_WRONG_SIZE` failed here
|
= note: this error originates in the macro `$crate::transmute` which comes from the expansion of the macro `zerocopy::include_value` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand Down Expand Up @@ -96,8 +96,8 @@ error[E0512]: cannot transmute between types of different sizes, or dependently-
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> $DIR/late-compile-pass.rs:50:39
|
50 | ...G_SIZE: u64 = zerocopy::include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50 | const INCLUDE_VALUE_WRONG_SIZE: u64 = zerocopy::include_value!("../../testdata/include_value/data");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: `[u8; 4]` (32 bits)
= note: target type: `u64` (64 bits)
Expand Down
2 changes: 0 additions & 2 deletions zerocopy/tests/ui/transmute.nightly.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ note: required by a bound in `DST_NOT_FROM_BYTES::transmute`
| |
| required by a bound in this function
| required by this bound in `transmute`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `NotZerocopy<AU16>: IntoBytes` is not satisfied
Expand Down
2 changes: 0 additions & 2 deletions zerocopy/tests/ui/transmute.stable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ note: required by a bound in `DST_NOT_FROM_BYTES::transmute`
| |
| required by a bound in this function
| required by this bound in `transmute`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `NotZerocopy<AU16>: IntoBytes` is not satisfied
Expand Down
4 changes: 0 additions & 4 deletions zerocopy/tests/ui/transmute_mut.nightly.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'
...
814 | Dst: FromBytes + IntoBytes,
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `DstB: IntoBytes` is not satisfied
Expand Down Expand Up @@ -158,8 +156,6 @@ note: required by a bound in `zerocopy::util::macro_util::Wrap::<&'a mut Src, &'
812 | where
813 | Src: FromBytes + IntoBytes,
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `SrcD: IntoBytes` is not satisfied
Expand Down
4 changes: 0 additions & 4 deletions zerocopy/tests/ui/transmute_mut.stable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
...
814 | Dst: FromBytes + IntoBytes,
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `DstB: IntoBytes` is not satisfied
Expand Down Expand Up @@ -158,8 +156,6 @@ note: required by a bound in `Wrap::<&'a mut Src, &'a mut Dst>::transmute_mut`
812 | where
813 | Src: FromBytes + IntoBytes,
| ^^^^^^^^^ required by this bound in `Wrap::<&mut Src, &mut Dst>::transmute_mut`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_mut` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `SrcD: IntoBytes` is not satisfied
Expand Down
8 changes: 0 additions & 8 deletions zerocopy/tests/ui/transmute_ref.nightly.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ note: required by a bound in `DST_NOT_FROM_BYTES::AssertDstIsFromBytes`
|
40 | const DST_NOT_FROM_BYTES: &DstA = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertDstIsFromBytes`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `DstB: Immutable` is not satisfied
Expand Down Expand Up @@ -142,8 +140,6 @@ note: required by a bound in `DST_NOT_IMMUTABLE::AssertDstIsImmutable`
|
48 | const DST_NOT_IMMUTABLE: &DstB = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertDstIsImmutable`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
Expand Down Expand Up @@ -309,8 +305,6 @@ note: required by a bound in `SRC_NOT_IMMUTABLE::AssertSrcIsImmutable`
|
79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsImmutable`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `SrcB: Immutable` is not satisfied
Expand Down Expand Up @@ -340,8 +334,6 @@ note: required by a bound in `SRC_NOT_IMMUTABLE::AssertSrcIsImmutable`
|
79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsImmutable`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: the method `transmute_ref` exists for struct `zerocopy::util::macro_util::Wrap<&[u8], &[u8; 1]>`, but its trait bounds were not satisfied
Expand Down
8 changes: 0 additions & 8 deletions zerocopy/tests/ui/transmute_ref.stable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ note: required by a bound in `DST_NOT_FROM_BYTES::AssertDstIsFromBytes`
|
40 | const DST_NOT_FROM_BYTES: &DstA = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertDstIsFromBytes`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `DstB: Immutable` is not satisfied
Expand Down Expand Up @@ -142,8 +140,6 @@ note: required by a bound in `DST_NOT_IMMUTABLE::AssertDstIsImmutable`
|
48 | const DST_NOT_IMMUTABLE: &DstB = transmute_ref!(&AU16(0));
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertDstIsImmutable`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
Expand Down Expand Up @@ -309,8 +305,6 @@ note: required by a bound in `SRC_NOT_IMMUTABLE::AssertSrcIsImmutable`
|
79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsImmutable`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `SrcB: Immutable` is not satisfied
Expand Down Expand Up @@ -340,8 +334,6 @@ note: required by a bound in `SRC_NOT_IMMUTABLE::AssertSrcIsImmutable`
|
79 | const SRC_NOT_IMMUTABLE: &AU16 = transmute_ref!(&SrcB(AU16(0)));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `AssertSrcIsImmutable`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `transmute_ref` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: the method `transmute_ref` exists for struct `Wrap<&[u8], &[u8; 1]>`, but its trait bounds were not satisfied
Expand Down
6 changes: 0 additions & 6 deletions zerocopy/tests/ui/try_transmute.nightly.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ note: required by a bound in `ValidityError`
|
590 | pub struct ValidityError<Src, Dst: ?Sized + TryFromBytes> {
| ^^^^^^^^^^^^ required by this bound in `ValidityError`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console

error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied
--> $DIR/try_transmute.rs:15:58
Expand Down Expand Up @@ -58,8 +56,6 @@ note: required by a bound in `zerocopy::util::macro_util::try_transmute`
...
528 | Dst: TryFromBytes,
| ^^^^^^^^^^^^ required by this bound in `try_transmute`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `NotZerocopy: TryFromBytes` is not satisfied
Expand Down Expand Up @@ -89,8 +85,6 @@ note: required by a bound in `ValidityError`
|
590 | pub struct ValidityError<Src, Dst: ?Sized + TryFromBytes> {
| ^^^^^^^^^^^^ required by this bound in `ValidityError`
= note: the full name for the type has been written to '/long-type-HASH.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: this error originates in the macro `try_transmute` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `NotZerocopy<AU16>: IntoBytes` is not satisfied
Expand Down
Loading
Loading