diff options
| author | bors <bors@rust-lang.org> | 2020-02-07 00:06:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-07 00:06:35 +0000 |
| commit | f8fd4624474a68bd26694eff3536b9f3a127b2d3 (patch) | |
| tree | 87251dcf146a39eb1bf7936a6b46453827a17170 /src/librustc_error_codes | |
| parent | 442ae7f04026c215a03b155eaaf9cde8bb5cf02a (diff) | |
| parent | 7ef5b8951f9c4e2da8e8a918cd05d1784cbf895b (diff) | |
Auto merge of #68907 - Dylan-DPC:rollup-osm5e8o, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #67359 (Rename -Zexternal-macro-backtrace to -Zmacro-backtrace and clean up implementation.) - #68524 (Generator Resume Arguments) - #68791 (implement proper linkchecker hardening) - #68886 (Mark fn map_or() as eagerly evaluated.) - #68888 (error code examples: replace some more ignore with compile_fail) - #68894 (Update E0565 examples) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0511.md | 2 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0534.md | 2 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0535.md | 2 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0565.md | 14 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0626.md | 10 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0633.md | 4 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0668.md | 2 |
7 files changed, 21 insertions, 15 deletions
diff --git a/src/librustc_error_codes/error_codes/E0511.md b/src/librustc_error_codes/error_codes/E0511.md index 2d6ff8241e6..4f6644f3582 100644 --- a/src/librustc_error_codes/error_codes/E0511.md +++ b/src/librustc_error_codes/error_codes/E0511.md @@ -1,7 +1,7 @@ Invalid monomorphization of an intrinsic function was used. Erroneous code example: -```ignore (error-emitted-at-codegen-which-cannot-be-handled-by-compile_fail) +```compile_fail,E0511 #![feature(platform_intrinsics)] extern "platform-intrinsic" { diff --git a/src/librustc_error_codes/error_codes/E0534.md b/src/librustc_error_codes/error_codes/E0534.md index e50b84764b4..0afa4a8c958 100644 --- a/src/librustc_error_codes/error_codes/E0534.md +++ b/src/librustc_error_codes/error_codes/E0534.md @@ -2,7 +2,7 @@ The `inline` attribute was malformed. Erroneous code example: -```ignore (compile_fail not working here; see Issue #43707) +```compile_fail,E0534 #[inline()] // error: expected one argument pub fn something() {} diff --git a/src/librustc_error_codes/error_codes/E0535.md b/src/librustc_error_codes/error_codes/E0535.md index e9abfe5dda1..035d395b76f 100644 --- a/src/librustc_error_codes/error_codes/E0535.md +++ b/src/librustc_error_codes/error_codes/E0535.md @@ -2,7 +2,7 @@ An unknown argument was given to the `inline` attribute. Erroneous code example: -```ignore (compile_fail not working here; see Issue #43707) +```compile_fail,E0535 #[inline(unknown)] // error: invalid argument pub fn something() {} diff --git a/src/librustc_error_codes/error_codes/E0565.md b/src/librustc_error_codes/error_codes/E0565.md index 1faedf45932..d5bba941c1d 100644 --- a/src/librustc_error_codes/error_codes/E0565.md +++ b/src/librustc_error_codes/error_codes/E0565.md @@ -2,9 +2,11 @@ A literal was used in a built-in attribute that doesn't support literals. Erroneous code example: -```ignore (compile_fail not working here; see Issue #43707) -#[inline("always")] // error: unsupported literal -pub fn something() {} +```compile_fail,E0565 +#[repr("C")] // error: meta item in `repr` must be an identifier +struct Repr {} + +fn main() {} ``` Literals in attributes are new and largely unsupported in built-in attributes. @@ -12,6 +14,8 @@ Work to support literals where appropriate is ongoing. Try using an unquoted name instead: ``` -#[inline(always)] -pub fn something() {} +#[repr(C)] // ok! +struct Repr {} + +fn main() {} ``` diff --git a/src/librustc_error_codes/error_codes/E0626.md b/src/librustc_error_codes/error_codes/E0626.md index db50bd7ac4f..cc6e03d1ca7 100644 --- a/src/librustc_error_codes/error_codes/E0626.md +++ b/src/librustc_error_codes/error_codes/E0626.md @@ -12,7 +12,7 @@ let mut b = || { yield (); // ...is still in scope here, when the yield occurs. println!("{}", a); }; -Pin::new(&mut b).resume(); +Pin::new(&mut b).resume(()); ``` At present, it is not permitted to have a yield that occurs while a @@ -31,7 +31,7 @@ let mut b = || { yield (); println!("{}", a); }; -Pin::new(&mut b).resume(); +Pin::new(&mut b).resume(()); ``` This is a very simple case, of course. In more complex cases, we may @@ -50,7 +50,7 @@ let mut b = || { yield x; // ...when this yield occurs. } }; -Pin::new(&mut b).resume(); +Pin::new(&mut b).resume(()); ``` Such cases can sometimes be resolved by iterating "by value" (or using @@ -66,7 +66,7 @@ let mut b = || { yield x; // <-- Now yield is OK. } }; -Pin::new(&mut b).resume(); +Pin::new(&mut b).resume(()); ``` If taking ownership is not an option, using indices can work too: @@ -83,7 +83,7 @@ let mut b = || { yield x; // <-- Now yield is OK. } }; -Pin::new(&mut b).resume(); +Pin::new(&mut b).resume(()); // (*) -- Unfortunately, these temporaries are currently required. // See <https://github.com/rust-lang/rust/issues/43122>. diff --git a/src/librustc_error_codes/error_codes/E0633.md b/src/librustc_error_codes/error_codes/E0633.md index 65cdf90036a..7f488cde664 100644 --- a/src/librustc_error_codes/error_codes/E0633.md +++ b/src/librustc_error_codes/error_codes/E0633.md @@ -2,7 +2,9 @@ The `unwind` attribute was malformed. Erroneous code example: -```ignore (compile_fail not working here; see Issue #43707) +```compile_fail,E0633 +#![feature(unwind_attributes)] + #[unwind()] // error: expected one argument pub extern fn something() {} diff --git a/src/librustc_error_codes/error_codes/E0668.md b/src/librustc_error_codes/error_codes/E0668.md index 2621a31a9e0..f5d26244fb9 100644 --- a/src/librustc_error_codes/error_codes/E0668.md +++ b/src/librustc_error_codes/error_codes/E0668.md @@ -6,7 +6,7 @@ assembly call. In particular, it can happen if you forgot the closing bracket of a register constraint (see issue #51430): -```ignore (error-emitted-at-codegen-which-cannot-be-handled-by-compile_fail) +```compile_fail,E0668 #![feature(asm)] fn main() { |
