rust/tests/ui/consts/miri_unleashed/assoc_const_2.stderr
Ralf Jung 9ac8b363e3 don't point at const usage site for resolution-time errors
also share the code that emits the actual error
2023-09-14 22:34:05 +02:00

22 lines
676 B
Plaintext

error[E0080]: evaluation of `<std::string::String as Bar<std::string::String>>::F` failed
--> $DIR/assoc_const_2.rs:10:20
|
LL | const F: u32 = 100 / U::X;
| ^^^^^^^^^^ attempt to divide `100_u32` by zero
note: erroneous constant encountered
--> $DIR/assoc_const_2.rs:27:13
|
LL | let y = <String as Bar<String>>::F;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: erroneous constant encountered
--> $DIR/assoc_const_2.rs:27:13
|
LL | let y = <String as Bar<String>>::F;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0080`.