Gary Guo
cfee72aa24
Fix tests and bless
2024-04-24 13:12:33 +01:00
Ralf Jung
48f2f0d725
preserve span when evaluating mir::ConstOperand
2024-03-14 21:55:07 +01:00
Ralf Jung
c1d0e489e5
fix use of platform_intrinsics in tests
2024-02-25 08:15:44 +01:00
许杰友 Jieyou Xu (Joe)
ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from //
to //@
directives
2024-02-16 20:02:50 +00:00
Matthew Jasper
4feec41e05
#![feature(inline_const_pat)]
is no longer incomplete
2024-02-01 10:27:54 +00:00
Matthew Jasper
44824e0bce
Enable tests for unsafe blocks in inline const patterns
2024-01-29 09:17:00 +00:00
Matthew Jasper
83fa46fe5b
Borrow check inline const patterns
...
Add type annotations to MIR so that borrowck can pass constraints from
inline constants in patterns to the containing function.
2024-01-29 09:17:00 +00:00
Matthew Jasper
26f48b4cba
Stabilize THIR unsafeck
2024-01-05 10:00:59 +00:00
Matthew Jasper
982b49494e
Remove revisions for THIR unsafeck
...
This is to make the diff when stabilizing it easier to review.
2024-01-05 09:30:27 +00:00
Nilstrieb
41e8d152dc
Show number in error message even for one error
...
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
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