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

Improve the diagnostic for when an fn contains qualifiers inside an extern block. #79082

Merged
merged 2 commits into from
Nov 19, 2020
Merged

Improve the diagnostic for when an fn contains qualifiers inside an extern block. #79082

merged 2 commits into from
Nov 19, 2020

Conversation

ThePuzzlemaker
Copy link
Contributor

@ThePuzzlemaker ThePuzzlemaker commented Nov 15, 2020

This mitigates #78941. As suggested by @estebank, span_suggestion was replaced with span_suggestion_verbose for this specific diagnostic.

@rust-highfive
Copy link
Collaborator

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

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 15, 2020
@ThePuzzlemaker ThePuzzlemaker changed the title Use a verbose suggestion when qualifiers on a fn are used in an extern block. Use a verbose suggestion when an fn contains qualifier inside an extern block. Nov 15, 2020
@ThePuzzlemaker ThePuzzlemaker changed the title Use a verbose suggestion when an fn contains qualifier inside an extern block. Use a verbose suggestion when an fn contains qualifiers inside an extern block. Nov 15, 2020
@ThePuzzlemaker ThePuzzlemaker marked this pull request as draft November 15, 2020 23:38
@ThePuzzlemaker
Copy link
Contributor Author

I have made this a draft as I may amend this with more commits to make the diagnostic better (as I feel that it could be improved). I have started a thread at t-compiler/wg-diagnostics on Zulip (hopefully that's the right stream) to discuss whether or not and/or how the diagnostic should be improved.

@jyn514 jyn514 added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 16, 2020
@varkor
Copy link
Member

varkor commented Nov 16, 2020

r? @estebank

@rust-highfive rust-highfive assigned estebank and unassigned varkor Nov 16, 2020
@ThePuzzlemaker ThePuzzlemaker changed the title Use a verbose suggestion when an fn contains qualifiers inside an extern block. Improve the diagnostic for when an fn contains qualifiers inside an extern block. Nov 16, 2020
@ThePuzzlemaker ThePuzzlemaker marked this pull request as ready for review November 16, 2020 18:07
@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Nov 17, 2020

📌 Commit b8ed466 has been approved by estebank

@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 Nov 17, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Nov 19, 2020
…stebank

Improve the diagnostic for when an `fn` contains qualifiers inside an `extern` block.

This mitigates rust-lang#78941. As suggested by `@estebank,` `span_suggestion` was replaced with `span_suggestion_verbose` for this specific diagnostic.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Nov 19, 2020
…stebank

Improve the diagnostic for when an `fn` contains qualifiers inside an `extern` block.

This mitigates rust-lang#78941. As suggested by ``@estebank,`` `span_suggestion` was replaced with `span_suggestion_verbose` for this specific diagnostic.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 19, 2020
Rollup of 14 pull requests

Successful merges:

 - rust-lang#78961 (Make bad "rust-call" arguments no longer ICE)
 - rust-lang#79082 (Improve the diagnostic for when an `fn` contains qualifiers inside an `extern` block.)
 - rust-lang#79090 (libary: Forward compiler-builtins "asm"  and "mangled-names" feature)
 - rust-lang#79094 (Add //ignore-macos to pretty-std-collections.rs)
 - rust-lang#79101 (Don't special case constant operands when lowering intrinsics)
 - rust-lang#79102 (Add two regression tests)
 - rust-lang#79110 (Remove redundant notes in E0275)
 - rust-lang#79116 (compiletest: Fix a warning in debuginfo tests on windows-gnu)
 - rust-lang#79117 (add optimization fuel checks to some mir passes)
 - rust-lang#79147 (Highlight MIR as Rust on GitHub)
 - rust-lang#79149 (Move capture lowering from THIR to MIR)
 - rust-lang#79155 (fix handling the default config for profiler and sanitizers)
 - rust-lang#79156 (Allow using `download-ci-llvm` from directories other than the root)
 - rust-lang#79164 (Permit standalone generic parameters as const generic arguments in macros)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3f0f224 into rust-lang:master Nov 19, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints 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.

7 participants