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

Use existing infcx when emitting trait impl diagnostic #75363

Merged
merged 1 commit into from
Aug 11, 2020

Conversation

Aaron1011
Copy link
Member

Fixes #75361
Fixes #74918

Previously, we were creating a new InferCtxt, which caused an ICE when
used with type variables from the existing InferCtxt

Fixes rust-lang#75361
Fixes rust-lang#74918

Previously, we were creating a new `InferCtxt`, which caused an ICE when
used with type variables from the existing `InferCtxt`
@rust-highfive
Copy link
Collaborator

r? @lcnr

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 10, 2020
|
help: consider introducing a named lifetime parameter
|
LL | type Item<'a> = IteratorChunk<<'a>T, S>;
Copy link
Contributor

Choose a reason for hiding this comment

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

do we already have an issue for this error message?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure, but to fix it we need to extend the logic in the last match at the end of add_missing_lifetime_specifiers_label.

Copy link
Contributor

@estebank estebank Aug 10, 2020

Choose a reason for hiding this comment

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

#75372 tested locally:

Screen Shot 2020-08-10 at 12 33 21 PM

@lcnr
Copy link
Contributor

lcnr commented Aug 10, 2020

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 10, 2020

📌 Commit 4ed0c6a has been approved by lcnr

@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 Aug 10, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 11, 2020
Rollup of 10 pull requests

Successful merges:

 - rust-lang#75098 (Clippy pointer cast lint experiment)
 - rust-lang#75249 (Only add a border for the rust logo)
 - rust-lang#75315 (Avoid deleting temporary files on error)
 - rust-lang#75316 (Don't try to use wasm intrinsics on vectors)
 - rust-lang#75337 (instance: only polymorphize upvar substs)
 - rust-lang#75339 (evaluate required_consts when pushing stack frame in Miri engine)
 - rust-lang#75363 (Use existing `infcx` when emitting trait impl diagnostic)
 - rust-lang#75366 (Add help button)
 - rust-lang#75369 (Move to intra-doc links in /library/core/src/borrow.rs)
 - rust-lang#75379 (Use intra-doc links in /library/core/src/cmp.rs)

Failed merges:

r? @ghost
@bors bors merged commit dff868e into rust-lang:master Aug 11, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Aug 13, 2020
Fix suggestion to use lifetime in type and in assoc const

_Do not merge until rust-lang#75363 has landed, as it has the test case for this._

* Account for associated types
* Associated `const`s can't have generics (fix rust-lang#74264)
* Do not suggest duplicate lifetimes and suggest `for<'a>` more (fix rust-lang#72404)
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Aug 13, 2020
Fix suggestion to use lifetime in type and in assoc const

_Do not merge until rust-lang#75363 has landed, as it has the test case for this._

* Account for associated types
* Associated `const`s can't have generics (fix rust-lang#74264)
* Do not suggest duplicate lifetimes and suggest `for<'a>` more (fix rust-lang#72404)
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to compile a graph test Small program causes internal compiler error on rustc 1.45.0
6 participants