Rollup merge of #117556 - obeis:static-mut-ref-lint, r=davidtwco
Disallow reference to `static mut` and adding `static_mut_ref` lint Closes #114447 r? `@scottmcm`
This commit is contained in:
commit
18e12dcf6b
@ -111,6 +111,9 @@ fn start<T: Termination + 'static>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static mut NUM: u8 = 6 * 7;
|
static mut NUM: u8 = 6 * 7;
|
||||||
|
|
||||||
|
// FIXME: Use `SyncUnsafeCell` instead of allowing `static_mut_ref` lint
|
||||||
|
#[allow(static_mut_ref)]
|
||||||
static NUM_REF: &'static u8 = unsafe { &NUM };
|
static NUM_REF: &'static u8 = unsafe { &NUM };
|
||||||
|
|
||||||
unsafe fn zeroed<T>() -> T {
|
unsafe fn zeroed<T>() -> T {
|
||||||
|
Loading…
Reference in New Issue
Block a user