]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/issues/issue-66205.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / const-generics / issues / issue-66205.rs
1 // revisions: full min
2 #![cfg_attr(full, feature(const_generics))]
3 #![cfg_attr(full, allow(incomplete_features))]
4 #![cfg_attr(min, feature(min_const_generics))]
5 #![allow(dead_code, unconditional_recursion)]
6
7 fn fact<const N: usize>() {
8 fact::<{ N - 1 }>();
9 //[full]~^ ERROR constant expression depends on a generic parameter
10 //[min]~^^ ERROR generic parameters must not be used inside of non trivial constant values
11 }
12
13 fn main() {}