Skip to content

Commit 9195cf1

Browse files
Add regression test for #114217
1 parent e6a1069 commit 9195cf1

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/114217>.
2+
// It ensures that enabling the lazy_type_alias` feature doesn't prevent
3+
// const generics to work with type aliases.
4+
5+
// compile-flags: --crate-type lib
6+
// check-pass
7+
8+
#![feature(lazy_type_alias)]
9+
//~^ WARN the feature `lazy_type_alias` is incomplete and may not be safe to use
10+
11+
pub type Word = usize;
12+
13+
pub struct IBig(usize);
14+
15+
pub const fn base_as_ibig<const B: Word>() -> IBig {
16+
IBig(B)
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/issue-114217-const-generic.rs:8:12
3+
|
4+
LL | #![feature(lazy_type_alias)]
5+
| ^^^^^^^^^^^^^^^
6+
|
7+
= note: see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
8+
= note: `#[warn(incomplete_features)]` on by default
9+
10+
warning: 1 warning emitted
11+

0 commit comments

Comments
 (0)