-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
missing allow internal unstable for generic_assert #120612
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Feb 3, 2024
matthiaskrgr
changed the title
false positive
false positive Feb 3, 2024
use of unstable library feature
use of unstable library feature
?
saethlin
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
Feb 3, 2024
On pub fn main() {
{
#[allow(unused_imports)]
use ::core::asserting::{TryCaptureGeneric, TryCapturePrintable};
if ::core::intrinsics::unlikely(!true) {
{
::core::panicking::panic_fmt(format_args!("Assertion failed: true"));
}
}
};
}
rust/library/core/src/macros/mod.rs Lines 1537 to 1538 in bf3c6c5
|
Noratrieb
added
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
and removed
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
labels
Feb 4, 2024
Noratrieb
changed the title
false positive
missing allow internal unstable for generic_assert
Feb 4, 2024
use of unstable library feature
?
facebook-github-bot
pushed a commit
to facebook/sapling
that referenced
this issue
Feb 22, 2024
Summary: In D53729268, we started using generic_asserts for better visibility in unit test failures. This makes us use the feature `generic_assert` but also forces us to use `core_intrinsics` which is not strictly needed. The only reason we are forced to use this is [this bug](rust-lang/rust#120612). Clippy doesn't like that we are using compiler internal stuff and gives a strong warning. Since we can't do anything about it, I have added a comment to provide context on why this cannot be fixed currently. Reviewed By: YousefSalama, singhsrb Differential Revision: D54061913 fbshipit-source-id: f5b952bfe13dc0e5af17b5b28c3d18adf43ba000
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jun 7, 2024
Rollup merge of rust-lang#126096 - c410-f3r:tests-tests-tests, r=jhpratt [RFC-2011] Allow `core_intrinsics` when activated Fix rust-lang#120612
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.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
Note that
generic_assert
is not marked as internalhttps://github.com/rust-lang/rust/blob/master/compiler/rustc_feature/src/unstable.rs#L201
I expected to see this happen:
code compiles
Instead, this happened:
Maybe the lint should ignore code from expansions?
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: