Michael Goulet
8addb6f3be
Filter out universals and lifetimes from stalled_vars
2025-06-06 15:34:14 +00:00
Michael Goulet
f1da288557
Tweak fast path trait handling
2025-05-29 11:14:36 +00:00
bors
5f025f363d
Auto merge of #141581 - lcnr:fold-clauses, r=compiler-errors
...
add additional `TypeFlags` fast paths
Some crates, e.g. `diesel`, have items with a lot of where-clauses (more than 150). In these cases checking the `TypeFlags` of the whole `param_env` can be very beneficial.
This adds `fn fold_clauses` to mirror the existing `fn visit_clauses` and then uses this in folders which fold `ParamEnv`s.
Split out from rust-lang/rust#141451 , depends on rust-lang/rust#141442 .
r? `@compiler-errors`
2025-05-29 02:29:01 +00:00
Michael Goulet
29c3babd7c
Rename unpack to kind
2025-05-27 11:14:45 +00:00
bors
2805e1dc4c
Auto merge of #141605 - jieyouxu:rollup-3gjqh5l, r=jieyouxu
...
Rollup of 10 pull requests
Successful merges:
- rust-lang/rust#140898 (minor improvements on running miri)
- rust-lang/rust#141392 (Avoid obligation construction dance with query region constraints)
- rust-lang/rust#141431 (Emit dummy open drop for unsafe binder)
- rust-lang/rust#141433 (Properly analyze captures from unsafe binders)
- rust-lang/rust#141439 (Deduplicate dyn compatibility violations due to coercion)
- rust-lang/rust#141449 (further deduplicate ast visitor code)
- rust-lang/rust#141513 (interpret: add allocation parameters to `AllocBytes`)
- rust-lang/rust#141516 (speed up charsearcher for ascii chars)
- rust-lang/rust#141526 (add a dedicated section for compiler environment variables in the unstable book)
- rust-lang/rust#141550 (Fix `unused_braces` lint suggestion when encountering attributes)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-26 20:30:06 +00:00
lcnr
c56efaedfa
add additional TypeFlags fast paths
2025-05-26 19:57:48 +00:00
Michael Goulet
e2215a8ad9
Don't rerun goals if none of its vars have changed
2025-05-26 10:10:03 +00:00
Michael Goulet
9d742eea25
Rename
2025-05-26 08:48:19 +00:00
Michael Goulet
3efd885927
Avoid obligation construction dance with query region constraints
2025-05-26 08:28:45 +00:00
Michael Goulet
9a8cf3dd0c
Comment for not using select_in_new_trait_solver
2025-05-25 10:37:58 +00:00
lcnr
326b7e9a6b
yeet CanonicalVarInfo
2025-05-23 12:10:53 +00:00
bors
e3892a40a9
Auto merge of #141397 - matthiaskrgr:rollup-l9uu6g6, r=matthiaskrgr
...
Rollup of 8 pull requests
Successful merges:
- #141355 (ci: improve citool job db errors)
- #141359 (Fix `FnOnce` impl for `AsyncFn`/`AsyncFnMut` self-borrowing closures in new solver)
- #141362 (Normalize aliases to correct kind of error term)
- #141377 (Remove unnecessary `is_empty` checks)
- #141381 (try_cast_aligned: avoid bare int-to-ptr casts)
- #141382 (ci: convert distcheck to free runner)
- #141389 (ci: prepare aws access keys for migration)
- #141390 (Don't allow `poly_select` in new solver)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-22 14:55:52 +00:00
Michael Goulet
16b6ffe0db
Don't allow poly_select in new solver
2025-05-22 11:24:31 +00:00
Michael Goulet
407fac5479
Fast path for sized pred
2025-05-18 12:18:44 +00:00
Michael Goulet
1d0d258a86
Fast path for processing some obligations in the new solver
2025-05-18 12:18:44 +00:00
Matthias Krüger
74b79aee60
Rollup merge of #140711 - compiler-errors:combine-maybes, r=lcnr
...
Do not discard constraints on overflow if there was candidate ambiguity
Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/201 .
There's a pretty chunky justification in the test.
r? lcnr
2025-05-08 08:14:18 +02:00
lcnr
fc0ef54fd9
opaque_type_storage to InferCtxtLike
2025-05-07 17:58:20 +00:00
Michael Goulet
a910329c67
Use MaybeCause::or to allow constraints from overflows if they are combined with ambiguity
2025-05-07 17:12:15 +00:00
lcnr
431f02d531
support duplicates in the opaque_types_storage
2025-05-06 14:59:09 +00:00
Romain Perier
6970813e78
Use less rustc_type_ir in the compiler codebase
...
This commit does the following:
- Replaces use of rustc_type_ir by rustc_middle in rustc_infer.
- The DelayedMap type is exposed by rustc_middle so everything can be
accessed through rustc_middle in a coherent manner.
- API-layer traits, like InferCtxtLike, Interner or inherent::* must be
accessed via rustc_type_ir, not rustc_middle::ty. For this reason
these are not reexported by rustc_middle::ty.
- Replaces use of ty::Interner by rustc_type_ir::Interner in
rustc_trait_selection
2025-05-02 09:37:06 +02:00
Matthias Krüger
6423d75076
Rollup merge of #140468 - BoxyUwU:normalization_confusings2, r=lcnr
...
Minor tweaks to make some normalization (adjacent) code less confusing
r? lcnr
sorry for double ping lol
2025-04-30 22:36:41 +02:00
Romain Perier
ea7af1803f
Use less rustc_type_ir in the compiler codebase
...
This commit does the following:
- Replaces use of rustc_type_ir by rustc_middle
- Removes the rustc_type_ir dependency
- The DelayedSet type is exposed by rustc_middle so everything can be
accessed through rustc_middle in a coherent manner.
2025-04-30 16:42:33 +02:00
Boxy
c31794d6d3
confusings
2025-04-29 18:55:21 +01:00
Matthias Krüger
3c322bc1cc
Rollup merge of #140320 - lcnr:wf-use-term, r=compiler-errors
...
replace `GenericArg` with `Term` where applicable
r? types
2025-04-26 16:12:33 +02:00
lcnr
855035b038
convert some GenericArg to Term
2025-04-26 02:05:31 +00:00
Michael Goulet
31c8d10342
Track per-obligation recursion depth only if there is inference
2025-04-25 18:14:39 +00:00
bors
fa58ce343a
Auto merge of #138845 - compiler-errors:stall-generators, r=lcnr
...
Properly stall coroutine witnesses in new solver
TODO: write description
r? lcnr
2025-04-23 21:35:15 +00:00
Michael Goulet
f943f73db4
More
2025-04-23 15:09:25 +00:00
Michael Goulet
169955f3be
Properly drain pending obligations for coroutines
2025-04-22 16:50:38 +00:00
Michael Goulet
67df5b9cfa
Collect and resolve ambiguous obligations from normalizing in writeback
2025-04-22 16:50:38 +00:00
Oli Scherer
5d2952100f
Use is_lang_item and as_lang_item instead of handrolling their logic
2025-04-22 11:02:37 +00:00
Michael Goulet
3863018d96
Fix replacing supertrait aliases in ReplaceProjectionWith
2025-04-16 20:05:55 +00:00
Michael Goulet
decd7ecd1e
Deeply normalize obligations in BestObligation
2025-04-10 18:58:04 +00:00
Michael Goulet
62d5fb85ac
Simplify
2025-04-10 17:52:46 +00:00
Michael Goulet
f6faaee372
Report higher-ranked trait error when higher-ranked projection goal fails in new solver
2025-04-09 17:53:32 +00:00
lcnr
509a144eed
add TypingMode::Borrowck
2025-04-03 11:13:10 +02:00
lcnr
cb275d4f26
simplify Interner opaque types API
2025-04-01 23:24:28 +02:00
Michael Goulet
575f129faa
Obligation::as_goal
2025-03-23 18:18:47 +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
lcnr
01795b14f0
change definitely non-productive cycles to error
2025-03-05 10:06:43 +01:00
Matthias Krüger
b6c1b635f7
Rollup merge of #137776 - nnethercote:rustc_transmute-cleanups, r=jswrenn
...
Some `rustc_transmute` cleanups
A number of small things that can be removed.
r? ``@jswrenn``
2025-03-01 11:34:01 +01:00
lcnr
7eb677e7eb
normalizing where-clauses is also coinductive, add tests
2025-02-28 12:16:47 +01:00
Nicholas Nethercote
785e21d382
Remove allow(unused_variables) for rustc_transmute.
...
This was hiding some genuine sins, including unused arguments in
numerous functions/methods (incl. trait methods), and some unnecessary
computation.
2025-02-28 17:31:31 +11:00
Nicholas Nethercote
5f58985f5d
Remove rustc_transmute's dependence on rustc_infer.
...
`TransmuteTypeEnv` only needs a `TyCtxt`, not an `InferCtxt`.
2025-02-28 16:34:41 +11:00
Michael Goulet
12e3911d81
Greatly simplify lifetime captures in edition 2024
2025-02-22 22:24:52 +00:00
Michael Goulet
3d5438accd
Fix binding mode problems
2025-02-22 00:13:19 +00:00
Michael Goulet
b78c626a95
Make fewer crates depend on rustc_ast_ir
2025-02-19 07:06:54 +00:00
lcnr
059288ed44
adjust derive_error
2025-02-13 23:49:09 +01:00
lcnr
de273e459e
normalizes-to rework rigid alias handling
2025-02-13 20:19:11 +00:00