diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-29 10:17:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-29 10:17:11 +0100 |
| commit | c82b2bc590a39694948b685ca1f715a9ad0ecc08 (patch) | |
| tree | e60564c74a4b106e4268c2ba3b4232a066b6cde9 /src | |
| parent | 0e4119488d908ae84ddc794b5ae73c5358199e7e (diff) | |
| parent | 406d6d4028260f6c5ff02562831c137c41e0bb95 (diff) | |
Rollup merge of #92351 - TmLev:master, r=GuillaumeGomez
Add long error explanation for E0227 Part of the #61137.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/error-codes/E0227.rs | 12 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0227.stderr | 9 | ||||
| -rw-r--r-- | src/tools/tidy/src/error_codes_check.rs | 4 |
3 files changed, 23 insertions, 2 deletions
diff --git a/src/test/ui/error-codes/E0227.rs b/src/test/ui/error-codes/E0227.rs new file mode 100644 index 00000000000..0f0a781d2f9 --- /dev/null +++ b/src/test/ui/error-codes/E0227.rs @@ -0,0 +1,12 @@ +trait Foo<'foo>: 'foo {} +trait Bar<'bar>: 'bar {} + +trait FooBar<'foo, 'bar>: Foo<'foo> + Bar<'bar> {} + +struct Baz<'foo, 'bar> { + baz: dyn FooBar<'foo, 'bar>, + //~^ ERROR ambiguous lifetime bound, explicit lifetime bound required +} + +fn main() { +} diff --git a/src/test/ui/error-codes/E0227.stderr b/src/test/ui/error-codes/E0227.stderr new file mode 100644 index 00000000000..26de5b4c400 --- /dev/null +++ b/src/test/ui/error-codes/E0227.stderr @@ -0,0 +1,9 @@ +error[E0227]: ambiguous lifetime bound, explicit lifetime bound required + --> $DIR/E0227.rs:7:10 + | +LL | baz: dyn FooBar<'foo, 'bar>, + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0227`. diff --git a/src/tools/tidy/src/error_codes_check.rs b/src/tools/tidy/src/error_codes_check.rs index 6d3e470bf43..8ea6bb308b7 100644 --- a/src/tools/tidy/src/error_codes_check.rs +++ b/src/tools/tidy/src/error_codes_check.rs @@ -10,8 +10,8 @@ use regex::Regex; // A few of those error codes can't be tested but all the others can and *should* be tested! const EXEMPTED_FROM_TEST: &[&str] = &[ - "E0227", "E0279", "E0280", "E0313", "E0377", "E0461", "E0462", "E0465", "E0476", "E0514", - "E0519", "E0523", "E0554", "E0640", "E0717", "E0729", + "E0279", "E0280", "E0313", "E0377", "E0461", "E0462", "E0465", "E0476", "E0514", "E0519", + "E0523", "E0554", "E0640", "E0717", "E0729", ]; // Some error codes don't have any tests apparently... |
