Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point at method chains on E0271 errors #105674

Merged
merged 5 commits into from
Dec 16, 2022
Merged

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Dec 13, 2022

Follow up to #105332. Fix #33941. CC #9082.

r? @oli-obk

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 13, 2022
@estebank estebank force-pushed the iterator-chains branch 2 times, most recently from 5c62917 to 7907144 Compare December 14, 2022 01:29
@bors

This comment was marked as resolved.

@@ -30,7 +30,7 @@ LL | where
LL | F: for<'r> T0<'r, (<Self as Ty<'r>>::V,), O = <B as Ty<'r>>::V>,
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `T1::m`

error[E0271]: expected `[closure@$DIR/issue-62203-hrtb-ice.rs:42:16: 42:19]` to be a closure that returns `Unit3`, but it returns `Unit4`
error[E0271]: expected `[closure@issue-62203-hrtb-ice.rs:42:16]` to be a closure that returns `Unit3`, but it returns `Unit4`
Copy link
Contributor

@oli-obk oli-obk Dec 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably be pointing at the closure's span in such diagnostics. (separate PR)

@oli-obk
Copy link
Contributor

oli-obk commented Dec 14, 2022

r=me after a rebase

@estebank estebank force-pushed the iterator-chains branch 2 times, most recently from 62d01b7 to 7f8fdf4 Compare December 14, 2022 18:01
@estebank
Copy link
Contributor Author

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Dec 14, 2022

📌 Commit 7f8fdf4 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 14, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 14, 2022
Point at method chains on `E0271` errors

Follow up to rust-lang#105332. Fix rust-lang#33941. CC rust-lang#9082.

r? `@oli-obk`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 14, 2022
Point at method chains on `E0271` errors

Follow up to rust-lang#105332. Fix rust-lang#33941. CC rust-lang#9082.

r? ``@oli-obk``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 15, 2022
Point at method chains on `E0271` errors

Follow up to rust-lang#105332. Fix rust-lang#33941. CC rust-lang#9082.

r? ```@oli-obk```
@bors
Copy link
Contributor

bors commented Dec 15, 2022

☔ The latest upstream changes (presumably #105657) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 15, 2022
When `with_forced_trimmed_paths` is used, only print filename and start
of the closure's span, to reduce their verbosity.
Do not say "Type changed to X here" when the only difference is caused
by lifetimes.
@estebank
Copy link
Contributor Author

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Dec 15, 2022

📌 Commit 2492235 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 15, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 15, 2022
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#105481 (Start improving monomorphization items stats)
 - rust-lang#105674 (Point at method chains on `E0271` errors)
 - rust-lang#105679 (Suggest constraining type parameter with `Clone`)
 - rust-lang#105694 (Don't create dummy if val has escaping bounds var)
 - rust-lang#105727 (Tweak output for bare `dyn Trait` in arguments)
 - rust-lang#105739 (Migrate Jump to def links background to CSS variable)
 - rust-lang#105743 (`SimplifiedType` cleanups)
 - rust-lang#105758 (Move `TypeckResults` to separate module)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 622f560 into rust-lang:master Dec 16, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 16, 2022
@estebank estebank deleted the iterator-chains branch November 9, 2023 05:14
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 3, 2024
…piler-errors,estebank

Properly deal with GATs when looking for method chains to point at

Fixes rust-lang#121898.

~~While it prevents an ICE and the structured suggestion is correct, the method chain diagnostic notes are weird / useless / incorrect judging by a quick look. I guess I should improve that in this PR.~~ Sufficiently taken care of.

r? estebank or compiler-errors (rust-lang#105332, rust-lang#105674).
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 4, 2024
…ompiler-errors,estebank

Properly deal with GATs when looking for method chains to point at

Fixes rust-lang#121898.

~~While it prevents an ICE and the structured suggestion is correct, the method chain diagnostic notes are weird / useless / incorrect judging by a quick look. I guess I should improve that in this PR.~~ Sufficiently taken care of.

r? estebank or compiler-errors (rust-lang#105332, rust-lang#105674).
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 4, 2024
Rollup merge of rust-lang#121912 - fmease:diag-method-chains-gat, r=compiler-errors,estebank

Properly deal with GATs when looking for method chains to point at

Fixes rust-lang#121898.

~~While it prevents an ICE and the structured suggestion is correct, the method chain diagnostic notes are weird / useless / incorrect judging by a quick look. I guess I should improve that in this PR.~~ Sufficiently taken care of.

r? estebank or compiler-errors (rust-lang#105332, rust-lang#105674).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error for for _ in HashMap::new().iter().cloned() { } doesn't provide enough context
4 participants