Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxyUwU committed Jul 16, 2024
1 parent a7b5a0f commit f5e699c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_error_codes/src/error_codes/E0771.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
```
Expand All @@ -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!
```
Expand Down

0 comments on commit f5e699c

Please sign in to comment.