summary refs log tree commit diff
path: root/src/test/ui/issues/issue-8727.rs
blob: 473d237cd87c376ff548c51e20c4b85e3d97cdb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Verify the compiler fails with an error on infinite function
// recursions.

fn generic<T>() {
    generic::<Option<T>>();
}
//~^^^ ERROR reached the recursion limit while instantiating `generic::<std::option::Option<
//~| WARN function cannot return without recursing



fn main () {
    // Use generic<T> at least once to trigger instantiation.
    generic::<i32>();
}