mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
21 lines
263 B
Rust
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() {}
|