Reinstate the error-code error over the feature gate error
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user