Print list of missing target features when calling a function with target features outside an unsafe block by eduardosm · Pull Request #118333 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
bors merged 2 commits intorust-lang:masterfromeduardosm:print-missing-target-features
Nov 29, 2023
Conversation9 Commits2 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Fixes #108680
Supersedes #109710. I used the same wording for the messages, but the implementation is different.
r? @est31
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Some changes occurred to MIR optimizations
cc @rust-lang/wg-mir-opt
CallToFunctionWith, |
---|
CallToFunctionWith { |
/// Target features enabled in callee's `#[target_feature]` but missing in |
/// caller's `#[target_feature]` |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// caller's `#[target_feature]` |
---|
/// caller's `#[target_feature]`. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for filing!
LGTM except one question: could you add something to the existing test that excercises the mir_transform_target_feature_call_note
case with multiple target features? Because right now, there is only tests for one.
…rget features outside an unsafe block
Done.
I just learned about -Z thir-unsafeck
. If I understood it correctly, it is an alternative unsafety checker that runs on a different stage. Do we want to make the change there too?
Do we want to make the change there too?
Yeah good point, we'd want that change be present there, too. So the .thir.stderr file should have the same changes in the end as .mir.stderr, ideally.
…unction with target features outside an unsafe block
Done, also added a test to cover the case of an unsafe function with a unsafe_op_in_unsafe_fn
lint.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you!
📌 Commit 6b066a9 has been approved by est31
It is now in the queue for this repository.
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
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
…tures, r=est31
Print list of missing target features when calling a function with target features outside an unsafe block
Fixes rust-lang#108680
Supersedes rust-lang#109710. I used the same wording for the messages, but the implementation is different.
r? @est31
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
…tures, r=est31
Print list of missing target features when calling a function with target features outside an unsafe block
Fixes rust-lang#108680
Supersedes rust-lang#109710. I used the same wording for the messages, but the implementation is different.
r? @est31
bors added a commit to rust-lang-ci/rust that referenced this pull request
…iaskrgr
Rollup of 7 pull requests
Successful merges:
- rust-lang#118157 (Add
never_patterns
feature gate) - rust-lang#118191 (Suggest
let
or==
on typo'd let-chain) - rust-lang#118231 (also add is_empty to const raw slices)
- rust-lang#118333 (Print list of missing target features when calling a function with target features outside an unsafe block)
- rust-lang#118426 (ConstProp: Correctly remove const if unknown value assigned to it.)
- rust-lang#118428 (rustdoc: Move
AssocItemRender
andRenderMode
tohtml::render
.) - rust-lang#118438 (Update nto-qnx.md)
Failed merges:
- rust-lang#118268 (Pretty print
Fn<(..., ...)>
trait refs with parentheses (almost) always)
r? @ghost
@rustbot
modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#118333 - eduardosm:print-missing-target-features, r=est31
Print list of missing target features when calling a function with target features outside an unsafe block
Fixes rust-lang#108680
Supersedes rust-lang#109710. I used the same wording for the messages, but the implementation is different.
r? @est31
eduardosm deleted the print-missing-target-features branch
est31 mentioned this pull request
Labels
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the compiler team, which will review and decide on the PR/issue.