mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 20:23:59 +00:00
add regression test for #73120
This commit is contained in:
parent
de8d2e897f
commit
946cb11a1e
@ -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 = ();
|
||||
}
|
8
src/test/ui/const-generics/issues/issue-73120.rs
Normal file
8
src/test/ui/const-generics/issues/issue-73120.rs
Normal 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() {}
|
Loading…
Reference in New Issue
Block a user