-
Notifications
You must be signed in to change notification settings - Fork 13k
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
cfg!(unsafe(foo))
and --check-cfg=unsafe(cfg(foo))
are erroneously accepted on beta
#131055
Labels
C-bug
Category: This is a bug.
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
Comments
Urgau
added
C-bug
Category: This is a bug.
regression-untriaged
Untriaged performance or correctness regression.
labels
Sep 30, 2024
rustbot
added
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
and removed
regression-untriaged
Untriaged performance or correctness regression.
labels
Sep 30, 2024
|
jieyouxu
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Sep 30, 2024
@Noratrieb except that neither
|
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Sep 30, 2024
Reject leading unsafe in `cfg!(...)` and `--check-cfg` This PR reject leading unsafe in `cfg!(...)` and `--check-cfg`. Fixes (after-backport) rust-lang#131055 r? `@jieyouxu`
makes sense |
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 30, 2024
Rollup merge of rust-lang#131057 - Urgau:cfg-erronous-unsafe, r=jieyouxu Reject leading unsafe in `cfg!(...)` and `--check-cfg` This PR reject leading unsafe in `cfg!(...)` and `--check-cfg`. Fixes (after-backport) rust-lang#131055 r? `@jieyouxu`
apiraino
removed
the
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
label
Oct 9, 2024
Merged
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 11, 2024
[beta] backports - Only add an automatic SONAME for Rust dylibs rust-lang#130960 - Reject leading unsafe in `cfg!(...)` and `--check-cfg` rust-lang#131057, resolving rust-lang#131055 - Disable jump threading `UnOp::Not` for non-bool rust-lang#131201 - Update LLVM submodule rust-lang#131448 r? ghost
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 11, 2024
[beta] backports - Only add an automatic SONAME for Rust dylibs rust-lang#130960 - Reject leading unsafe in `cfg!(...)` and `--check-cfg` rust-lang#131057, resolving rust-lang#131055 - Disable jump threading `UnOp::Not` for non-bool rust-lang#131201 - Update LLVM submodule rust-lang#131448 r? ghost
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 12, 2024
[beta] backports - Only add an automatic SONAME for Rust dylibs rust-lang#130960 - Reject leading unsafe in `cfg!(...)` and `--check-cfg` rust-lang#131057, resolving rust-lang#131055 - Disable jump threading `UnOp::Not` for non-bool rust-lang#131201 - Update LLVM submodule rust-lang#131448 r? ghost
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 12, 2024
[beta] backports - Only add an automatic SONAME for Rust dylibs rust-lang#130960 - Reject leading unsafe in `cfg!(...)` and `--check-cfg` rust-lang#131057, resolving rust-lang#131055 - Disable jump threading `UnOp::Not` for non-bool rust-lang#131201 - Update LLVM submodule rust-lang#131448 - Split x86_64-msvc-ext into two jobs rust-lang#130072 - Use a small runner for msvc-ext2 job rust-lang#130151 r? ghost
Backported in #131423, closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
cfg!(unsafe(foo))
and--check-cfg=unsafe(cfg(foo))
both are erroneously accepted on beta.They should not be accepted, neither of them is in any way "unsafe".
Code
I tried this code:
I expected to see this happen: an error saying that
unsafe
cannot be put here like for#[cfg]
&#[cfg_attr]
.Instead, this happened: the
unsafe
is silently accepted.Version it worked on
It most recently worked on: 1.81
Version with regression
rustc --version --verbose
:@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged
The text was updated successfully, but these errors were encountered: