rust/tests/ui/const-generics/issues/issue-86530.rs
2023-01-11 09:32:08 +00:00

21 lines
263 B
Rust

#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
pub trait X {
const Y: usize;
}
fn z<T>(t: T)
where
T: X,
[(); T::Y]: ,
{
}
fn unit_literals() {
z(" ");
//~^ ERROR: the trait bound `&str: X` is not satisfied
}
fn main() {}