]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/promotion.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / 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 }