Michael Goulet
9a1c5eb5b3
Begin to implement type system layer of unsafe binders
2024-12-22 21:57:57 +00:00
lcnr
9792cf0d6b
remove non-borrowck member constraints
2024-12-20 10:04:01 +01:00
Michael Goulet
d714a22e7b
(Re-)Implement impl_trait_in_bindings
2024-12-14 03:21:24 +00:00
Michael Goulet
1da411e750
Split UserTypeAnnotation to have a kind
2024-12-14 03:20:50 +00:00
Michael Goulet
398fd901d5
Assert that obligations are empty before deeply normalizing
2024-12-02 22:51:18 +00:00
Michael Goulet
abfa5c1dca
Deeply normalize when computing implied outlives bounds
2024-12-02 22:51:17 +00:00
lcnr
34a8c2dbba
support revealing defined opaque post borrowck
2024-11-28 10:40:58 +01:00
lcnr
319843d8cd
no more Reveal :(
2024-11-23 13:52:54 +01:00
lcnr
9cba14b95b
use TypingEnv when no infcx is available
...
the behavior of the type system not only depends on the current
assumptions, but also the currentnphase of the compiler. This is
mostly necessary as we need to decide whether and how to reveal
opaque types. We track this via the `TypingMode`.
2024-11-18 10:38:56 +01:00
Boxy
bea0148ac6
Consolidate type system const evaluation under traits::evaluate_const
...
mew
2024-11-12 02:54:03 +00:00
lcnr
dc750665ae
normalization folders, yeet ParamEnv::reveal
2024-10-31 14:55:53 +01:00
lcnr
f51ec110a7
TypingMode 🤔
2024-10-29 17:01:24 +01:00
Michael Goulet
7f54b9ecef
Remove ObligationCause::span() method
2024-10-27 23:54:06 +00:00
Michael Goulet
cde29b9ec9
Implement const effect predicate in new solver
2024-10-24 09:46:36 +00:00
Michael Goulet
38bbcc001e
Rename normalize to normalize_internal, remove unnecessary usages
2024-10-19 18:07:35 +00:00
lcnr
3360c1773a
move defining_opaque_types out of Canonical
2024-10-17 10:22:52 +02:00
lcnr
f3ce557fcd
DropckOutlives to rustc_middle
2024-10-17 09:53:27 +02:00
lcnr
401f9b4e0a
ImpliedOutlivesBounds to rustc_middle
2024-10-17 09:53:27 +02:00
GnomedDev
7ec06b0d1d
Swap Vec<PredicateObligation> to type alias
2024-10-12 15:17:08 +01:00
León Orell Valerian Liehr
01a063f9df
Compiler: Rename "object safe" to "dyn compatible"
2024-09-25 13:26:48 +02:00
Michael Goulet
c682aa162b
Reformat using the new identifier sorting from rustfmt
2024-09-22 19:11:29 -04:00
Nicholas Nethercote
8d32578fe1
Rename and reorder lots of lifetimes.
...
- Replace non-standard names like 's, 'p, 'rg, 'ck, 'parent, 'this, and
'me with vanilla 'a. These are cases where the original name isn't
really any more informative than 'a.
- Replace names like 'cx, 'mir, and 'body with vanilla 'a when the lifetime
applies to multiple fields and so the original lifetime name isn't
really accurate.
- Put 'tcx last in lifetime lists, and 'a before 'b.
2024-09-13 15:46:20 +10:00
Nicholas Nethercote
4b3fa8e9f0
Remove #[macro_use] extern crate tracing from rustc_trait_selection.
2024-08-30 17:14:59 +10:00
Luca Versari
7fd62320fe
Fix order of normalization and recursion in const folding.
...
Fixes #126831 .
Without this patch, type normalization is not always idempotent, which
leads to all sorts of bugs in places that assume that normalizing a
normalized type does nothing.
2024-08-18 00:07:41 +02:00
Jubilee
4f46643698
Rollup merge of #129078 - lcnr:scrape_region_constraints-use-ocx, r=compiler-errors
...
`ParamEnvAnd::fully_perform`: we have an `ocx`, use it
cc #123669
r? ``@compiler-errors``
2024-08-15 18:44:18 -07:00
Matthias Krüger
f3df807207
Rollup merge of #129106 - compiler-errors:unused-type-ops, r=jieyouxu
...
Remove redundant type ops: `Eq`/`Subtype`
r? lcnr or anyone really
2024-08-15 19:32:37 +02:00
Michael Goulet
f264e5d011
Remove redundant type ops
2024-08-14 14:18:17 -04:00
lcnr
3a02047d52
if we have an ocx, use it
2024-08-14 09:36:53 +02:00
bors
9859bf27fd
Auto merge of #129076 - matthiaskrgr:rollup-rg8mi2x, r=matthiaskrgr
...
Rollup of 6 pull requests
Successful merges:
- #128410 (Migrate `remap-path-prefix-dwarf` `run-make` test to rmake)
- #128759 (alloc: add ToString specialization for `&&str`)
- #128873 (Add windows-targets crate to std's sysroot)
- #129001 (chore(lib): Enhance documentation for core::fmt::Formatter's write_fm…)
- #129061 (Use `is_lang_item` more)
- #129062 (Remove a no-longer-true assert)
r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-14 04:17:13 +00:00
Michael Goulet
bac19686a5
Use is_lang_item more
2024-08-13 16:44:53 -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
Bryanskiy
34fcf92ea0
Add special-case for [T, 0] in dropck
2024-07-31 16:15:05 +03: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
ce8a625092
Move all error reporting into rustc_trait_selection
2024-07-21 22:34:35 -04:00
Michael Goulet
7af825fea4
Split out overflow handling into its own module
2024-07-09 09:51:56 -04:00
Michael Goulet
fe4c995ccb
Move trait selection error reporting to its own top-level module
2024-07-08 16:04:47 -04:00
Michael Goulet
cc6c5de39d
Import via rustc_type_ir::outlives
...
We could use rustc_middle::ty::outlives I guess?
2024-07-06 10:47:46 -04:00
Michael Goulet
23c6f23b21
Uplift push_outlives_components
2024-07-06 10:47:46 -04:00
Michael Goulet
db638ab968
Rename a bunch of things
2024-06-21 12:32:05 -04:00
Michael Goulet
93ff86ed7c
Use is_lang_item more aggressively
2024-06-14 16:54:29 -04:00
Michael Goulet
4038010436
Get rid of PredicateObligations
2024-06-11 13:52:51 -04:00
Michael Goulet
a41c44f21c
Nits and formatting
2024-06-03 10:02:08 -04:00
Michael Goulet
1e72c7f536
Add cycle errors to ScrubbedTraitError to remove a couple more calls to new_with_diagnostics
2024-06-03 09:27:52 -04:00
Michael Goulet
94a524ed11
Use ScrubbedTraitError in more places
2024-06-03 09:27:52 -04:00
Michael Goulet
54b2b7d460
Make TraitEngines generic over error
2024-06-03 09:27:52 -04:00
Michael Goulet
1c8230ea3c
Uplift OutlivesPredicate, remove a bunch of unnecessary associated types from Interner
2024-05-21 17:00:45 -04:00
bors
34582118af
Auto merge of #125076 - compiler-errors:alias-term, r=lcnr
...
Split out `ty::AliasTerm` from `ty::AliasTy`
Splitting out `AliasTerm` (for use in project and normalizes goals) and `AliasTy` (for use in `ty::Alias`)
r? lcnr
2024-05-13 22:20:43 +00:00
Michael Goulet
3bcdf3058e
split out AliasTy -> AliasTerm
2024-05-13 11:59:42 -04:00
Nicholas Nethercote
4bf20b2b55
Remove extern crate rustc_middle from rustc_trait_selection.
2024-05-13 08:20:18 +10:00
Michael Goulet
5e606c0bde
Lift Lift
2024-05-10 15:44:03 -04:00