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 }})

eduardosm

Fixes #108680

Supersedes #109710. I used the same wording for the messages, but the implementation is different.

r? @est31

@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

Nov 26, 2023

@rustbot

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

ghost

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]`.

est31

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.

@eduardosm

…rget features outside an unsafe block

@eduardosm

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?

@est31

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.

@eduardosm

…unction with target features outside an unsafe block

@eduardosm

Done, also added a test to cover the case of an unsafe function with a unsafe_op_in_unsafe_fn lint.

est31

Choose a reason for hiding this comment

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

Great work, thank you!

@est31

@bors

📌 Commit 6b066a9 has been approved by est31

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

Nov 29, 2023

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Nov 29, 2023

@matthiaskrgr

…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

Nov 29, 2023

@matthiaskrgr

…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

Nov 29, 2023

@bors

…iaskrgr

Rollup of 7 pull requests

Successful merges:

Failed merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Nov 29, 2023

@rust-timer

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 eduardosm deleted the print-missing-target-features branch

November 29, 2023 18:18

@est31 est31 mentioned this pull request

Dec 2, 2023

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.