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

Fix use suggestion span #106962

Merged
merged 2 commits into from
Jan 17, 2023
Merged

Fix use suggestion span #106962

merged 2 commits into from
Jan 17, 2023

Conversation

compiler-errors
Copy link
Member

Fixes #106954

@rustbot
Copy link
Collaborator

rustbot commented Jan 17, 2023

r? @oli-obk

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

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

This comment has been minimized.

@workingjubilee
Copy link
Member

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

@compiler-errors
Copy link
Member Author

@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
Member Author

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
Member

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

@oli-obk
Copy link
Contributor

oli-obk commented Jan 17, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 17, 2023

📌 Commit 2172577 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 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:master Jan 17, 2023
@rustbot rustbot 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 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.

Extra semicolon in use candidate suggestion
6 participants