about summary refs log tree commit diff
path: root/tests/ui/consts/recursive-const-in-impl.rs
blob: 93f7201f921f21069b6aebcb2307e677697afae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ 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!
}