diff options
| author | Sam Whited <sam@samwhited.com> | 2017-03-22 00:07:12 -0500 |
|---|---|---|
| committer | Sam Whited <sam@samwhited.com> | 2017-03-22 00:07:12 -0500 |
| commit | 8ea0f18d9a3bdf001be8d668818b8291dd2b37df (patch) | |
| tree | a0645d33ae493bade3b5559e61baf8e25af1a578 /src | |
| parent | 8e352f7d866f46e09746d7f8557818984a1f3854 (diff) | |
| download | rust-8ea0f18d9a3bdf001be8d668818b8291dd2b37df.tar.gz rust-8ea0f18d9a3bdf001be8d668818b8291dd2b37df.zip | |
E0090: Expand error message explanation
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_typeck/diagnostics.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 2d24b1fb4f2..0136faef28d 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##" |
