[RFC 2091] Add #[track_caller] attribute.
- The attribute is behind a feature gate. - Error if both #[naked] and #[track_caller] are applied to the same function. - Error if #[track_caller] is applied to a non-function item. - Error if ABI is not "rust" - Error if #[track_caller] is applied to a trait function. Error codes and descriptions are pending.
This commit is contained in:
parent
e3cb9ea15a
commit
543449d4fd
22 changed files with 199 additions and 1 deletions
|
|
@ -1640,6 +1640,16 @@ each method; it is not possible to annotate the entire impl with an `#[inline]`
|
|||
attribute.
|
||||
"##,
|
||||
|
||||
E0900: r##"
|
||||
TODO: change error number
|
||||
TODO: track_caller: invalid syntax
|
||||
"##,
|
||||
|
||||
E0901: r##"
|
||||
TODO: change error number
|
||||
TODO: track_caller: no naked functions
|
||||
"##,
|
||||
|
||||
E0522: r##"
|
||||
The lang attribute is intended for marking special items that are built-in to
|
||||
Rust itself. This includes special traits (like `Copy` and `Sized`) that affect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue