Commit Graph

2452 Commits

Author SHA1 Message Date
Michael Goulet 009d68740f Make item self/non-self bound naming less whack 2025-01-28 19:08:50 +00:00
Boxy 921c226eb6 Remove Copy bound from enter_forall 2025-01-22 11:45:09 +00:00
Michael Goulet 2a180a93a1 Get rid of ToPolyTraitRef 2025-01-18 18:47:17 +00:00
lcnr 87f03a4238 rm unnecessary OpaqueTypeDecl wrapper 2025-01-13 14:33:18 +01:00
Michael Goulet dd210eca43 Simplify declared_generic_bounds_from_env 2025-01-02 01:30:55 +00:00
Michael Goulet 2a373d7dd3 Make it clearer that the only infers we expect to see when processing outlives are regions 2025-01-02 00:48:06 +00:00
Michael Goulet f3646748cd Remove hack for filtering out param-env outlives that match item-bound outlives 2025-01-02 00:48:06 +00:00
Rémy Rakic b0fc1d47d5 fix a couple nits
- remove unneeded type ascription
- fix variable name
- fix typo in comment
- fix `var_origins` var and function name: these are `VarInfos`
2024-12-30 06:51:16 +00:00
Michael Goulet d6c5a6bd3a nit: Remove redundant function 2024-12-26 17:35:07 +00:00
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
Nicholas Nethercote 2620eb42d7 Re-export more rustc_span::symbol things from rustc_span.
`rustc_span::symbol` defines some things that are re-exported from
`rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some
closely related things such as `Ident` and `kw`. So you can do `use
rustc_span::{Symbol, sym}` but you have to do `use
rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good
reason.

This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`,
and changes many `rustc_span::symbol::` qualifiers in `compiler/` to
`rustc_span::`. This is a 200+ net line of code reduction, mostly
because many files with two `use rustc_span` items can be reduced to
one.
2024-12-18 13:38:53 +11:00
lcnr c76eb22356 fn member_constraint to add_member_constraint 2024-12-17 09:00:29 +01:00
Michael Goulet 398fd901d5 Assert that obligations are empty before deeply normalizing 2024-12-02 22:51:18 +00:00
lcnr 34a8c2dbba support revealing defined opaque post borrowck 2024-11-28 10:40:58 +01:00
lcnr 9fe7750bcd uplift fold_regions to rustc_type_ir 2024-11-28 10:40:58 +01:00
bors 386a7c7ae2 Auto merge of #133242 - lcnr:questionable-uwu, r=compiler-errors,BoxyUwU
finish `Reveal` removal

After #133212 changed the `TypingMode` to be the only source of truth, this entirely rips out `Reveal`.

cc #132279

r? `@compiler-errors`
2024-11-23 18:01:21 +00:00
lcnr 795ff6576c global old solver cache: use TypingEnv 2024-11-23 13:52:56 +01:00
lcnr 319843d8cd no more Reveal :( 2024-11-23 13:52:54 +01:00
Michael Goulet d294e4746b Remove unnecessary bool from ExpectedFound 2024-11-23 04:51:31 +00:00
Michael Goulet 5eeaf2ec33 Implement ~const opaques 2024-11-19 20:31:05 +00:00
lcnr 2e087d2eaa review 2024-11-18 10:50:14 +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
Michael Goulet 97dfe8b871 Manually register some bounds for a better span 2024-11-08 04:56:08 +00:00
clubby789 b480f0f224 Remove unused intercrate dependencies 2024-11-07 14:17:16 +00:00
Michael Goulet d458f850aa ty::BrK -> ty::BoundRegionKind::K 2024-11-04 04:45:52 +00:00
Michael Goulet 9e5e47fc32 Remove or fix some FIXME(async_closure) 2024-11-02 03:33:31 +00:00
Michael Goulet e093b82a41 Encode cross-crate opaque type origin 2024-10-31 01:35:13 +00:00
lcnr f51ec110a7 TypingMode 🤔 2024-10-29 17:01:24 +01:00
klensy 746b675c5a fix clippy::clone_on_ref_ptr for compiler 2024-10-28 18:05:08 +03:00
Michael Goulet cde29b9ec9 Implement const effect predicate in new solver 2024-10-24 09:46:36 +00:00
Michael Goulet a16d491054 Remove associated type based effects logic 2024-10-24 09:46:36 +00:00
Matthias Krüger d84d659cb5 clone range in a more obvious way 2024-10-23 22:22:58 +02:00
lcnr d836d35739 refactor fudge_inference, handle effect vars 2024-10-19 00:41:56 +02:00
lcnr 3360c1773a move defining_opaque_types out of Canonical 2024-10-17 10:22:52 +02:00
GnomedDev 8de8f46f78 Swap PredicateObligation to ThinVec 2024-10-12 15:17:16 +01:00
GnomedDev 7ec06b0d1d Swap Vec<PredicateObligation> to type alias 2024-10-12 15:17:08 +01:00
Michael Goulet 8715bfbf0e Make super combine into fns 2024-10-10 06:07:52 -04:00
Michael Goulet a4cd2202ef Use SolverRelating in favor of TypeRelating in the old solver where possible 2024-10-10 06:07:52 -04:00
Michael Goulet 30a2ecddb4 Remove unnecessary StructurallyRelateAliases from CombineFields/TypeRelating 2024-10-10 06:07:52 -04:00
Michael Goulet 3da257a98d Use SolverRelating in new solver 2024-10-10 06:07:52 -04:00
Michael Goulet efb1c23ff6 Introduce SolverRelating 2024-10-10 06:07:51 -04:00
Michael Goulet ce7a61b9d0 Uplift super_combine 2024-10-10 06:07:51 -04:00
Michael Goulet 09da2ebd63 Move ty::Error branch into super_combine_tys 2024-10-10 06:07:51 -04:00
Nicholas Nethercote 3b1eee7755 Remove unnecessary return keyword. 2024-10-08 16:28:58 +11:00
Nicholas Nethercote 1dac23f6fe Use Default more in InferCtxtInner. 2024-10-08 16:28:58 +11:00
Nicholas Nethercote 4df21f2ca0 Downgrade a &mut self to &self. 2024-10-08 16:28:58 +11:00
Nicholas Nethercote 8b05df44f9 Remove Deref/DerefMut impls for RegionConstraintCollector.
`Deref`/`DerefMut` can be useful, but they can also obfuscate. I don't
think they're worth it for `RegionConstraintCollector`. They're also not
present on the similar types `OpaqueTypeTable` and `TypeVariableTable`.
2024-10-08 16:28:58 +11:00
Nicholas Nethercote e8a0bd6549 Remove unnecessary lifetime from LeakCheck.
`LeakCheck` can own `mini_graph` and `rcc` instead of holding references
to them. This requires inlining `assign_scc_value` to avoid a borrowck
error, but that's fine because it has a single call site.
2024-10-08 16:28:58 +11:00