Split part of adt_const_params
into unsized_const_params
This commit is contained in:
parent
42cc42b942
commit
d0c11bf6e3
140 changed files with 1130 additions and 559 deletions
|
@ -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!
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue