add regression test for #73120

This commit is contained in:
Bastian Kauschke 2020-07-16 12:32:43 +02:00
parent de8d2e897f
commit 946cb11a1e
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#![feature(const_generics)]
// All of these three items must be in `lib2` to reproduce the error
pub trait TypeFn {
type Output;
}
pub struct GenericType<const B: i8>;
// Removing the braces around `42` resolves the crash
impl TypeFn for GenericType<{ 42 }> {
type Output = ();
}

View File

@ -0,0 +1,8 @@
// check-pass
// aux-build:const_generic_issues_lib.rs
extern crate const_generic_issues_lib as lib2;
fn unused_function(
_: <lib2::GenericType<42> as lib2::TypeFn>::Output
) {}
fn main() {}