about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2023-10-05 14:57:14 +0000
committerMatthew Jasper <mjjasper1@gmail.com>2023-10-16 15:57:59 +0000
commit5cc83fd4a5fb4860f67cf0b92b41c1aa9f87a54b (patch)
tree19a25efe92001a7c5adf562cf6de693f5d6de02f /compiler/rustc_mir_transform/src
parente7bdc5f9f869219e8d20060b42a09ea10a837851 (diff)
downloadrust-5cc83fd4a5fb4860f67cf0b92b41c1aa9f87a54b.tar.gz
rust-5cc83fd4a5fb4860f67cf0b92b41c1aa9f87a54b.zip
Fix inline const pattern unsafety checking in THIR
THIR unsafety checking was getting a cycle of
function unsafety checking
-> building THIR for the function
-> evaluating pattern inline constants in the function
-> building MIR for the inline constant
-> checking unsafety of functions (so that THIR can be stolen)
This is fixed by not stealing THIR when generating MIR but instead when
unsafety checking.
This leaves an issue with pattern inline constants not being unsafety
checked because they are evaluated away when generating THIR.
To fix that we now represent inline constants in THIR patterns and
visit them in THIR unsafety checking.
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions