-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Feature-gating on closures is broken #97073
Copy link
Copy link
Open
Labels
A-closuresArea: Closures (`|…| { … }`)Area: Closures (`|…| { … }`)C-bugCategory: This is a bug.Category: This is a bug.T-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.
Metadata
Metadata
Assignees
Labels
A-closuresArea: Closures (`|…| { … }`)Area: Closures (`|…| { … }`)C-bugCategory: This is a bug.Category: This is a bug.T-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
If we try to apply
#[track_caller]on closures, like:This needs an
#![feature(closure_track_caller)], which is normal, but it also needs the feature attributes on the crates that have a caller of that method.See #96894 (comment) and #96894 (comment) for more details.
TL;DR: In the above PR's situation, that method belongs to rustc_hir but we also have to add the feature attributes to rustc_resolve and librustdoc.
I expected to see this happen: compiles fine with one feature attribute
Instead, this happened: compilation error