Michael Goulet
c682aa162b
Reformat using the new identifier sorting from rustfmt
2024-09-22 19:11:29 -04:00
Nicholas Nethercote
4b3fa8e9f0
Remove #[macro_use] extern crate tracing
from rustc_trait_selection
.
2024-08-30 17:14:59 +10:00
Michael Goulet
c361c924a0
Use assert_matches around the compiler
2024-08-11 12:25:39 -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
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
db638ab968
Rename a bunch of things
2024-06-21 12:32:05 -04:00
Boxy
58feec9b85
Basic removal of Ty
from places (boring)
2024-06-05 22:25:38 +01: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
084ccd2390
Remove unnecessary extension trait
2024-06-03 09:27:52 -04:00
Michael Goulet
3bcdf3058e
split out AliasTy -> AliasTerm
2024-05-13 11:59:42 -04:00
lcnr
41ebd16266
solve: replace all debug
with trace
2024-05-12 03:29:50 +00:00
Nicholas Nethercote
fe843feaab
Use fewer origins when creating type variables.
...
`InferCtxt::next_{ty,const}_var*` all take an origin, but the
`param_def_id` is almost always `None`. This commit changes them to just
take a `Span` and build the origin within the method, and adds new
methods for the rare cases where `param_def_id` might not be `None`.
This avoids a lot of tedious origin building.
Specifically:
- next_ty_var{,_id_in_universe,_in_universe}: now take `Span` instead of
`TypeVariableOrigin`
- next_ty_var_with_origin: added
- next_const_var{,_in_universe}: takes Span instead of ConstVariableOrigin
- next_const_var_with_origin: added
- next_region_var, next_region_var_in_universe: these are unchanged,
still take RegionVariableOrigin
The API inconsistency (ty/const vs region) seems worth it for the
large conciseness improvements.
2024-05-10 09:47:46 +10:00
bors
3fba278231
Auto merge of #123537 - compiler-errors:shallow, r=lcnr
...
Simplify shallow resolver to just fold ty/consts
Probably faster than using a whole folder?
2024-04-16 21:59:36 +00:00
Michael Goulet
ecef296a03
Simplify shallow resolver to just fold ty/consts
2024-04-15 18:09:16 -04:00
Michael Goulet
eb6f856169
Remove ConstVariableOriginKind
2024-04-15 16:52:12 -04:00
Michael Goulet
34bce07e8e
Remove TypeVariableOriginKind
2024-04-15 16:51:50 -04:00
León Orell Valerian Liehr
6f17b7f0ab
Rename HAS_PROJECTIONS to HAS_ALIASES etc.
2024-04-04 19:26:17 +02:00
lcnr
f7cdff825c
overflow errors: change source to a concrete enum
2024-02-22 17:43:57 +01:00
lcnr
5fb67e2ad4
some type system cleanup
2024-02-20 20:42:10 +01:00
lcnr
9771fb08b6
split project
into multiple files
2024-02-19 09:17:00 +01:00
Michael Goulet
68c2f11240
Remove special-casing around aliaskind in new solver
2024-01-11 16:54:11 +00:00
lcnr
6ffe36b37d
refactor writeback: emit normalization errors with new solver
2023-12-12 12:20:54 +00:00
lcnr
ffb4c08a81
implement and use NormalizesTo
2023-12-08 01:31:18 +01:00
Michael Goulet
3448284f8d
Continue folding if deep normalizer fails
2023-12-05 16:55:10 +00:00
Michael Goulet
334577f091
Add deeply_normalize_for_diagnostics, use it in coherence
2023-12-05 16:33:37 +00:00
lcnr
306a7ea8b4
AliasTy::new instead of tcx method
2023-10-18 13:57:19 +02:00
lcnr
a090b4548d
avoid more ty::Binder:dummy
2023-08-03 14:16:26 +02:00
Matthias Krüger
2660d5d977
Rollup merge of #113987 - compiler-errors:comments, r=lcnr
...
Comment stuff in the new solver
r? `@lcnr`
2023-07-24 17:47:09 +02:00
Matthias Krüger
af2b370100
more clippy::style fixes:
...
get_first
single_char_add_str
unnecessary_mut_passed
manual_map
manual_is_ascii_check
2023-07-23 23:39:04 +02:00
Michael Goulet
f3553691a8
Comment stuff in the new solver
2023-07-23 12:30:52 -07: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
1ef85d82e0
assertion, comment
2023-07-14 15:03:21 +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
Michael Goulet
f55b046931
Normalize opaques during codegen in new solver
2023-07-07 16:02:25 +00:00
Michael Goulet
a1f8edb5d5
Rollup merge of #113317 - lcnr:sketchy-new-select, r=oli-obk
...
-Ztrait-solver=next: stop depending on old solver
removes the final dependencies on the old solver when `-Ztrait-solver=next` is enabled.
2023-07-05 08:45:43 -07:00
Boxy
ddbc774e74
Replace mk_const
with Const::new_x
methods
2023-07-04 14:26:33 +01:00
lcnr
b468bfb361
-Ztrait-solver=next: stop depending on old solver
2023-07-04 10:06:39 +02:00
lcnr
be6a344365
rebase
2023-07-03 09:24:02 +02:00
lcnr
412c6e0b07
review
2023-07-03 09:12:15 +02:00
lcnr
42067596c2
add deep normalization via the new solver
2023-07-03 09:12:14 +02:00