Rollup merge of #113031 - JohnTitor:issue-110933, r=compiler-errors
Add a regression test for #110933 Closes #110933 r? `@compiler-errors`
This commit is contained in:
commit
d7723f4180
1 changed files with 20 additions and 0 deletions
20
tests/ui/associated-consts/issue-110933.rs
Normal file
20
tests/ui/associated-consts/issue-110933.rs
Normal file
|
@ -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() {}
|
Loading…
Add table
Add a link
Reference in a new issue