From a911452787269051dc17fdd84aa94276a877a3a9 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 8 May 2022 11:27:43 +0900 Subject: [PATCH 1/2] Add regression test for #96654 --- src/test/ui/const-generics/issues/issue-96654.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/ui/const-generics/issues/issue-96654.rs 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() {} From 2c9074b78ae48a8a4d45c03305fd190cee4c50d9 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 8 May 2022 11:28:18 +0900 Subject: [PATCH 2/2] Correct the issue number of a test --- .../const-generics/issues/{issue-775377.rs => issue-77357.rs} | 0 .../issues/{issue-775377.stderr => issue-77357.stderr} | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/test/ui/const-generics/issues/{issue-775377.rs => issue-77357.rs} (100%) rename src/test/ui/const-generics/issues/{issue-775377.stderr => issue-77357.stderr} (92%) 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