| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Change-Id: I3fa00e999a2ee4eb72db1fdf53a8633b49176a18
|
|
|
|
|
|
Make `intern_lazy_const` actually intern its argument.
Currently it just unconditionally allocates it in the arena.
For a "Clean Check" build of the the `packed-simd` benchmark, this
change reduces both the `max-rss` and `faults` counts by 59%; it
slightly (~3%) increases the instruction counts but the `wall-time` is
unchanged.
For the same builds of a few other benchmarks, `max-rss` and `faults`
drop by 1--5%, but instruction counts and `wall-time` changes are in the
noise.
Fixes #57432, fixes #57829.
|
|
Currently it just unconditionally allocates it in the arena.
For a "Clean Check" build of the the `packed-simd` benchmark, this
change reduces both the `max-rss` and `faults` counts by 59%; it
slightly (~3%) increases the instruction counts but the `wall-time` is
unchanged.
For the same builds of a few other benchmarks, `max-rss` and `faults`
drop by 1--5%, but instruction counts and `wall-time` changes are in the
noise.
Fixes #57432, fixes #57829.
|
|
|
|
We equate the type in the annotation with the inferred type first so
that we have a fully inferred type to perform the well-formedness check
on.
|
|
Don't emit `Unevaluated` from `const_eval`
cc @eddyb @RalfJung
|
|
Previously, evaluation ignored outlives relationships. Since we using
evaluation to skip the "normal" trait selection (which enforces
outlives relationships) this led to incorrect results in some cases.
|
|
|
|
This commit stops well-formedness checking applying to unreachable code
and therefore stops some of the ICEs that the intended solution taken by
this PR causes.
By disabling these checks, we can land the other fixes and larger
refactors that this PR includes.
|
|
This commit uses the map introduced by the previous commit to ensure
that types are always checked for well-formedness by the NLL type check.
Previously, without the map introduced by the previous commit, types
would not be checked for well-formedness if the `AscribeUserType`
statement that would trigger that check was removed as unreachable code.
|
|
|
|
A few tweaks to dropck_outlives
- remove an unnecessary call to `cloned()`
- simplify common patterns
|
|
|
|
|
|
that allows the error reporting to contain the span.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
But.. we don't really use it for anything right now.
|
|
|
|
Add regression tests for #55219 and #55241
Also another test where a duplicate-like error appears to have been
suppressed; I'm not 100% sure why this output changes, though I could
imagine that some duplicate suppression is enabled by this PR.
|
|
Lots of annoying boilerplate.
|
|
|
|
|
|
`Result` really sounds like the rustc result type
|
|
|
|
This seemed like a good way to kick the tires on the
elided-lifetimes-in-paths lint (#52069)—seems to work! This was also
pretty tedious—it sure would be nice if `cargo fix` worked on this
codebase (#53896)!
|
|
overlook overflows in rustdoc trait solving
Context:
The new rustdoc "auto trait" feature walks across impls and tries to run trait solving on them with a lot of unconstrained variables. This is prone to overflows. These overflows used to cause an ICE because of a caching bug (fixed in this PR). But even once that is fixed, it means that rustdoc causes an overflow rather than generating docs.
This PR therefore adds a new helper that propagates the overflow error out. This requires rustdoc to then decide what to do when it encounters such an overflow: technically, an overflow represents neither "yes" nor "no", but rather a failure to make a decision. I've decided to opt on the side of treating this as "yes, implemented", since rustdoc already takes an optimistic view. This may prove to include too many items, but I *suspect* not.
We could probably reduce the rate of overflows by unifying more of the parameters from the impl -- right now we only seem to consider the self type. Moreover, in the future, as we transition to Chalk, overflow errors are expected to just "go away" (in some cases, though, queries might return an ambiguous result).
Fixes #52873
cc @QuietMisdreavus -- this is the stuff we were talking about earlier
cc @GuillaumeGomez -- this supersedes #53687
|
|
|
|
|
|
|
|
|
|
fix NLL ICEs
Custom type-ops reuse some of the query machinery -- but while query results are canonicalized after they are constructed, custom type ops are not, and hence we have to resolve the type variables to avoid an ICE here.
Also, use the type-op machinery for implied outlives bounds.
Fixes #53568
Fixes #52992
Fixes #53680
|
|
tristanburgess:52985_diagnostics_no_concrete_type_behind_existential_type, r=oli-obk
52985 diagnostics no concrete type behind existential type
@oli-obk FYI. See below for new cycle error generated.
```rust
error[E0391]: cycle detected when processing `Foo`
--> /dev/staging/existential_type_no_concrete_type_nouse_potential.rs:3:1
|
3 | existential type Foo: Copy;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: ...which requires processing `bar`...
--> /dev/staging/existential_type_no_concrete_type_nouse_potential.rs:6:23
|
6 | fn bar(x: Foo) -> Foo {
| _______________________^
7 | | x
8 | | }
| |_^
= note: ...which again requires processing `Foo`, completing the cycle
error: aborting due to previous error
For more information about this error, try `rustc --explain E0391`.
```
|
|
Fixes #52992
|
|
|
|
|
|
|
|
- Original cycle error diagnostics PR'd against this issue caught
panic-causing error while resolving std::mem::transmute calls
- Now, catch invalid use case of not providing a concrete sized type
behind existential type in definining use case.
- Update relevant test to reflect this new error
52985: revert normalize query changes
- PR 53588 invalidates 53316, causing a correct cycle error to occur
with a good span.
- Don't need to revert the whole merge as the test files are
still fine, just need to revert the normalize query changes.
- It should now be correct that infinite recursion detected during
normalize query type folding is a bug, should have been caught earlier
(when resolving the existential type's defining use cases).
52985: code review impl
- Only cause cycle error if anonymous type resolves to anonymous type
that has the same def id (is the same type) as the original (parent)
type.
- Add test case to cover this case for existential types.
52985: remove Ty prefix from TyAnon
- To align with changes per commit 6f637da50c56a22f745fd056691da8c86824cd9b
|
|
|
|
|