]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/issues/issue-56445-1.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / 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<'_, ""> {}