Skip to content

Suggest extern crate foo when failing to resolve use foo - #97264

Merged
bors merged 1 commit into
rust-lang:masterfrom
TaKO8Ki:suggest-extern-crate-when-failing-to-resolve-use-crate
Jun 1, 2022
Merged

Suggest extern crate foo when failing to resolve use foo#97264
bors merged 1 commit into
rust-lang:masterfrom
TaKO8Ki:suggest-extern-crate-when-failing-to-resolve-use-crate

Conversation

@TaKO8Ki

Copy link
Copy Markdown
Member

@rustbotrustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 22, 2022
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 22, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@TaKO8Ki
TaKO8Kiforce-pushed the suggest-extern-crate-when-failing-to-resolve-use-crate branch from b3ff096 to 938f0a4CompareMay 22, 2022 04:27
@estebank

Copy link
Copy Markdown
Contributor

Ideally we could provide a structured suggestion (we already look around for a span for use suggestions) so that people that don't know where the crate root is are helped (although the diagnostic machinery assumes that every change is in the local file so it doesn't print out the file path... maybe we should change that too).

Would you have the time to squash your commits? r=me either way.

@TaKO8Ki
TaKO8Kiforce-pushed the suggest-extern-crate-when-failing-to-resolve-use-crate branch from 938f0a4 to b2480a0CompareMay 25, 2022 00:59
@TaKO8Ki

Copy link
Copy Markdown
MemberAuthor

@estebank
I squashed my commits!

@TaKO8Ki
TaKO8Ki requested a review from estebankMay 31, 2022 05:20
@estebank

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Jun 1, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit b2480a0 has been approved by estebank

@borsbors 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 Jun 1, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 1, 2022
…ailing-to-resolve-use-crate, r=estebank
Suggest `extern crate foo` when failing to resolve `use foo`
closesrust-lang#97095
r? `@estebank`
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 1, 2022
…askrgr
Rollup of 4 pull requests
Successful merges:
- rust-lang#96271 (suggest `?` when method is missing on `Result<T, _>` but found on `T`)
- rust-lang#97264 (Suggest `extern crate foo` when failing to resolve `use foo`)
- rust-lang#97592 (rustdoc: also index impl trait and raw pointers)
- rust-lang#97621 (update Miri)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit daedae7 into rust-lang:masterJun 1, 2022
@rustbotrustbot added this to the 1.63.0 milestone Jun 1, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

In 2015 edition, mention the need for extern crate foo when failing to resolve use foo

6 participants

@TaKO8Ki@rust-log-analyzer@estebank@bors@rust-highfive@rustbot