Ben Kimock
950437a035
Use a reduced recursion limit in the MIR inliner's cycle breaker
2024-08-28 19:52:23 -04:00
Michael Goulet
4609841c07
Stop using a special inner body for the coroutine by-move body for async closures
2024-08-26 18:44:19 -04:00
Nicholas Nethercote
84ac80f192
Reformat use
declarations.
...
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
Michael Goulet
b1059ccda2
Instance::resolve -> Instance::try_resolve, and other nits
2024-07-02 17:28:03 -04:00
Michael Goulet
342c1b03d6
Rename InstanceDef -> InstanceKind
2024-06-16 21:35:21 -04:00
zetanumbers
24a24ec6ba
Add simple async drop glue generation
...
Explainer: https://zetanumbers.github.io/book/async-drop-design.html
https://github.com/rust-lang/rust/pull/121801
2024-04-16 20:45:07 +03:00
bors
c0ddaef075
Auto merge of #123444 - saethlin:const-eval-inline-cycles, r=tmiasko
...
Teach MIR inliner query cycle avoidance about const_eval_select
Fixes https://github.com/rust-lang/rust/issues/122659
r? tmiasko
2024-04-05 04:34:05 +00:00
Ben Kimock
b0b7c860e1
Teach MIR inliner query cycle avoidance about const_eval_select
2024-04-04 00:10:52 -04:00
Matthew Maurer
6aa89f684e
Track reason for creating a ReifyShim
...
KCFI needs to be able to tell which kind of `ReifyShim` it is examining
in order to decide whether to use a concrete type (`FnPtr` case) or an
abstract case (`Vtable` case). You can *almost* tell this from context,
but there is one case where you can't - if a trait has a method which is
*not* `#[track_caller]`, with an impl that *is* `#[track_caller]`, both
the vtable and a function pointer created from that method will be
`ReifyShim(def_id)`.
Currently, the reason is optional to ensure no additional unique
`ReifyShim`s are added without KCFI on. However, the case in which an
extra `ReifyShim` is created is sufficiently rare that this may be worth
revisiting to reduce complexity.
2024-04-02 19:11:16 +00:00
Shoyu Vanilla
3856df059e
Dejargnonize subst
2024-02-12 15:46:35 +09:00
Michael Goulet
ca44416023
Fix drop shim for AsyncFnOnce closure, AsyncFnMut shim for AsyncFn closure
2024-02-06 02:22:58 +00:00
Michael Goulet
427896dd7e
Construct body for by-move coroutine closure output
2024-02-06 02:22:58 +00:00
Michael Goulet
fc4fff4038
Build a shim to call async closures with different AsyncFn trait kinds
2024-02-06 02:22:58 +00:00
lcnr
3c52a3e280
subst -> instantiate
2023-09-26 09:37:55 +02:00
Mahdi Dibaiee
e55583c4b8
refactor(rustc_middle): Substs -> GenericArg
2023-07-14 13:27:35 +01:00
lcnr
08d149ca85
EarlyBinder::new -> EarlyBinder::bind
2023-05-29 13:46:10 +02:00
Kyle Matsuda
03534ac8b7
Replace EarlyBinder(x) with EarlyBinder::new(x)
2023-05-28 10:44:50 -06:00
Kyle Matsuda
82f57c16b7
use EarlyBinder in tcx.(try_)subst_mir_and_normalize_erasing_regions
2023-05-06 22:32:39 -06:00
Boxy
842419712a
rename needs_subst
to has_param
2023-04-27 08:35:19 +01:00
Oli Scherer
1ce80e210d
Allow LocalDefId
as the argument to def_path_str
2023-04-21 22:27:20 +00:00
Camille GILLOT
b275d2c30b
Remove WithOptconstParam.
2023-04-20 17:48:32 +00:00
John Kåre Alsaker
0d89c6a2d4
Support TLS access into dylibs on Windows
2023-03-29 08:55:21 +02:00
lcnr
0c13565ca6
Add a builtin FnPtr
trait
2023-03-27 12:16:54 +00:00
Alan Egerton
695072daa6
Remove type-traversal trait aliases
2023-02-22 17:04:58 +00:00
Tomasz Miąsko
b48870b451
Replace Body::basic_blocks()
with field access
2022-08-26 14:27:08 +02:00
Ralf Jung
3dad266f40
consistently use VTable over Vtable (matching stable stdlib API RawWakerVTable)
2022-07-20 17:12:07 -04:00
Alan Egerton
4f0a64736b
Update TypeVisitor paths
2022-07-06 06:41:53 +01:00
Camille GILLOT
2e45cd4b69
Do not ICE when failing to resolve.
2022-06-30 21:45:29 +02:00
Jacob Pratt
49c82f31a8
Remove crate
visibility usage in compiler
2022-05-20 20:04:54 -04:00
Oli Scherer
e02129fec0
Use IndexSet for deterministic order
2022-05-12 10:03:41 +00:00
Oli Scherer
af0a464311
Gracefully handle normalization failures in the prospective inliner cycle detector
2022-05-12 08:22:36 +00:00
Yuri Astrakhan
5160f8f843
Spellchecking compiler comments
...
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-30 15:14:15 -04:00
est31
2ef8af6619
Adopt let else in more places
2022-02-19 17:27:43 +01:00
Ellen
71bbb603f4
initial revert
2022-01-15 01:16:55 +00:00
Scott McMurray
a124924061
Remove in_band_lifetimes
from rustc_mir_transform
...
This one is a heavy `'tcx` user.
Two interesting ones:
This one had the `'tcx` declared on the function, despite the trait taking a `'tcx`:
```diff
-impl Visitor<'_> for UsedLocals {
+impl<'tcx> Visitor<'tcx> for UsedLocals {
fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) {
```
This one use in-band for one, and underscore for the other:
```diff
-pub fn remove_dead_blocks(tcx: TyCtxt<'tcx>, body: &mut Body<'_>) {
+pub fn remove_dead_blocks<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
```
2021-12-07 21:04:40 -08:00
Camille GILLOT
bba4be681d
Move rustc_mir::transform to rustc_mir_transform.
2021-09-07 00:43:14 +02:00