Michael Goulet
fe92efaf31
Make connection between Placeholder and Bound a bit more clear in the type abstraction
2025-06-13 17:54:45 +00:00
lcnr
758f4c9498
add param_env cache to canonicalization
2025-06-08 22:41:23 -04:00
lcnr
87141e37f3
move canonicalize_param_env into sub-fn
2025-06-08 22:41:23 -04:00
bors
1c0849d8ba
Auto merge of #141651 - compiler-errors:less-assert, r=lcnr
...
Make some assertions in solver into debug assertions
These may or may not be expensive :>
r? lcnr
2025-05-30 02:21:17 +00:00
Michael Goulet
905fc0a008
Make some assertions in solver into debug assertions
2025-05-27 13:46:41 +00:00
lcnr
0830ce036f
assert we never incorrectly canonicalize envs
2025-05-26 19:57:48 +00:00
lcnr
c56efaedfa
add additional TypeFlags fast paths
2025-05-26 19:57:48 +00:00
Michael Goulet
ade24354f4
Do not canonicalize in new solver if it has nothing to canonicalize
2025-05-25 20:14:11 +00:00
lcnr
326b7e9a6b
yeet CanonicalVarInfo
2025-05-23 12:10:53 +00:00
Michael Goulet
e5a2220327
Fold visit into ty
2025-03-15 06:34:36 +00:00
Michael Goulet
dc0cdfd753
Squash fold into ty
2025-03-15 06:34:36 +00:00
Michael Goulet
241a602d27
Make sure we don't overrun the stack in canonicalizer
2025-02-21 18:24:05 +00:00
Lukas Markeffsky
10fc0b159e
introduce ty::Value
...
Co-authored-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
2025-01-30 17:47:44 +01:00
Yotam Ofek
264fa0fc54
Run clippy --fix for unnecessary_map_or lint
2025-01-19 19:15:00 +00:00
Michael Goulet
9a1c5eb5b3
Begin to implement type system layer of unsafe binders
2024-12-22 21:57:57 +00:00
lcnr
38ce73145c
canonicalizer: keep 'static in the param_env
2024-12-18 16:18:01 +01:00
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
lcnr
1a04a317c4
review
2024-10-02 14:49:36 +02:00
lcnr
15ac698393
canonicalizer: rm region uniquification, add caching
2024-09-30 10:18:27 +02:00
Michael Goulet
954419aab0
Simplify some nested if statements
2024-09-11 13:45:23 -04:00
Nicholas Nethercote
c4717cc9d1
Shrink TyKind::FnPtr.
...
By splitting the `FnSig` within `TyKind::FnPtr` into `FnSigTys` and
`FnHeader`, which can be packed more efficiently. This reduces the size
of the hot `TyKind` type from 32 bytes to 24 bytes on 64-bit platforms.
This reduces peak memory usage by a few percent on some benchmarks. It
also reduces cache misses and page faults similarly, though this doesn't
translate to clear cycles or wall-time improvements on CI.
2024-08-09 14:33:25 +10:00
Michael Goulet
27588d1de3
Split SolverDelegate back out from InferCtxtLike
2024-07-05 16:39:39 -04:00
Michael Goulet
db638ab968
Rename a bunch of things
2024-06-21 12:32:05 -04:00
Michael Goulet
baf94bddf0
SolverDelegate
2024-06-18 10:40:30 -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
Michael Goulet
28ce588321
Uplift binder
2024-05-21 17:00:45 -04:00
Michael Goulet
b0f1afd1fc
Rework var resolution in InferCtxtLike, uplift EagerResolver
2024-05-20 13:57:58 -04:00
Michael Goulet
1e5ec0a12c
Lift TraitRef into rustc_type_ir
2024-05-10 15:44:03 -04:00
Michael Goulet
116f95bb46
Use super_fold in RegionsToStatic visitor
2024-05-06 12:22:15 -04:00
bors
b234e44944
Auto merge of #122077 - oli-obk:eager_opaque_checks4, r=lcnr
...
Pass list of defineable opaque types into canonical queries
This eliminates `DefiningAnchor::Bubble` for good and brings the old solver closer to the new one wrt cycles and nested obligations. At that point the difference between `DefiningAnchor::Bind([])` and `DefiningAnchor::Error` was academic. We only used the difference for some sanity checks, which actually had to be worked around in places, so I just removed `DefiningAnchor` entirely and just stored the list of opaques that may be defined.
fixes #108498
fixes https://github.com/rust-lang/rust/issues/116877
* [x] run crater
- https://github.com/rust-lang/rust/pull/122077#issuecomment-2013293931
2024-04-08 23:01:50 +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
Oli Scherer
84acfe86de
Actually create ranged int types in the type system.
2024-04-08 12:02:19 +00:00
Michael Goulet
6439c7fe23
Require foldability part of interner item bounds, remove redundant where clauses
2024-03-28 12:30:52 -04:00
Michael Goulet
08c7ff2264
Restrict const ty's regions to static when putting them in canonical var list
2024-03-28 12:30:52 -04:00
Matthias Krüger
cb03714e6f
Rollup merge of #122907 - compiler-errors:uniquify-reerror, r=lcnr
...
Uniquify `ReError` on input mode in canonicalizer
See test descr
Fixes #122861
r? lcnr
2024-03-24 01:05:53 +01:00
Michael Goulet
1fcf2eaa9f
Uniquify ReError on input mode in canonicalizer
2024-03-22 16:35:50 -04:00
Michael Goulet
ff0c31e6b9
Programmatically convert some of the pat ctors
2024-03-22 11:13:29 -04:00
Michael Goulet
1eedca8bdf
Allow a way to add constructors for rustc_type_ir types
2024-03-04 15:39:59 +00:00
lcnr
1b3164f5c9
always emit AliasRelate goals when relating aliases
...
Add `StructurallyRelateAliases` to allow instantiating infer vars with rigid aliases.
Change `instantiate_query_response` to be infallible in the new solver. This requires canonicalization to not hide any information used by the query, so weaken
universe compression. It also modifies `term_is_fully_unconstrained` to allow
region inference variables in a higher universe.
2024-02-26 10:17:43 +01:00
Michael Goulet
7e80867f3c
Move visitable bounds up into interner
2024-02-13 15:53:15 +00:00
Michael Goulet
edc5053352
Add assertions back to canonicalizer
2024-02-13 15:40:59 +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
Michael Goulet
146e345d8b
Opportunistically resolve region var in canonicalizer
2023-12-15 05:02:37 +00:00
Michael Goulet
1f5895b3e3
Feedback
...
- Take more things by self, not &self
- Clone more things
- Rework namespacing so we can use `ty::` in the canonicalizer
2023-12-08 17:44:01 +00:00
Michael Goulet
cb41509601
Uplift canonicalizer into new trait solver crate
2023-12-08 17:44:01 +00:00