Michael Goulet
a16d491054
Remove associated type based effects logic
2024-10-24 09:46:36 +00:00
lcnr
3360c1773a
move defining_opaque_types out of Canonical
2024-10-17 10:22:52 +02:00
Michael Goulet
c682aa162b
Reformat using the new identifier sorting from rustfmt
2024-09-22 19:11:29 -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
0a83764cbd
Simplify IntVarValue/FloatVarValue
2024-06-01 10:31:32 -04:00
Michael Goulet
1c8230ea3c
Uplift OutlivesPredicate, remove a bunch of unnecessary associated types from Interner
2024-05-21 17:00:45 -04:00
Michael Goulet
05e0f8740a
Uplift GenericArgKind, CanonicalVarValues, QueryInput
...
and make NestedGoals generic
2024-05-18 16:21:43 -04:00
Nicholas Nethercote
6ce258f657
Remove extern crate rustc_macros from rustc_middle.
2024-04-29 11:19:16 +10:00
Michael Goulet
25c0cf0a66
nits
2024-04-15 16:52:51 -04:00
Michael Goulet
eb6f856169
Remove ConstVariableOriginKind
2024-04-15 16:52:12 -04:00
Oli Scherer
dc97b1eb58
Ensure the canonical_param_env_cache does not contain inconsistent information about the defining anchor
2024-04-08 15:08:06 +00:00
Oli Scherer
2f2350e577
Eliminate DefiningAnchor now that is just a single-variant enum
2024-04-08 15:00:27 +00:00
Oli Scherer
19bd91d128
Pass list of defineable opaque types into canonical queries
2024-04-08 15:00:26 +00:00
Vadim Petrochenkov
b40ea03f8a
rustc_index: Add a ZERO constant to index types
...
It is commonly used.
2024-04-03 19:06:22 +03:00
lcnr
16350d76d8
add comment
2024-02-22 18:54:51 +01:00
lcnr
db950efbc3
region unification update universe of region vars
2024-02-22 18:54:51 +01:00
Shoyu Vanilla
3856df059e
Dejargnonize subst
2024-02-12 15:46:35 +09:00
lcnr
9cd6c68033
cleanup effect var handling
2024-02-05 10:51:18 +01:00
lcnr
290651be72
don't store const var origins for known vars
2024-01-16 11:06:42 +01:00
Matthias Krüger
74d81d15b4
NFC: do not clone types that are copy
2023-12-15 23:19:51 +01:00
Ali MJ Al-Nasrawy
3b55869615
make infcx optional in canonicalizer
...
This doesn't change behavior.
It should prevent unintentional resolution of inference variables
during canonicalization, which previously caused a soundness bug.
See PR description for more.
2023-12-14 03:03:03 +00:00
Ali MJ Al-Nasrawy
a1459c3fca
fix small perf regressions
2023-12-13 14:57:52 +00:00
Ali MJ Al-Nasrawy
85338197d4
don't store OriginalQueryValues::universe_map
...
ParamEnv is canonicalized in *queries input* rather than query response.
In such case we don't "preserve universes" of canonical variable.
This means that `universe_map` always has the default value, which is
wasteful to store in the cache.
2023-12-13 14:57:52 +00:00
Ali MJ Al-Nasrawy
f38d1e971d
global param_env canonicalization cache
2023-12-13 14:57:52 +00:00
Michael Goulet
d1daf0e841
Uplift CanonicalVarInfo and friends
2023-11-21 17:49:57 +00:00
lcnr
15f21562e6
finish RegionKind rename
...
- `ReFree` -> `ReLateParam`
- `ReEarlyBound` -> `ReEarlyParam`
2023-11-14 13:13:27 +00:00
lcnr
86fa1317a3
rename ReLateBound to ReBound
...
other changes:
- `Region::new_late_bound` -> `Region::new_bound`
- `Region::is_late_bound` -> `Region::is_bound`
2023-11-13 14:13:54 +00:00
Michael Goulet
bcb97ea221
No lifetime on PlaceholderConst
2023-11-04 17:36:44 +00:00
Michael Goulet
024ca99de5
Uplift Canonical to rustc_type_ir
2023-10-25 16:25:09 +00:00
Michael Goulet
a986ab4d4d
Get rid of 'tcx on ConstVid, EffectVid
2023-10-24 20:13:36 +00:00
Michael Goulet
b2d2184ede
Format all the let chains in compiler
2023-10-13 08:59:36 +00:00
Camille GILLOT
26cb34cd18
Remove span from BrAnon.
2023-09-24 09:46:55 +00:00
Nicholas Nethercote
abe2a68acd
Remove more unused Lift impls.
2023-09-18 09:37:10 +10:00
Nicholas Nethercote
af7d3e501b
Remove unused Lift derives.
...
I found these by commenting out all `Lift` derives and then adding back
the ones that were necessary to successfully compile.
2023-09-18 09:37:10 +10:00
Matthias Krüger
e7a347baf8
Rollup merge of #115727 - fee1-dead-contrib:effect-fallback, r=oli-obk
...
Implement fallback for effect param
r? `@oli-obk` or `@lcnr`
tracking issue for this ongoing work: https://github.com/rust-lang/rust/issues/110395
2023-09-11 17:03:31 +02:00
Deadbeef
9654d5ceaf
add is_host_effect to GenericParamDefKind::Const and address review
2023-09-11 13:18:36 +00:00
Nicholas Nethercote
64ea8eb1a9
Disentangle Debug and Display for Ty.
...
The `Debug` impl for `Ty` just calls the `Display` impl for `Ty`. This
is surprising and annoying. In particular, it means `Debug` doesn't show
as much information as `Debug` for `TyKind` does. And `Debug` is used in
some user-facing error messages, which seems bad.
This commit changes the `Debug` impl for `Ty` to call the `Debug` impl
for `TyKind`. It also does a number of follow-up changes to preserve
existing output, many of which involve inserting
`with_no_trimmed_paths!` calls. It also adds `Display` impls for
`UserType` and `Canonical`.
Some tests have changes to expected output:
- Those that use the `rustc_abi(debug)` attribute.
- Those that use the `EMIT_MIR` annotation.
In each case the output is slightly uglier than before. This isn't
ideal, but it's pretty weird (particularly for the attribute) that the
output is using `Debug` in the first place. They're fairly obscure
attributes (I hadn't heard of them) so I'm not worried by this.
For `async-is-unwindsafe.stderr`, there is one line that now lacks a
full path. This is a consistency improvement, because all the other
mentions of `Context` in this test lack a path.
2023-09-11 12:51:07 +10:00
Deadbeef
84a490712a
Implement fallback for effect param
2023-09-10 07:48:47 +00:00
Mahdi Dibaiee
e55583c4b8
refactor(rustc_middle): Substs -> GenericArg
2023-07-14 13:27:35 +01:00
Boxy
12138b8e5e
Move TyCtxt::mk_x to Ty::new_x where applicable
2023-07-05 20:27:07 +01:00
Boxy
ddbc774e74
Replace mk_const with Const::new_x methods
2023-07-04 14:26:33 +01:00
Michael Goulet
01377e8064
opportunistically resolve regions
2023-06-13 22:10:51 +00:00
Michael Goulet
b0eaaca314
Remove redundant InferCtxtExt::fresh_item_substs
2023-06-05 20:05:08 +00:00
Maybe Waffle
e33e20824f
Rename tcx.mk_re_* => Region::new_*
2023-05-29 17:54:53 +00:00
Michael Goulet
6f27876f62
Use OpaqueTypeKey in query response
2023-05-10 23:41:06 +00:00
Matthias Krüger
a6c1fa5056
Rollup merge of #110386 - nnethercote:clean-up-traversal-macros, r=lcnr
...
Clean up traversal macros
The declarative macros relating to type folding and visiting can be simplified.
r? ``@lcnr``
2023-04-17 18:13:35 +02:00
fee1-dead
a5136f14ae
Rollup merge of #109665 - fee1-dead-contrib:rm-remap-queries, r=oli-obk
...
Remove `remap_env_constness` in queries
This removes some of the complexities with const traits. #88119 used to be caused by this but was fixed by `param_env = param_env.without_const()`.
2023-04-16 18:55:38 +08:00
Nicholas Nethercote
d2b5a64579
Simplify CloneLiftImpls and TrivialTypeTraversalImpls.
...
They both allow for a lifetime other than `'tcx`, but this isn't needed.
2023-04-16 14:19:50 +10:00
DaniPopes
677357d32b
Fix typos in compiler
2023-04-10 22:02:52 +02:00
lcnr
2b0f5721c1
prioritize param-env candidates
2023-04-10 09:16:33 +02:00