attribute.
"##,
-E0900: r##"
-FIXME(anp): change error number
-FIXME(anp): track_caller: invalid syntax
-"##,
-
-E0901: r##"
-FIXME(anp): change error number
-FIXME(anp): 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
rejected in your own crates.
"##,
+E0736: r##"
+#[track_caller] and #[naked] cannot be applied to the same function.
+
+This is primarily due to ABI incompatibilities between the two attributes.
+See [RFC 2091] for details on this and other limitations.
+
+[RFC 2091]: https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md
+"##,
+
;
// E0006, // merged with E0005
// E0101, // replaced with E0282
E0726, // non-explicit (not `'_`) elided lifetime in unsupported position
E0727, // `async` generators are not yet supported
E0728, // `await` must be in an `async` function or block
+ E0735, // invalid track_caller application/syntax
}
struct_span_err!(
self.tcx.sess,
attr.span,
- E0900,
+ E0735,
"attribute should be applied to function"
)
.span_label(item.span, "not a function")
struct_span_err!(
self.tcx.sess,
attr.span,
- E0901,
+ E0736,
"cannot use `#[track_caller]` with `#[naked]`",
)
.emit();
struct_span_err!(
tcx.sess,
attr.span,
- E0903,
+ E0738,
"`#[track_caller]` is not supported for trait items yet."
).emit();
}
struct_span_err!(
tcx.sess,
attr.span,
- E0902,
+ E0737,
"rust ABI is required to use `#[track_caller]`"
).emit();
}
and the pin is required to keep it in the same place in memory.
"##,
-E0902: r##"
-FIXME(anp): change error number
-FIXME(anp): track_caller: require Rust ABI to use track_caller
+E0737: r##"
+#[track_caller] requires functions to have the "Rust" ABI for passing caller
+location. See [RFC 2091] for details on this and other restrictions.
+
+[RFC 2091]: https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md
"##,
-E0903: r##"
-FIXME(anp): change error number
-FIXME(anp): track_caller: can't apply in traits
+E0738: r##"
+#[track_caller] cannot be applied to trait methods. See [RFC 2091]
+for details on this and other restrictions.
+
+[RFC 2091]: https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md
"##,
;
-error[E0902]: rust ABI is required to use `#[track_caller]`
+error[E0737]: rust ABI is required to use `#[track_caller]`
--> $DIR/error-with-invalid-abi.rs:3:1
|
LL | #[track_caller]
error: aborting due to previous error
-For more information about this error, try `rustc --explain E0902`.
+For more information about this error, try `rustc --explain E0737`.
-error[E0901]: cannot use `#[track_caller]` with `#[naked]`
+error[E0736]: cannot use `#[track_caller]` with `#[naked]`
--> $DIR/error-with-naked.rs:3:1
|
LL | #[track_caller]
error: aborting due to previous error
-For more information about this error, try `rustc --explain E0901`.
+For more information about this error, try `rustc --explain E0736`.
-error[E0903]: `#[track_caller]` is not supported for trait items yet.
+error[E0738]: `#[track_caller]` is not supported for trait items yet.
--> $DIR/error-with-trait-fns.rs:4:5
|
LL | #[track_caller]
error: aborting due to previous error
-For more information about this error, try `rustc --explain E0903`.
+For more information about this error, try `rustc --explain E0738`.
-error[E0900]: attribute should be applied to function
+error[E0735]: attribute should be applied to function
--> $DIR/only-for-fns.rs:3:1
|
LL | #[track_caller]
error: aborting due to previous error
-For more information about this error, try `rustc --explain E0900`.
+For more information about this error, try `rustc --explain E0735`.