From 1923586286dea1a0f8ece43056126fc2ecc89337 Mon Sep 17 00:00:00 2001 From: Josh White Date: Thu, 6 Feb 2020 16:54:24 -0500 Subject: [PATCH] Edited error description --- src/librustc_error_codes/error_codes/E0637.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc_error_codes/error_codes/E0637.md b/src/librustc_error_codes/error_codes/E0637.md index f5da357534e2..44a365be7e0f 100644 --- a/src/librustc_error_codes/error_codes/E0637.md +++ b/src/librustc_error_codes/error_codes/E0637.md @@ -2,15 +2,15 @@ An underscore `_` character or a numeric literal `u8`, `i32`, `f64`, etc has been used as the identifier for a lifetime. -Erroneous code example: +Erroneous code example 1: ``` -fn some_function<'_>(string1: &'_ str, string2: &'_ str) -> &'_ str { +fn some_function<'_>(str1: &'_ str, str2: &'_ str) -> &'_ str { //Some code } ``` or Erroneous code example 2: ``` -fn some_function<'u8>(string1: &'u8 str, string2: &'u8 str) -> &'u8 str { +fn some_function<'u8>(str1: &'u8 str, str2: &'u8 str) -> &'u8 str { //Some code } ``` @@ -25,7 +25,7 @@ single lowercase letter, such as `'a`, is sufficient. For more information, see Corrected code example: ``` -fn some_function<'a>(string1: &'a str, string2: &'a str) -> &'a str { +fn some_function<'a>(str1: &'a str, str2: &'a str) -> &'a str { //Some code } ```