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

Make some diagnostics not depend on the source of what they reference being available #105500

Merged
merged 8 commits into from
Dec 14, 2022

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Dec 9, 2022

r? @estebank

follow up to #104449

@rustbot
Copy link
Collaborator

rustbot commented Dec 9, 2022

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc 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 9, 2022
@estebank
Copy link
Contributor

estebank commented Dec 9, 2022

I'm seeing a bunch of test output changes that do not seem related to your code changes. Could there be a missing commit?

@oli-obk
Copy link
Contributor Author

oli-obk commented Dec 9, 2022

I'm seeing a bunch of test output changes that do not seem related to your code changes. Could there be a missing commit?

I don't believe so

let snippet = match source_map.span_to_snippet(interior_span) {
// #70935: If snippet contains newlines, display "the value" instead
// so that we do not emit complex diagnostics.
Ok(snippet) if !snippet.contains('\n') => format!("`{}`", snippet),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a length check here too, just to make sure that the snippet is not for a long expr in one line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe this entire diagnostic deserves a redesign to point at the span instead of getting the snippet in a message?

@bors
Copy link
Contributor

bors commented Dec 11, 2022

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

@@ -3,11 +3,9 @@ error[E0412]: cannot find type `n` in this scope
|
LL | type_ascribe!(2, n([u8; || 1]))
| ^ help: a trait with a similar name exists: `Fn`
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
Copy link
Contributor

Choose a reason for hiding this comment

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

This is outstanding: it should be ::: or

note: similarly named
  --> $SRC_DIR/...

@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Dec 12, 2022

📌 Commit e9dae2129800ad96b1b0ead3a0f485dbd412c06c has been approved by estebank

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 12, 2022
@bors
Copy link
Contributor

bors commented Dec 13, 2022

☔ The latest upstream changes (presumably #105644) 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 13, 2022
@oli-obk
Copy link
Contributor Author

oli-obk commented Dec 13, 2022

@bors r=estebank

@bors
Copy link
Contributor

bors commented Dec 13, 2022

📌 Commit 82ce70a has been approved by estebank

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 13, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 13, 2022
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#105147 (Allow unsafe through inline const)
 - rust-lang#105438 (Move some codegen-y methods from `rustc_hir_analysis::collect` -> `rustc_codegen_ssa`)
 - rust-lang#105464 (Support #[track_caller] on async closures)
 - rust-lang#105476 (Change pattern borrowing suggestions to be verbose and remove invalid suggestion)
 - rust-lang#105500 (Make some diagnostics not depend on the source of what they reference being available)
 - rust-lang#105628 (Small doc fixes)
 - rust-lang#105659 (Don't require owned data in `MaybeStorageLive`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 15b9e20 into rust-lang:master Dec 14, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 14, 2022
@oli-obk oli-obk deleted the unhide_unknown_spans branch December 14, 2022 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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.

None yet

4 participants