summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/issues/issue-56445-1.rs
blob: 13eb2ea9f69d508ae164189ecf09b0d4380322fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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: `&'static str` is forbidden as the type of a const generic parameter

impl Bug<'_, ""> {}