Skip to content

Commit

Permalink
add error code
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Huss <[email protected]>
  • Loading branch information
dingxiangfei2009 and ehuss committed Oct 9, 2024
1 parent 0b8ced4 commit d8a53df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/const_eval.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const A_CONST: &'static u32 = allowed();

On the contrary, for example, `static mut` and types embedding an `UnsafeCell` is not allowed.

```rust,edition2021,compile_fail
```rust,edition2021,compile_fail,E0080
const fn not_allowed() -> &'static u32 {
static mut VALUE: u32 = 0;
&VALUE
Expand Down

0 comments on commit d8a53df

Please sign in to comment.