Commit Graph

13 Commits

Author SHA1 Message Date
Matthew Jasper
dc3d428a8a Make THIR unused_unsafe lint consistent with MIR
Updates THIR behavior to match the changes from #93678
2023-10-25 10:10:13 +00:00
Matthew Jasper
5cc83fd4a5 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.
2023-10-16 15:57:59 +00:00
Oli Scherer
9c762b58ba Prevent promotion of const fn calls in inline consts 2023-09-21 09:00:22 +00:00
Oli Scherer
44e199bf30 Add regression test 2023-09-21 08:50:08 +00:00
Gary Guo
26fe88fedb Add a test to check that inline const is in required_consts
Suggested in
https://github.com/rust-lang/rust/issues/76001#issuecomment-1315975027
2023-08-18 17:07:07 +01:00
Michael Goulet
1f42be6f55 Deny FnDef in patterns 2023-08-15 04:03:04 +00:00
Michael Goulet
d8e3986d42 Don't use type_of to determine if item has intrinsic shim 2023-08-09 20:00:38 +00:00
Michael Goulet
719797949a Fix inline_const with interpolated block 2023-07-19 16:24:58 +00:00
Ziru Niu
e8c831a03b add inline-const test for elided lifetimes being infer vars 2023-06-01 02:28:31 +08:00
Eric Huss
a4e851cf62 Add some reasons why tests are ignored. 2023-04-15 16:11:42 -07:00
Camille GILLOT
05082f57af Perform match checking on THIR. 2023-04-03 15:59:21 +00:00
Esteban Küber
656db98bd9 Tweak E0597
CC #99430
2023-01-15 19:46:20 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00