From 32103b127f088906ea6a99a12c565c4013762fa3 Mon Sep 17 00:00:00 2001 From: Julien Philippon Date: Mon, 30 Mar 2020 19:02:01 +0200 Subject: Correct long error message according to reviews --- src/librustc_error_codes/error_codes/E0226.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/librustc_error_codes/error_codes') diff --git a/src/librustc_error_codes/error_codes/E0226.md b/src/librustc_error_codes/error_codes/E0226.md index e485771fc1b..4e65132ff0d 100644 --- a/src/librustc_error_codes/error_codes/E0226.md +++ b/src/librustc_error_codes/error_codes/E0226.md @@ -1,8 +1,8 @@ -Only a single explicit lifetime bound is permitted on trait objects. +More than one explicit lifetime bound was used on a trait object. Example of erroneous code: -```compile_fail +```compile_fail,E0226 trait Foo {} type T<'a, 'b> = dyn Foo + 'a + 'b; // error: Trait object `arg` has two @@ -11,6 +11,7 @@ type T<'a, 'b> = dyn Foo + 'a + 'b; // error: Trait object `arg` has two 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: ``` -- cgit 1.4.1-3-g733a5