diff options
| author | bors <bors@rust-lang.org> | 2020-03-24 20:33:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-24 20:33:53 +0000 |
| commit | 02046a5d402c789c006d0da7662f800fe3c45faf (patch) | |
| tree | 298c6737ad0555e0d2ebdfffcb91c18f5fa77dfc /src/librustc_error_codes/error_codes | |
| parent | 2dcf54f564c6d8bbf48960fb9aaec88a0e2e062a (diff) | |
| parent | bf1ad2229fc635434c3f5d61db8feb1e7e33f861 (diff) | |
| download | rust-02046a5d402c789c006d0da7662f800fe3c45faf.tar.gz rust-02046a5d402c789c006d0da7662f800fe3c45faf.zip | |
Auto merge of #70371 - Centril:rollup-ywi1vo3, r=Centril
Rollup of 8 pull requests
Successful merges:
- #70023 (clean up E0436 explanation)
- #70234 (#[track_caller] on core::ops::{Index, IndexMut}.)
- #70241 (Miri: move ModifiedStatic to ConstEval errors)
- #70342 (IoSlice/IoSliceMut should be Send and Sync)
- #70350 (Request "-Z unstable-options" for unstable options)
- #70355 (Clean up E0454)
- #70359 (must_use on split_off)
- #70368 (Mark hotplug_codegen_backend as ignore-stage1)
Failed merges:
r? @ghost
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0436.md | 7 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0454.md | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/librustc_error_codes/error_codes/E0436.md b/src/librustc_error_codes/error_codes/E0436.md index b1afd9e9603..48ecc49e92f 100644 --- a/src/librustc_error_codes/error_codes/E0436.md +++ b/src/librustc_error_codes/error_codes/E0436.md @@ -1,5 +1,4 @@ -The functional record update syntax is only allowed for structs. (Struct-like -enum variants don't qualify, for example.) +The functional record update syntax was used on something other than a struct. Erroneous code example: @@ -24,7 +23,9 @@ fn one_up_competitor(competitor_frequency: PublicationFrequency) } ``` -Rewrite the expression without functional record update syntax: +The functional record update syntax is only allowed for structs (struct-like +enum variants don't qualify, for example). To fix the previous code, rewrite the +expression without functional record update syntax: ``` enum PublicationFrequency { diff --git a/src/librustc_error_codes/error_codes/E0454.md b/src/librustc_error_codes/error_codes/E0454.md index 80eb91e43d1..23ca6c7824d 100644 --- a/src/librustc_error_codes/error_codes/E0454.md +++ b/src/librustc_error_codes/error_codes/E0454.md @@ -1,4 +1,6 @@ -A link name was given with an empty name. Erroneous code example: +A link name was given with an empty name. + +Erroneous code example: ```compile_fail,E0454 #[link(name = "")] extern {} |
