about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-13 19:57:09 +0100
committerGitHub <noreply@github.com>2022-12-13 19:57:09 +0100
commit7357cfbf3d6f0162fbe24fee34e027ecabeb58ca (patch)
tree319e1c6cb03f2fa4120fae11d341fba2d9cd2de0 /compiler/rustc_parse/src/errors.rs
parentaa5b179599427ef233c4e47db8dac6edae22b4f8 (diff)
parentd6dc9124b7b814c2c5c35aa6295ea5e54071daac (diff)
downloadrust-7357cfbf3d6f0162fbe24fee34e027ecabeb58ca.tar.gz
rust-7357cfbf3d6f0162fbe24fee34e027ecabeb58ca.zip
Rollup merge of #105147 - nbdd0121:inline_const_unsafe, r=oli-obk
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
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions