]> git.lizzy.rs Git - rust.git/commitdiff
Edited error description
authorJosh White <jwhite927@gmail.com>
Thu, 6 Feb 2020 21:54:24 +0000 (16:54 -0500)
committerJosh White <jwhite927@gmail.com>
Thu, 6 Feb 2020 21:54:24 +0000 (16:54 -0500)
src/librustc_error_codes/error_codes/E0637.md

index f5da357534e26ef877c647ac724c644bb0ef10c7..44a365be7e0f72d7840fbba1aa6a1da066758234 100644 (file)
@@ -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
 }
 ```