diff options
Diffstat (limited to 'src/test/ui/consts/recursive.rs')
-rw-r--r-- | src/test/ui/consts/recursive.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/consts/recursive.rs b/src/test/ui/consts/recursive.rs new file mode 100644 index 000000000..664940c52 --- /dev/null +++ b/src/test/ui/consts/recursive.rs @@ -0,0 +1,11 @@ +#![allow(unused)] + +const fn f<T>(x: T) { //~ WARN function cannot return without recursing + f(x); + //~^ ERROR any use of this value will cause an error + //~| WARN this was previously accepted by the compiler +} + +const X: () = f(1); + +fn main() {} |