-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-specializationArea: Trait impl specializationArea: Trait impl specializationF-specialization`#![feature(specialization)]``#![feature(specialization)]`F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`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.T-langRelevant to the language teamRelevant to the language team
Description
The current implementation of #[track_caller]
allows trait methods to have the annotation, including at their definition site. When applied in a trait definition, the attribute has effect on all impls. @eddyb raised the question in code review of whether you should also be able to add the attribute without adding an implementation as part of a specialization chain.
To me this seems like the correct semantics given what we'd like the non-specialized behavior to be. It's probably a little complicated to implement.
Metadata
Metadata
Assignees
Labels
A-specializationArea: Trait impl specializationArea: Trait impl specializationF-specialization`#![feature(specialization)]``#![feature(specialization)]`F-track_caller`#![feature(track_caller)]``#![feature(track_caller)]`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.T-langRelevant to the language teamRelevant to the language team