Skip to content

Commit 946cb11

Browse files
committed
add regression test for rust-lang#73120
1 parent de8d2e8 commit 946cb11

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#![feature(const_generics)]
2+
3+
// All of these three items must be in `lib2` to reproduce the error
4+
5+
pub trait TypeFn {
6+
type Output;
7+
}
8+
9+
pub struct GenericType<const B: i8>;
10+
11+
// Removing the braces around `42` resolves the crash
12+
impl TypeFn for GenericType<{ 42 }> {
13+
type Output = ();
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// check-pass
2+
// aux-build:const_generic_issues_lib.rs
3+
extern crate const_generic_issues_lib as lib2;
4+
fn unused_function(
5+
_: <lib2::GenericType<42> as lib2::TypeFn>::Output
6+
) {}
7+
8+
fn main() {}

0 commit comments

Comments
 (0)