Skip to content

Commit 9f77834

Browse files
committed
Correct the type_const_recursive error message to be not vague
1 parent 21f2cb9 commit 9f77834

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

compiler/rustc_type_ir/src/predicate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ impl<I: Interner> AliasTermKind<I> {
595595
AliasTermKind::InherentConst { .. } => "inherent associated const",
596596
AliasTermKind::OpaqueTy { .. } => "opaque type",
597597
AliasTermKind::FreeTy { .. } => "type alias",
598-
AliasTermKind::FreeConst { .. } => "constant",
598+
AliasTermKind::FreeConst { .. } => "alias const",
599599
AliasTermKind::AnonConst { .. } => "anonymous constant",
600600
}
601601
}

tests/ui/const-generics/mgca/type_const-recursive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44

55
type const A: u8 = A;
6-
//~^ ERROR: overflow normalizing the unevaluated constant `A` [E0275]
6+
//~^ ERROR: overflow normalizing the alias const `A` [E0275]
77

88
fn main() {}

tests/ui/const-generics/mgca/type_const-recursive.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0275]: overflow normalizing the unevaluated constant `A`
1+
error[E0275]: overflow normalizing the alias const `A`
22
--> $DIR/type_const-recursive.rs:5:1
33
|
44
LL | type const A: u8 = A;

0 commit comments

Comments
 (0)