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.

32 lines
1.1 KiB
Plaintext
Raw Normal View History

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