diff --git a/tests/ui/associated-consts/issue-110933.rs b/tests/ui/associated-consts/issue-110933.rs new file mode 100644 index 0000000000000..aa4882ae53577 --- /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() {}