1
Fork 0

Split part of adt_const_params into unsized_const_params

This commit is contained in:
Boxy 2024-07-14 13:38:51 +01:00 committed by Boxy
parent 42cc42b942
commit d0c11bf6e3
140 changed files with 1130 additions and 559 deletions

View file

@ -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!
```