Skip to content

rustc_splat is not feature gated in functions without bodies #162639

Description

@JonathanBrouwer

I tried this code:

fn help(x: fn(#[rustc_splat(this = completely invalid $$$)] usize)) {

}

I expected to see this happen: compilation fails because rustc_splat is unstable

Instead, this happened: the code compiles

Meta

rustc --version --verbose:

rustc 1.98.0 (88d9e12ae 2026-08-18)
binary: rustc
commit-hash: 88d9e12ae178fab0fb5cc050a94da85685d449ea
commit-date: 2026-08-18
host: x86_64-unknown-linux-gnu
release: 1.98.0
LLVM version: 22.1.8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)C-bugCategory: This is a bug.F-splat`#![feature(splat)]` https://github.com/rust-lang/rust/issues/153629I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions