Skip to content

Commit e838383

Browse files
authored
Rollup merge of #69876 - ayushmishra2005:doc/61137-add-long-error-code-e0739, r=Dylan-DPC
Add long error explanation for E0739 Add long explanation for the E0739 error code Part of #61137 r? @GuillaumeGomez
2 parents 3853da7 + 761c8c1 commit e838383

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/librustc_error_codes/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ E0735: include_str!("./error_codes/E0735.md"),
411411
E0736: include_str!("./error_codes/E0736.md"),
412412
E0737: include_str!("./error_codes/E0737.md"),
413413
E0738: include_str!("./error_codes/E0738.md"),
414+
E0739: include_str!("./error_codes/E0739.md"),
414415
E0740: include_str!("./error_codes/E0740.md"),
415416
E0741: include_str!("./error_codes/E0741.md"),
416417
E0742: include_str!("./error_codes/E0742.md"),
@@ -610,5 +611,4 @@ E0748: include_str!("./error_codes/E0748.md"),
610611
E0722, // Malformed `#[optimize]` attribute
611612
E0724, // `#[ffi_returns_twice]` is only allowed in foreign functions
612613
E0726, // non-explicit (not `'_`) elided lifetime in unsupported position
613-
E0739, // invalid track_caller application/syntax
614614
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
`#[track_caller]` can not be applied on struct.
2+
3+
Erroneous code example:
4+
5+
```compile_fail,E0739
6+
#![feature(track_caller)]
7+
#[track_caller]
8+
struct Bar {
9+
a: u8,
10+
}
11+
```
12+
13+
[RFC 2091]: https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md

src/test/ui/rfc-2091-track-caller/only-for-fns.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ LL | struct S;
88

99
error: aborting due to previous error
1010

11+
For more information about this error, try `rustc --explain E0739`.

0 commit comments

Comments
 (0)