Edited error description

This commit is contained in:
Josh White 2020-02-06 16:54:24 -05:00
parent cdf2f30d6a
commit 1923586286

View 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
}
```