rust/tests/ui/associated-consts/defaults-not-assumed-fail.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.5 KiB
Plaintext
Raw Normal View History

2022-09-21 11:05:20 +00:00
error[E0080]: evaluation of `<() as Tr>::B` failed
2019-06-13 22:03:32 +00:00
--> $DIR/defaults-not-assumed-fail.rs:8:19
|
LL | const B: u8 = Self::A + 1;
2022-09-21 11:05:20 +00:00
| ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow
2019-06-13 22:03:32 +00:00
note: erroneous constant encountered
2022-09-21 11:05:20 +00:00
--> $DIR/defaults-not-assumed-fail.rs:33:16
2019-06-13 22:03:32 +00:00
|
LL | assert_eq!(<() as Tr>::B, 0); // causes the error above
| ^^^^^^^^^^^^^
2019-06-13 22:03:32 +00:00
note: erroneous constant encountered
--> $DIR/defaults-not-assumed-fail.rs:33:16
|
LL | assert_eq!(<() as Tr>::B, 0); // causes the error above
| ^^^^^^^^^^^^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
note: erroneous constant encountered
2022-09-21 11:05:20 +00:00
--> $DIR/defaults-not-assumed-fail.rs:33:5
2020-02-15 11:33:39 +00:00
|
LL | assert_eq!(<() as Tr>::B, 0); // causes the error above
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-02-15 11:33:39 +00:00
|
= note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
2020-02-15 11:33:39 +00:00
note: erroneous constant encountered
--> $DIR/defaults-not-assumed-fail.rs:33:5
|
LL | assert_eq!(<() as Tr>::B, 0); // causes the error above
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-10-04 18:34:50 +00:00
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
= note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 1 previous error
2019-06-13 22:03:32 +00:00
For more information about this error, try `rustc --explain E0080`.