Files
rust/src/test/ui/const-generics/issues/issue-56445-1.rs

12 lines
410 B
Rust
Raw Normal View History

2020-07-26 18:54:24 +09:00
// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-518402995.
// revisions: full min
#![cfg_attr(full, feature(const_generics))] //[full]~WARN the feature `const_generics` is incomplete
2020-07-26 18:54:24 +09:00
#![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
impl Bug<'_, ""> {}