Add long error explanation for E0739
This commit is contained in:
parent
3dbade652e
commit
6f2c01bcfb
3 changed files with 15 additions and 1 deletions
|
@ -411,6 +411,7 @@ E0735: include_str!("./error_codes/E0735.md"),
|
|||
E0736: include_str!("./error_codes/E0736.md"),
|
||||
E0737: include_str!("./error_codes/E0737.md"),
|
||||
E0738: include_str!("./error_codes/E0738.md"),
|
||||
E0739: include_str!("./error_codes/E0739.md"),
|
||||
E0740: include_str!("./error_codes/E0740.md"),
|
||||
E0741: include_str!("./error_codes/E0741.md"),
|
||||
E0742: include_str!("./error_codes/E0742.md"),
|
||||
|
@ -610,5 +611,4 @@ E0748: include_str!("./error_codes/E0748.md"),
|
|||
E0722, // Malformed `#[optimize]` attribute
|
||||
E0724, // `#[ffi_returns_twice]` is only allowed in foreign functions
|
||||
E0726, // non-explicit (not `'_`) elided lifetime in unsupported position
|
||||
E0739, // invalid track_caller application/syntax
|
||||
}
|
||||
|
|
13
src/librustc_error_codes/error_codes/E0739.md
Normal file
13
src/librustc_error_codes/error_codes/E0739.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
`#[track_caller]` can not be applied on struct.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0739
|
||||
#![feature(track_caller)]
|
||||
#[track_caller]
|
||||
struct Bar {
|
||||
a: u8,
|
||||
}
|
||||
```
|
||||
|
||||
[RFC 2091]: https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md
|
|
@ -8,3 +8,4 @@ LL | struct S;
|
|||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0739`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue