add test for const generic ty's with lifetimes cause opaque types to ICE
Fixes https://github.com/rust-lang/rust/issues/111911
This commit is contained in:
parent
f483971b87
commit
bb4769532b
@ -0,0 +1,13 @@
|
||||
//@ edition:2021
|
||||
// issues rust-lang/rust#111911
|
||||
// test for ICE opaque type with non-universal region substs
|
||||
|
||||
#![feature(adt_const_params)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
pub async fn foo<const X: &'static str>() {}
|
||||
//~^ ERROR const parameter `X` is part of concrete type but not used in parameter list for the `impl Trait` type alias
|
||||
//~| ERROR const parameter `X` is part of concrete type but not used in parameter list for the `impl Trait` type alias
|
||||
fn bar<const N: &'static u8>() -> impl Sized {}
|
||||
|
||||
pub fn main() {}
|
@ -0,0 +1,16 @@
|
||||
error: const parameter `X` is part of concrete type but not used in parameter list for the `impl Trait` type alias
|
||||
--> $DIR/opaque_type_with_non-universal_region_substs_ice-111911.rs:8:43
|
||||
|
|
||||
LL | pub async fn foo<const X: &'static str>() {}
|
||||
| ^^
|
||||
|
||||
error: const parameter `X` is part of concrete type but not used in parameter list for the `impl Trait` type alias
|
||||
--> $DIR/opaque_type_with_non-universal_region_substs_ice-111911.rs:8:43
|
||||
|
|
||||
LL | pub async fn foo<const X: &'static str>() {}
|
||||
| ^^
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
Loading…
Reference in New Issue
Block a user