]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issues/issue-56445-1.rs
Rollup merge of #96129 - mattheww:2022-04_float_rounding, r=Dylan-DPC
[rust.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<'_, ""> {}