Skip to content

Commit 1309d08

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

5 files changed

Lines changed: 5 additions & 5 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/cyclic-type-const-151251.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
#![expect(incomplete_features)]
66

77
type const A: u8 = A;
8-
//~^ ERROR overflow normalizing the unevaluated constant `A`
8+
//~^ ERROR overflow normalizing the alias const `A`
99

1010
fn main() {}

tests/ui/const-generics/mgca/cyclic-type-const-151251.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/cyclic-type-const-151251.rs:7:1
33
|
44
LL | type const A: u8 = A;

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)