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

32 lines
1.1 KiB
Plaintext
Raw Normal View History

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