This has been put in place to patch over an ICE caused when we encounter a non-static lifetime in a const generic during borrow checking. This restriction may be relaxed in the future, but we need more discussion before then, and in the meantime we should still deal with this ICE. Fixes issue #60814
8 lines
209 B
Rust
8 lines
209 B
Rust
#![feature(const_generics)]
|
|
//~^ WARN the feature `const_generics` is incomplete
|
|
|
|
fn function_with_str<'a, const STRING: &'a str>() {} //~ ERROR E0771
|
|
|
|
fn main() {
|
|
function_with_str::<"Hello, world!">()
|
|
}
|