7357cfbf3d
Allow unsafe through inline const Handle similar to closures. Address https://github.com/rust-lang/rust/pull/104087#issuecomment-1324173328 Note that this PR does not fix the issue for `unsafe { [0; function_requiring_unsafe()] }`. This is fundamentally unfixable for MIR unsafeck IMO. This PR also does not fix unsafety checking for inline const in pattern position. It actually breaks it, allowing unsafe functions to be used in inline const in pattern position without unsafe blocks. Inline const in pattern position is not visible in MIR so ignored by MIR unsafety checking (currently it is also not checked by borrow checker, which is the reason why it's considered an incomplete feature). `@rustbot` label: +T-lang +F-inline_const |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |