about summary refs log tree commit diff
path: root/src/librustc_error_codes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-03-11 13:05:52 +0000
committerbors <bors@rust-lang.org>2020-03-11 13:05:52 +0000
commitc20d7eecbc0928b57da8fe30b2ef8528e2bdd5be (patch)
treee8f110a9249dbcf8ce290bda1b3c7702488247fa /src/librustc_error_codes
parent303d8aff6092709edd4dbd35b1c88e9aa40bf6d8 (diff)
parenta77206fa4a35e7926fb4404bd167b06e342b7626 (diff)
downloadrust-c20d7eecbc0928b57da8fe30b2ef8528e2bdd5be.tar.gz
rust-c20d7eecbc0928b57da8fe30b2ef8528e2bdd5be.zip
Auto merge of #69919 - Centril:rollup-fxo33zs, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #66472 (--show-coverage json)
 - #69603 (tidy: replace `make check` with `./x.py test` in documentation)
 - #69760 (Improve expression & attribute parsing)
 - #69828 (fix memory leak when vec::IntoIter panics during drop)
 - #69850 (panic_bounds_check: use caller_location, like PanicFnLangItem)
 - #69876 (Add long error explanation for E0739)
 - #69888 ([Miri] Use a session variable instead of checking for an env var always)
 - #69893 (librustc_codegen_llvm: Use slices instead of 0-terminated strings)

Failed merges:

r? @ghost
Diffstat (limited to 'src/librustc_error_codes')
-rw-r--r--src/librustc_error_codes/error_codes.rs2
-rw-r--r--src/librustc_error_codes/error_codes/E0739.md13
2 files changed, 14 insertions, 1 deletions
diff --git a/src/librustc_error_codes/error_codes.rs b/src/librustc_error_codes/error_codes.rs
index 11d1209923f..0e14e2196ca 100644
--- a/src/librustc_error_codes/error_codes.rs
+++ b/src/librustc_error_codes/error_codes.rs
@@ -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
 }
diff --git a/src/librustc_error_codes/error_codes/E0739.md b/src/librustc_error_codes/error_codes/E0739.md
new file mode 100644
index 00000000000..707751066ed
--- /dev/null
+++ b/src/librustc_error_codes/error_codes/E0739.md
@@ -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