// Elided lifetimes within the type of a const generic parameters is disallowed. This matches the // behaviour of trait bounds where `fn foo>() {}` is illegal. Though we could change // elided lifetimes within the type of a const generic parameters to be 'static, like elided // lifetimes within const/static items. #![feature(const_generics)] //~^ WARN the feature `const_generics` is incomplete struct A; //~^ ERROR `&` without an explicit lifetime name cannot be used here trait B {} impl A { //~ ERROR `&` without an explicit lifetime name cannot be used here fn foo(&self) {} //~^ ERROR `&` without an explicit lifetime name cannot be used here } impl B for A {} //~^ ERROR `&` without an explicit lifetime name cannot be used here fn bar() {} //~^ ERROR `&` without an explicit lifetime name cannot be used here fn main() {}