]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-8727.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.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 }