Skip to content

Fix use suggestion span - #106962

Merged
bors merged 2 commits into
rust-lang:masterfrom
compiler-errors:use-sugg-span
Jan 17, 2023
Merged

Fix use suggestion span#106962
bors merged 2 commits into
rust-lang:masterfrom
compiler-errors:use-sugg-span

Conversation

@compiler-errors

Copy link
Copy Markdown
Contributor

Fixes#106954

@rustbot

Copy link
Copy Markdown
Collaborator

r? @oli-obk

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

@rustbotrustbot 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 Jan 17, 2023
@rust-log-analyzer

This comment has been minimized.

@workingjubilee

Copy link
Copy Markdown
Member

Is there a test for the std::sync::{Mutex, AtomicU32}; case being handled correctly after the suggestion is applied?

@compiler-errors

Copy link
Copy Markdown
ContributorAuthor

@workingjubilee that was fixed in #106175, but it's not currently a structured/apply-able suggestion due to the spans not being tracked correctly.

@compiler-errors

Copy link
Copy Markdown
ContributorAuthor

On nightly:

error[E0432]
--> src/lib.rs:1:24
|
1 | use std::sync::{Mutex, AtomicU32};
| ^^^^^^^^^ no `AtomicU32` in `sync`
|
= note: consider importing one of these items instead:
pin_utils::core_reexport::sync::atomic::AtomicU32
std::sync::atomic::AtomicU32
core::sync::atomic::AtomicU32

@rust-log-analyzer

This comment has been minimized.

@workingjubilee

Copy link
Copy Markdown
Member

No problem, just thought I'd ask, as I had been fiddling around with a few cases of this.

@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Jan 17, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 2172577 has been approved by oli-obk

It is now in the queue for this repository.

@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 Jan 17, 2023
@Dylan-DPCDylan-DPC mentioned this pull request Jan 17, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 17, 2023
Rollup of 5 pull requests
Successful merges:
- rust-lang#101698 (Constify `TypeId` ordering impls)
- rust-lang#106148 (Fix unused_parens issue for higher ranked function pointers)
- rust-lang#106922 (Avoid unsafe code in `to_ascii_[lower/upper]case()`)
- rust-lang#106951 (Remove ineffective run of SimplifyConstCondition)
- rust-lang#106962 (Fix use suggestion span)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit e6e7c39 into rust-lang:masterJan 17, 2023
@rustbotrustbot added this to the 1.68.0 milestone Jan 17, 2023
@compiler-errors
compiler-errors deleted the use-sugg-span branch August 11, 2023 20:22
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.

Extra semicolon in use candidate suggestion

6 participants

@compiler-errors@rustbot@rust-log-analyzer@workingjubilee@oli-obk@bors