Michael Goulet
897acc3e5d
Encode synthetic by-move coroutine body with a different DefPathData
2025-03-30 22:53:21 +00:00
Ben Kimock
4cf21866e8
Move hashes from rustc_data_structure to rustc_hashes so they can be shared with rust-analyzer
2025-02-16 16:18:30 -05:00
Lukas Markeffsky
10fc0b159e
introduce ty::Value
...
Co-authored-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
2025-01-30 17:47:44 +01:00
Michael Goulet
faafa5c310
Fix legacy symbol mangling of closures
2025-01-14 16:33:03 +00:00
Michael Goulet
39daadc76e
Account for identity substituted items in symbol mangling
2025-01-09 13:55:40 +01:00
Michael Goulet
86d8b79d0d
Use a post-monomorphization typing env when mangling components that come from impls
2025-01-06 06:11:15 +00:00
Oli Scherer
9ecdc54d82
Try to evaluate constants in legacy mangling
2024-12-10 09:16:34 +00: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
90143b0be8
Fix FnMut/Fn shim for coroutine-closures that capture references
2024-06-29 17:38:02 -04:00
Michael Goulet
342c1b03d6
Rename InstanceDef -> InstanceKind
2024-06-16 21:35:21 -04:00
Boxy
a9702a6668
Add Ty to ConstKind::Value
2024-06-05 22:25:41 +01:00
Boxy
58feec9b85
Basic removal of Ty from places (boring)
2024-06-05 22:25:38 +01:00
Nicholas Nethercote
6341935a13
Remove extern crate tracing from numerous crates.
2024-04-30 16:47:49 +10:00
Nicholas Nethercote
99e036bd21
Remove extern crate rustc_middle from numerous crates.
2024-04-29 14:50:45 +10: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
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
Michael Goulet
05116c5c30
Only split by-ref/by-move futures for async closures
2024-03-19 16:59:23 -04: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
c567eddec2
Add CoroutineClosure to TyKind, AggregateKind, UpvarArgs
2024-02-06 02:22:58 +00:00
Michael Goulet
fcb42b42d6
Remove movability from TyKind::Coroutine
2023-12-28 16:35:01 +00:00
jyn
b5d8361909
rename to verbose-internals
2023-12-19 13:35:37 -05:00
Deadbeef
d1f4bc5a19
Revert "Don't print host effect param in pretty path_generic_args"
...
This reverts commit f1bf874fb13703d706fc8184407c6df12555d8e9.
2023-12-10 10:17:28 +00:00
Michael Goulet
f1bf874fb1
Don't print host effect param in pretty path_generic_args
2023-12-09 17:42:33 +00:00
Nicholas Nethercote
aefbb616af
Remove -Zperf-stats.
...
The included measurements have varied over the years. At one point there
were quite a few more, but #49558 deleted a lot that were no longer
used. Today there's just four, and it's a motley collection that doesn't
seem particularly valuable.
I think it has been well and truly subsumed by self-profiling, which
collects way more data.
2023-11-13 09:45:20 +11:00
Nilstrieb
5acf26b97e
Make ty::print::Printer take &mut self instead of self
...
This simplifies the code by removing all the `self` assignments and
makes the flow of data clearer - always into the printer.
Especially in v0 mangling, which already used `&mut self` in some
places, it gets a lot more uniform.
2023-10-21 11:33:05 +02:00
Oli Scherer
60956837cf
s/Generator/Coroutine/
2023-10-20 21:10:38 +00:00
Nilstrieb
6fc6a6d783
Remove Print::Error
...
All printing goes through `fmt::Error` now.
2023-10-17 18:02:57 +02:00
Nilstrieb
6038888118
Remove Printer::Error
...
It's always a `fmt::Error` except in some cases where it was `!`, but
we're not really winning anything in that case.
2023-10-17 18:02:55 +02:00
Nilstrieb
0b5a4c1adf
Remove Print::Output
...
Now that `Printer` doesn't have subprinters anymore, the output of a
printing operation is always the same.
2023-10-17 18:01:07 +02:00
Nilstrieb
3895f0e9af
Remove "subprinter" types from Printer
...
These are `Self` in almost all printers except one, which can just store
the state as a field instead. This simplifies the printer and allows for
further simplifications, for example using `&mut self` instead of
passing around the printer.
2023-10-17 18:01:05 +02:00
Ralf Jung
11a4a24d8e
make the set of methods between our two Const types more consistent
2023-09-13 07:29:34 +02:00
Mahdi Dibaiee
e55583c4b8
refactor(rustc_middle): Substs -> GenericArg
2023-07-14 13:27:35 +01:00
Boxy
62174bfe72
Deal with fallout
2023-07-05 09:46:30 +01:00
León Orell Valerian Liehr
778abc7a00
properly pretty-print inherent projections
2023-05-22 22:39:45 +02:00
Boxy
842419712a
rename needs_subst to has_param
2023-04-27 08:35:19 +01:00
Ben Kimock
0445fbdd83
Store hashes in special types so they aren't accidentally encoded as numbers
2023-04-18 10:52:47 -04:00
John Kåre Alsaker
0d89c6a2d4
Support TLS access into dylibs on Windows
2023-03-29 08:55:21 +02:00
Alan Egerton
695072daa6
Remove type-traversal trait aliases
2023-02-22 17:04:58 +00:00
Kyle Matsuda
c183110cc2
remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata
2023-02-16 17:05:56 -07:00
Kyle Matsuda
d822b97a27
change usages of type_of to bound_type_of
2023-02-16 17:01:52 -07:00
nils
fd7a159710
Fix uninlined_format_args for some compiler crates
...
Convert all the crates that have had their diagnostic migration
completed (except save_analysis because that will be deleted soon and
apfloat because of the licensing problem).
2023-01-05 19:01:12 +01:00
Oli Scherer
a5cd3bde95
Ensure no one constructs AliasTys themselves
2022-12-14 15:36:39 +00:00
Michael Goulet
96cb18e864
Combine identical alias arms
2022-12-13 17:48:55 +00:00
Michael Goulet
61adaf8187
Combine projection and opaque into alias
2022-12-13 17:48:55 +00:00
Michael Goulet
c13bd83528
squash OpaqueTy and ProjectionTy into AliasTy
2022-12-13 17:40:27 +00:00
Michael Goulet
5c6afb850c
ProjectionTy.item_def_id -> ProjectionTy.def_id
2022-12-13 17:34:44 +00:00
Michael Goulet
7f3af72606
Use ty::OpaqueTy everywhere
2022-12-13 17:29:26 +00:00
Michael Goulet
c36ff28d42
drive-by: PolyExistentialPredicate
2022-11-19 04:04:27 +00:00