diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 2d24b1fb4f20a..0136faef28d8c 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -1224,7 +1224,7 @@ fn main() { "##, E0090: r##" -The wrong number of lifetimes were supplied. For example: +You gave too few lifetime parameters. Example: ```compile_fail,E0090 fn foo<'a: 'b, 'b: 'a>() {} @@ -1233,6 +1233,16 @@ fn main() { foo::<'static>(); // error, expected 2 lifetime parameters } ``` + +Please check you give the right number of lifetime parameters. Example: + +``` +fn foo<'a: 'b, 'b: 'a>() {} + +fn main() { + foo::<'static, 'static>(); +} +``` "##, E0091: r##"