| Age | Commit message (Collapse) | Author | Lines |
|
improve search graph docs, reset `encountered_overflow` between reruns
I think this shouldn't really matter for now. It will be more relevant for my current rework as we otherwise cannot partially reevaluate the root goal in case there has been overflow during the prervious iteration.
r? ````@BoxyUwU````
|
|
|
|
This commit adds a lint to prevent the use of rustc_type_ir in random
compiler crates, except for type system internals traits, which are
explicitly allowed. Moreover, this fixes diagnostic_items() to include
the CRATE_OWNER_ID, otherwise rustc_diagnostic_item attribute is ignored
on the crate root.
|
|
As a performance optimization, skip elaborating the supertraits of
`Sized`, and if a `MetaSized` obligation is being checked, then look for
a `Sized` predicate in the parameter environment. This makes the
`ParamEnv` smaller which should improve compiler performance as it avoids
all the iteration over the larger `ParamEnv`.
|
|
Expand the automatic implementation of `MetaSized` and `PointeeSized` so
that it is also implemented on non-`Sized` types, just not `ty::Foreign`
(extern type).
|
|
Introduce the `MetaSized` and `PointeeSized` traits as supertraits of
`Sized` and initially implement it on everything that currently
implements `Sized` to isolate any changes that simply adding the
traits introduces.
|
|
|
|
|
|
|
|
abstraction
|
|
`FIXME(-Znext-solver)` triage
r? `@BoxyUwU`
|
|
|
|
|
|
|
|
Co-authored-by: Michael Goulet <michael@errs.io>
|
|
Tweak fast path trait handling
(1.) Make it more sound by considering polarity (lol)
(2.) Make it more general, by considering higher-ranked size/copy/clone
(2.) Make it less observable, by only doing copy/clone fast path if there are no regions involved
r? lcnr
|
|
Make some assertions in solver into debug assertions
These may or may not be expensive :>
r? lcnr
|
|
|
|
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`
|
|
|
|
|
|
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
|
|
|
|
|
|
Avoid obligation construction dance with query region constraints
And some renaming...
|
|
Don't rerun goals if none of their vars have changed
r? `@ghost`
Alternative to rust-lang/rust#141488. I'm pretty sure that we don't need to re-run the goal at all if the inputs don't change... 🤔
|
|
|
|
|
|
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #135562 (Add ignore value suggestion in closure body)
- #139635 (Finalize repeat expr inference behaviour with inferred repeat counts)
- #139668 (Handle regions equivalent to 'static in non_local_bounds)
- #140218 (HIR ty lowering: Clean up & refactor the lowering of type-relative paths)
- #140435 (use uX::from instead of _ as uX in non - const contexts)
- #141130 (rustc_on_unimplemented cleanups)
- #141286 (Querify `coroutine_hidden_types`)
Failed merges:
- #140247 (Don't build `ParamEnv` and do trait solving in `ItemCtxt`s when lowering IATs)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
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
|
|
Fix `FnOnce` impl for `AsyncFn`/`AsyncFnMut` self-borrowing closures in new solver
This only affects closures that are "`AsyncFn`/`AsyncFnMut`" in their calling capability that are being called with the `FnOnce` trait.
fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/217
r? lcnr
|
|
Querify `coroutine_hidden_types`
This is necessary if we ever want to add implied bounds that would be used for higher-ranked coroutine auto trait goals (e.g. future implements `Send`).
Modest perf regression in `hyper` full build which (afaict?) is the only async stress test, so definitely worth it IMO.
r? oli-obk
|
|
Fast path for processing some obligations in the new solver
Fast path applies to:
- Dyn compatibility predicates
- Region and type outlives predicates
- Trivially sized predicates
|
|
|
|
|
|
|
|
|
|
normalization: avoid incompletely constraining GAT args
We need to copy the behavior of #125214 in the new solver. This fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/202 which seems to be the cause of the regression in `deptypes`.
r? ```@compiler-errors```
|
|
|
|
|
|
|
|
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
|
|
detect additional uses of opaques after writeback
Based on #140607. It's a lot harder to encounter in practice than I though :sweat_smile: :grin: I've still added it with the expectation that somebody will encounter it at some point.
Also modifies the `EvalCtxt` to use the same impl to detect newly added opaque types.
r? ``@compiler-errors``
|
|
|
|
|
|
with ambiguity
|
|
|
|
|