2020-07-26 04:54:24 -05:00
|
|
|
// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-518402995.
|
2020-08-06 15:57:09 -05:00
|
|
|
// revisions: full min
|
2021-08-30 03:59:53 -05:00
|
|
|
#![cfg_attr(full, feature(adt_const_params))]
|
2021-08-27 11:04:57 -05:00
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
2020-07-26 04:54:24 -05:00
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
use std::marker::PhantomData;
|
|
|
|
|
|
|
|
struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
|
2023-05-05 15:42:51 -05:00
|
|
|
//~^ ERROR: the type of const parameters must not depend on other generic parameters
|
2023-02-03 17:21:56 -06:00
|
|
|
//[min]~| ERROR: `&str` is forbidden as the type of a const generic parameter
|
2020-07-26 04:54:24 -05:00
|
|
|
|
|
|
|
impl Bug<'_, ""> {}
|