Reinstate the error-code error over the feature gate error

This commit is contained in:
oli 2020-12-30 17:20:38 +00:00
parent 4158e58d79
commit 3ed14033f7
13 changed files with 23 additions and 29 deletions

View file

@ -3,7 +3,6 @@ A borrow of a constant containing interior mutability was attempted.
Erroneous code example:
```compile_fail,E0492
#![feature(const_refs_to_cell)]
use std::sync::atomic::AtomicUsize;
const A: AtomicUsize = AtomicUsize::new(0);
@ -31,7 +30,6 @@ static B: &'static AtomicUsize = &A; // ok!
You can also have this error while using a cell type:
```compile_fail,E0492
#![feature(const_refs_to_cell)]
use std::cell::Cell;
const A: Cell<usize> = Cell::new(1);