mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-02 21:17:39 +00:00
13 lines
225 B
Rust
13 lines
225 B
Rust
![]() |
//@ build-fail
|
||
|
#![recursion_limit = "7"]
|
||
|
|
||
|
struct Thing<T>(T);
|
||
|
|
||
|
impl<T> Thing<T> {
|
||
|
const X: usize = Thing::<Option<T>>::X;
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
println!("{}", Thing::<i32>::X); //~ ERROR: queries overflow the depth limit!
|
||
|
}
|