Files
rust/tests/ui/lowering/no-name-for-DefPath-issue-133426.stderr
Nicholas Nethercote af92a33dee Make synthetic RPITIT assoc ty name handling more rigorous.
Currently it relies on special treatment of `kw::Empty`, which is really
easy to get wrong. This commit makes the special case clearer in the
type system by using `Option`. It's a bit clumsy, but the synthetic name
handling itself is a bit clumsy; better to make it explicit than sneak
it in.

Fixes #133426.
2025-03-07 20:59:45 +11:00

32 lines
1.3 KiB
Plaintext

error[E0658]: associated const equality is incomplete
--> $DIR/no-name-for-DefPath-issue-133426.rs:16:23
|
LL | fn b(_: impl Iterator<Item = { match 0 { ! } }>) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
= help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0614]: type `!` cannot be dereferenced
--> $DIR/no-name-for-DefPath-issue-133426.rs:10:19
|
LL | match *todo!() { ! };
| ^^^^^^^^ can't be dereferenced
error: expected type, found constant
--> $DIR/no-name-for-DefPath-issue-133426.rs:16:30
|
LL | fn b(_: impl Iterator<Item = { match 0 { ! } }>) {}
| ---- ^^^^^^^^^^^^^^^^^ unexpected constant
| |
| expected a type because of this associated type
|
note: the associated type is defined here
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0614, E0658.
For more information about an error, try `rustc --explain E0614`.