]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-8727.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / issues / issue-8727.rs
1 // Verify the compiler fails with an error on infinite function
2 // recursions.
3
4 // build-fail
5 // normalize-stderr-test: ".nll/" -> "/"
6
7 fn generic<T>() { //~ WARN function cannot return without recursing
8     generic::<Option<T>>();
9 }
10 //~^^ ERROR reached the recursion limit while instantiating `generic::<Option<
11
12
13 fn main () {
14     // Use generic<T> at least once to trigger instantiation.
15     generic::<i32>();
16 }