Michael Goulet
db638ab968
Rename a bunch of things
2024-06-21 12:32:05 -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
3bcdf3058e
split out AliasTy -> AliasTerm
2024-05-13 11:59:42 -04:00
Nicholas Nethercote
4814fd0a4b
Remove extern crate rustc_macros from numerous crates.
2024-04-29 10:21:54 +10:00
Jason Newcomb
be9b125d41
Convert TypeVisitor and DefIdVisitor to use VisitorResult
2024-03-05 13:28:15 -05:00
lcnr
f7cdff825c
overflow errors: change source to a concrete enum
2024-02-22 17:43:57 +01:00
León Orell Valerian Liehr
05ce209d20
Rename some normalization-related items
2024-02-20 17:30:49 +01:00
lcnr
9771fb08b6
split project into multiple files
2024-02-19 09:17:00 +01:00
Michael Goulet
f624d55ea7
Nits
2024-02-16 15:07:37 +00:00
Michael Goulet
a9dbf63087
Move trait into attr so it's greppable
2024-02-16 15:07:37 +00:00
Michael Goulet
9c25823bb4
Use extension trait derive
2024-02-16 15:07:37 +00:00
Nicholas Nethercote
ed76b0b882
Rename consuming chaining methods on DiagnosticBuilder.
...
In #119606 I added them and used a `_mv` suffix, but that wasn't great.
A `with_` prefix has three different existing uses.
- Constructors, e.g. `Vec::with_capacity`.
- Wrappers that provide an environment to execute some code, e.g.
`with_session_globals`.
- Consuming chaining methods, e.g. `Span::with_{lo,hi,ctxt}`.
The third case is exactly what we want, so this commit changes
`DiagnosticBuilder::foo_mv` to `DiagnosticBuilder::with_foo`.
Thanks to @compiler-errors for the suggestion.
2024-01-10 07:40:00 +11:00
Nicholas Nethercote
2ea7a37e11
Add DiagCtxt::delayed_bug.
...
We have `span_delayed_bug` and often pass it a `DUMMY_SP`. This commit
adds `delayed_bug`, which matches pairs like `err`/`span_err` and
`warn`/`span_warn`.
2024-01-10 07:33:07 +11:00
bors
be00c5a9b8
Auto merge of #118968 - aliemjay:canon-static, r=lcnr
...
unify query canonicalization mode
Exclude from canonicalization only the static lifetimes that appear in the param env because of #118965 . Any other occurrence can be canonicalized safely AFAICT.
r? `@lcnr`
2024-01-09 09:20:33 +00:00
Michael Goulet
82a2215481
Don't check for recursion in generator witness fields
2024-01-08 20:30:21 +00:00
Nicholas Nethercote
99472c7049
Remove Session methods that duplicate DiagCtxt methods.
...
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier
access.
2023-12-24 08:05:28 +11:00
Michael Goulet
70b9dad3dc
Annotate some bugs
2023-12-15 14:45:06 +00:00
Ali MJ Al-Nasrawy
707c4f967e
unify query canonicalization mode
2023-12-15 06:59:42 +00:00
Nicholas Nethercote
5d1d384443
Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug.
...
Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug`
follows the pattern used everywhere else: `span_err`, `span_warning`,
etc.
2023-12-02 09:01:19 +11:00
Michael Goulet
4ec68576d3
Cache flags for ty::Const
2023-11-22 23:28:28 +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
c91f60e22f
Don't super-fold types when we hit the recursion limit
2023-10-30 19:24:15 +00:00
Michael Goulet
024ca99de5
Uplift Canonical to rustc_type_ir
2023-10-25 16:25:09 +00:00
Oli Scherer
e96ce20b34
s/generator/coroutine/
2023-10-20 21:14:01 +00:00
Ralf Jung
6e4779ab17
make the eval() functions on our const types return the resulting value
2023-09-13 07:29:34 +02:00
Matthias Krüger
3ce90b1649
inline format!() args up to and including rustc_codegen_llvm
2023-07-30 14:22:50 +02:00
bors
ad963232d9
Auto merge of #113471 - compiler-errors:new-solver-norm-escaping, r=lcnr
...
Allow escaping bound vars during `normalize_erasing_regions` in new solver
Add `AllowEscapingBoundVars` to `deeply_normalize`, and use it in the new solver in the `query_normalize` routine.
Ideally, we'd make all `query_normalize` calls handle pass in `AllowEscapingBoundVars` individually, because really the only `query_normalize` call that needs `AllowEscapingBoundVars::Yes` is the one in `try_normalize_generic_arg_after_erasing_regions`, but I think that's kind of overkill. I am happy to be convinced otherwise, though.
r? `@lcnr`
2023-07-14 21:14:30 +00:00
Michael Goulet
4bcca3294a
Allow escaping bound vars during normalize_erasing_regions in new solver
2023-07-14 15:03:21 +00:00
Mahdi Dibaiee
e55583c4b8
refactor(rustc_middle): Substs -> GenericArg
2023-07-14 13:27:35 +01:00
lcnr
42067596c2
add deep normalization via the new solver
2023-07-03 09:12:14 +02:00
Michael Goulet
983f6b9787
Normalize opaques with escaping bound vars
2023-06-27 21:36:15 +00:00
Michael Goulet
493b18b653
Continue folding in query normalizer on weak aliases
2023-06-18 20:56:30 +00:00
Oli Scherer
f3b7dd6388
Add AliasKind::Weak for type aliases.
...
Only use it when the type alias contains an opaque type.
Also does wf-checking on such type aliases.
2023-06-16 19:39:48 +00:00
León Orell Valerian Liehr
e8139dfd5a
IAT: Introduce AliasKind::Inherent
2023-05-04 16:59:10 +02:00
Oli Scherer
d87fbb918c
Deduplicate logic between projection normalization with and without escaping bound vars
2023-03-15 12:02:00 +00:00
Oli Scherer
d3d537b972
Exhaustively match over all alias kinds
2023-03-15 12:00:25 +00: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
Alan Egerton
63ad5d0522
Rename folder traits' tcx method to interner
2023-02-13 10:24:51 +00:00
Alan Egerton
9783fcc13b
Make folding traits generic over the Interner
2023-02-13 10:24:49 +00:00
Alan Egerton
dea342d861
Make visiting traits generic over the Interner
2023-02-13 10:24:49 +00:00
Alan Egerton
ba55a453eb
Alias folding/visiting traits instead of re-export
2023-02-13 10:24:46 +00:00
Camille GILLOT
de110f9208
Pacify tidy.
2023-01-27 22:01:25 +00:00
Camille GILLOT
caefec955f
Do not abort compilation when failing to normalize opaque types.
2023-01-27 18:55:58 +00:00
bors
56ee85274e
Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstrieb
...
Remove some `ref` patterns from the compiler
Previous PR: https://github.com/rust-lang/rust/pull/105368
r? `@Nilstrieb`
2023-01-20 04:52:28 +00:00
Scott McMurray
925dc37313
Stop using BREAK & CONTINUE in compiler
...
Switching them to `Break(())` and `Continue(())` instead.
libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2023-01-17 23:17:51 -08:00
Maybe Waffle
8d3c90ae13
Review suggestions
2023-01-17 07:48:20 +00:00
Maybe Waffle
360e978437
Don't call closures immediately, use try{} blocks
2023-01-17 07:48:19 +00:00