diff options
| author | bors <bors@rust-lang.org> | 2020-03-31 14:00:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-31 14:00:55 +0000 |
| commit | 75ff3110ac6d8a0259023b83fd20d7ab295f8dd6 (patch) | |
| tree | 16273bf92f9580d0c1a3fbb99b10d32c234902b7 /src/librustc_error_codes/error_codes | |
| parent | 2113659479a82ea69633b23ef710b58ab127755e (diff) | |
| parent | 976f8d59dddac2ccddbe940953ee6247454e6736 (diff) | |
| download | rust-75ff3110ac6d8a0259023b83fd20d7ab295f8dd6.tar.gz rust-75ff3110ac6d8a0259023b83fd20d7ab295f8dd6.zip | |
Auto merge of #70617 - Centril:rollup-063ycso, r=Centril
Rollup of 9 pull requests
Successful merges:
- #69784 (Optimize strip_prefix and strip_suffix with str patterns)
- #70548 (Add long error code for error E0226)
- #70555 (resolve, `try_resolve_as_non_binding`: use `delay_span_bug` due to parser recovery)
- #70561 (remove obsolete comment)
- #70562 (infer array len from pattern)
- #70585 (std: Fix over-aligned allocations on wasm32-wasi)
- #70587 (Add `Rust` to the code snippet)
- #70588 (Fix incorrect documentation for `str::{split_at, split_at_mut}`)
- #70613 (more clippy fixes)
Failed merges:
r? @ghost
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0226.md | 21 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0730.md | 4 |
2 files changed, 23 insertions, 2 deletions
diff --git a/src/librustc_error_codes/error_codes/E0226.md b/src/librustc_error_codes/error_codes/E0226.md new file mode 100644 index 00000000000..4e65132ff0d --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0226.md @@ -0,0 +1,21 @@ +More than one explicit lifetime bound was used on a trait object. + +Example of erroneous code: + +```compile_fail,E0226 +trait Foo {} + +type T<'a, 'b> = dyn Foo + 'a + 'b; // error: Trait object `arg` has two + // lifetime bound, 'a and 'b. +``` + +Here `T` is a trait object with two explicit lifetime bounds, 'a and 'b. + +Only a single explicit lifetime bound is permitted on trait objects. +To fix this error, consider removing one of the lifetime bounds: + +``` +trait Foo {} + +type T<'a> = dyn Foo + 'a; +``` diff --git a/src/librustc_error_codes/error_codes/E0730.md b/src/librustc_error_codes/error_codes/E0730.md index bf1f72be325..c2a71ca5669 100644 --- a/src/librustc_error_codes/error_codes/E0730.md +++ b/src/librustc_error_codes/error_codes/E0730.md @@ -7,8 +7,8 @@ Example of erroneous code: fn is_123<const N: usize>(x: [u32; N]) -> bool { match x { - [1, 2, 3] => true, // error: cannot pattern-match on an - // array without a fixed length + [1, 2, ..] => true, // error: cannot pattern-match on an + // array without a fixed length _ => false } } |
