diff --git a/src/test/ui/const-generics/issues/issue-775377.rs b/src/test/ui/const-generics/issues/issue-77357.rs similarity index 100% rename from src/test/ui/const-generics/issues/issue-775377.rs rename to src/test/ui/const-generics/issues/issue-77357.rs diff --git a/src/test/ui/const-generics/issues/issue-775377.stderr b/src/test/ui/const-generics/issues/issue-77357.stderr similarity index 92% rename from src/test/ui/const-generics/issues/issue-775377.stderr rename to src/test/ui/const-generics/issues/issue-77357.stderr index 83946df4203d8..804c0ae5175a8 100644 --- a/src/test/ui/const-generics/issues/issue-775377.stderr +++ b/src/test/ui/const-generics/issues/issue-77357.stderr @@ -1,5 +1,5 @@ error: overly complex generic constant - --> $DIR/issue-775377.rs:6:46 + --> $DIR/issue-77357.rs:6:46 | LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> { | ^^^^^^^^^^^^^^^^^^^^^^^^^ blocks are not supported in generic constant diff --git a/src/test/ui/const-generics/issues/issue-96654.rs b/src/test/ui/const-generics/issues/issue-96654.rs new file mode 100644 index 0000000000000..8cf786dbe40bf --- /dev/null +++ b/src/test/ui/const-generics/issues/issue-96654.rs @@ -0,0 +1,15 @@ +// check-pass + +struct A {} + +struct B {} + +impl B { + const M: u32 = M; +} + +struct C { + a: A<{ B::<1>::M }>, +} + +fn main() {}