]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/promotion.rs
Move generic error message to separate branches
[rust.git] / src / test / ui / const-generics / promotion.rs
1 // run-pass
2 // tests that promoting expressions containing const parameters is allowed.
3 fn promotion_test<const N: usize>() -> &'static usize {
4     &(3 + N)
5 }
6
7 fn main() {
8     assert_eq!(promotion_test::<13>(), &16);
9 }