-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-never_type`#![feature(never_type)]``#![feature(never_type)]`P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
I tried this code:
pub fn look_ma_no_feature_gate<F: FnOnce() -> !>() {}
I expected to see this happen: “error[E0658]: the !
type is experimental”
Instead, this happened: Successful compilation, as long as I'm using a nightly compiler, but the error when on stable 1.75.
This is incorrect because nightly features should always require #![feature]
attributes on nightly (until they're stabilized, which hasn't happened yet for !
).
Meta
rustc --version --verbose
:
rustc 1.77.0-nightly (11f32b73e 2024-01-31)
binary: rustc
commit-hash: 11f32b73e0dc9287e305b5b9980d24aecdc8c17f
commit-date: 2024-01-31
host: x86_64-apple-darwin
release: 1.77.0-nightly
LLVM version: 17.0.6
@rustbot label +F-never_type +requires-nightly
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-never_type`#![feature(never_type)]``#![feature(never_type)]`P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.