]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/issues/issue-56445-1.rs
Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514
[rust.git] / tests / ui / const-generics / issues / issue-56445-1.rs
1 // Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-518402995.
2 // revisions: full min
3 #![cfg_attr(full, feature(adt_const_params))]
4 #![cfg_attr(full, allow(incomplete_features))]
5 #![crate_type = "lib"]
6
7 use std::marker::PhantomData;
8
9 struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
10 //~^ ERROR: use of non-static lifetime `'a` in const generic
11 //[min]~| ERROR: `&'static str` is forbidden as the type of a const generic parameter
12
13 impl Bug<'_, ""> {}