diff options
| author | bors <bors@rust-lang.org> | 2020-10-04 04:33:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-04 04:33:28 +0000 |
| commit | 2251766944f355a039e67aeb13ab630b2d46bf9b (patch) | |
| tree | 255a2666dc4671287f122208c30df66693e17855 /compiler/rustc_error_codes/src | |
| parent | 4cf3dc19a1e59ffdebe3d8ca106e5b7f2d6d212e (diff) | |
| parent | f5db16639713a9a3e6730a59c5a03007557df057 (diff) | |
| download | rust-2251766944f355a039e67aeb13ab630b2d46bf9b.tar.gz rust-2251766944f355a039e67aeb13ab630b2d46bf9b.zip | |
Auto merge of #77517 - JohnTitor:rollup-msbd49e, r=JohnTitor
Rollup of 11 pull requests Successful merges: - #75143 (Use `tracing` spans to trace the entire MIR interp stack) - #75699 (Uplift drop-bounds lint from clippy) - #76768 (Test and reject out-of-bounds shuffle vectors) - #77190 (updated p! macro to accept literals) - #77388 (Add some regression tests) - #77419 (Create E0777 error code for invalid argument in derive) - #77447 (BTreeMap: document DrainFilterInner better) - #77468 (Fix test name) - #77469 (Improve rustdoc error for failed intra-doc link resolution) - #77473 (Make --all-targets in x.py check opt-in) - #77508 (Fix capitalization in blog post name) Failed merges: r? `@ghost`
Diffstat (limited to 'compiler/rustc_error_codes/src')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0777.md | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes.rs b/compiler/rustc_error_codes/src/error_codes.rs index 81f65ac8690..981b5bb8ba7 100644 --- a/compiler/rustc_error_codes/src/error_codes.rs +++ b/compiler/rustc_error_codes/src/error_codes.rs @@ -459,6 +459,7 @@ E0773: include_str!("./error_codes/E0773.md"), E0774: include_str!("./error_codes/E0774.md"), E0775: include_str!("./error_codes/E0775.md"), E0776: include_str!("./error_codes/E0776.md"), +E0777: include_str!("./error_codes/E0777.md"), ; // E0006, // merged with E0005 // E0008, // cannot bind by-move into a pattern guard diff --git a/compiler/rustc_error_codes/src/error_codes/E0777.md b/compiler/rustc_error_codes/src/error_codes/E0777.md new file mode 100644 index 00000000000..8c5c6e28b65 --- /dev/null +++ b/compiler/rustc_error_codes/src/error_codes/E0777.md @@ -0,0 +1,19 @@ +A literal value was used inside `#[derive]`. + +Erroneous code example: + +```compile_fail,E0777 +#[derive("Clone")] // error! +struct Foo; +``` + +Only paths to traits are allowed as argument inside `#[derive]`. You can find +more information about the `#[derive]` attribute in the [Rust Book]. + + +``` +#[derive(Clone)] // ok! +struct Foo; +``` + +[Rust Book]: https://doc.rust-lang.org/book/appendix-03-derivable-traits.html |
