]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/promotion.rs
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[rust.git] / src / test / ui / const-generics / promotion.rs
1 // run-pass
2 // tests that promoting expressions containing const parameters is allowed.
3 #![feature(min_const_generics)]
4
5 fn promotion_test<const N: usize>() -> &'static usize {
6     &(3 + N)
7 }
8
9 fn main() {
10     assert_eq!(promotion_test::<13>(), &16);
11 }