rust/tests/ui/const-generics/issues/issue-56445-1.rs
Esteban Küber 30cf7a3f51 Introduce ReError
CC #69314
2023-02-09 10:26:49 +00:00

14 lines
480 B
Rust

// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-518402995.
// revisions: full min
#![cfg_attr(full, feature(adt_const_params))]
#![cfg_attr(full, allow(incomplete_features))]
#![crate_type = "lib"]
use std::marker::PhantomData;
struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
//~^ ERROR: use of non-static lifetime `'a` in const generic
//[min]~| ERROR: `&str` is forbidden as the type of a const generic parameter
impl Bug<'_, ""> {}