Split part of adt_const_params into unsized_const_params
This commit is contained in:
@@ -6,7 +6,7 @@ allowed.
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0770
|
||||
#![feature(adt_const_params)]
|
||||
#![feature(adt_const_params, unsized_const_params)]
|
||||
|
||||
fn function_with_str<'a, const STRING: &'a str>() {} // error!
|
||||
```
|
||||
@@ -15,7 +15,7 @@ To fix this issue, the lifetime in the const generic need to be changed to
|
||||
`'static`:
|
||||
|
||||
```
|
||||
#![feature(adt_const_params)]
|
||||
#![feature(adt_const_params, unsized_const_params)]
|
||||
|
||||
fn function_with_str<const STRING: &'static str>() {} // ok!
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user