rust/tests/ui/const-generics/issues/issue-86530.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
263 B
Rust
Raw Normal View History

2021-09-02 15:20:51 -05:00
#![feature(generic_const_exprs)]
2021-09-02 15:30:13 -05:00
#![allow(incomplete_features)]
2021-09-02 15:20:51 -05:00
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() {}