From 421105b4537c9671580c45ce9d952982cb074954 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 25 Jun 2023 23:03:22 +0900 Subject: [PATCH] Add a regression test for #110933 Signed-off-by: Yuki Okushi --- tests/ui/associated-consts/issue-110933.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/ui/associated-consts/issue-110933.rs diff --git a/tests/ui/associated-consts/issue-110933.rs b/tests/ui/associated-consts/issue-110933.rs new file mode 100644 index 00000000000..aa4882ae535 --- /dev/null +++ b/tests/ui/associated-consts/issue-110933.rs @@ -0,0 +1,20 @@ +// check-pass + +#![feature(associated_const_equality)] + +pub trait Trait { + const ASSOC: usize; +} + +pub fn foo< + T: Trait< + ASSOC = { + let a = 10_usize; + let b: &'_ usize = &a; + *b + }, + >, +>() { +} + +fn main() {}