| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Improve spans of non-WF implied bound types
Fixes #60980
|
|
Suppress type errors that come from private fields
Fixes #57320
There was some discussion here (https://github.com/rust-lang/rust/issues/57320#issuecomment-451308420), but I honestly think the second error is worth suppressing regardless.
I would be open to feedback though -- perhaps we can suppress the `.len()` suggestion if there's type error (since we have access to [`Expectation`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir_typeck/enum.Expectation.html), we can determine that).
r? ``@estebank``
|
|
|
|
|
|
|
|
|
|
|
|
fix rustdoc ui test
|
|
Rollup of 6 pull requests
Successful merges:
- #105846 (Account for return-position `impl Trait` in trait in `opt_suggest_box_span`)
- #106385 (Split `-Zchalk` flag into `-Ztrait-solver=(classic|chalk|next)` flag)
- #106403 (Rename `hir::Map::{get_,find_}parent_node` to `hir::Map::{,opt_}parent_id`, and add `hir::Map::{get,find}_parent`)
- #106462 (rustdoc: remove unnecessary wrapper around sidebar and mobile logos)
- #106464 (Update Fuchsia walkthrough with new configs)
- #106478 (Tweak wording of fn call with wrong number of args)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Tweak wording of fn call with wrong number of args
|
|
Don't deduce a signature that makes a closure cyclic
Sometimes when elaborating supertrait bounds for closure signature inference, we end up deducing a closure signature that is cyclical because either a parameter or the return type references a projection mentioning `Self` that also has escaping bound vars, which means that it's not eagerly replaced with an inference variable.
Interestingly, this is not *just* related to my PR that elaborates supertrait bounds for closure signature deduction. The committed test `supertrait-hint-cycle-3.rs` shows **stable** code that is fixed by this PR:
```rust
trait Foo<'a> {
type Input;
}
impl<F: Fn(u32)> Foo<'_> for F {
type Input = u32;
}
fn needs_super<F: for<'a> Fn(<F as Foo<'a>>::Input) + for<'a> Foo<'a>>(_: F) {}
fn main() {
needs_super(|_: u32| {});
}
```
Fixes #105401
Fixes #105396
r? types
|
|
|
|
|
|
r=Nilstrieb
Test the borrowck behavior of if-let guards
Add some tests to make sure that if-let guards behave the same as if guards with respect to borrow-checking. Most of them are a naive adaptation, replacing an `if` guard with `if let Some(())`.
This includes regression tests for notable issues that arose for if guards (#24535, #27282, #29723, #31287) as suggested in https://github.com/rust-lang/rust/issues/51114#issuecomment-900470419.
cc `@pnkfelix` are there any other tests that you would want to see?
cc tracking issue #51114
|
|
Merge multiple mutable borrows of immutable binding errors
Fix #53466.
|
|
|
|
|
|
Use verbose suggestions for mutability errors
|
|
Trim more paths in obligation types
|
|
Instead of
```
LL | fn oom(
| __^
| | _|
| ||
LL | || ) {
| ||_-
LL | | }
| |__^
```
emit
```
LL | // fn oom(
LL | || ) {
| ||_-
LL | | }
| |__^
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print argument name in arg mismatch if possible
A bit more contextual than just `/* value */`, at least when the argument is named something related to its context.
The UI test cases are... not super convincing, but also they're minimized tests.
|
|
|
|
Tweak output for bare `dyn Trait` in arguments
Fix #35825.
|
|
|
|
When `with_forced_trimmed_paths` is used, only print filename and start
of the closure's span, to reduce their verbosity.
|
|
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- #104592 (Ensure async trait impls are async (or otherwise return an opaque type))
- #105623 (Fix `-Z print-type-sizes` for generators with discriminant field ordered first)
- #105627 (Auto traits in `dyn Trait + Auto` are suggestable)
- #105633 (Make `report_projection_error` more `Term` agnostic)
- #105683 (Various cleanups to dest prop)
- #105692 (Add regression test for #104678)
- #105707 (rustdoc: remove unnecessary CSS `kbd { cursor: default }`)
- #105715 (Do not mention long types in E0599 label)
- #105722 (more clippy::complexity fixes)
- #105724 (rustdoc: remove no-op CSS `.scrape-example .src-line-numbers { margin: 0 }`)
- #105730 (rustdoc: remove no-op CSS `.item-info:before { color }`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Do not mention long types in E0599 label
The type is already mentioned in the main message and the list of unmet bounds.
|
|
Fix #35825.
|
|
The type is already mentioned in the main message and the list of unmet
bounds.
|
|
|
|
|
|
Suggest `collect`ing into `Vec<_>`
Fix #105510.
|
|
|
|
Make some diagnostics not depend on the source of what they reference being available
r? `@estebank`
follow up to https://github.com/rust-lang/rust/pull/104449
|
|
|
|
|
|
|
|
Synthesize a more accurate span and use verbose suggestion output to
make the message clearer.
|
|
|
|
|
|
relying on the span making it obvious
|