Skip to content

Commit 1923586

Browse files
committed
Edited error description
1 parent cdf2f30 commit 1923586

File tree

1 file changed

+4
-4
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+4
-4
lines changed

src/librustc_error_codes/error_codes/E0637.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
An underscore `_` character or a numeric literal `u8`, `i32`, `f64`, etc has
33
been used as the identifier for a lifetime.
44

5-
Erroneous code example:
5+
Erroneous code example 1:
66
```
7-
fn some_function<'_>(string1: &'_ str, string2: &'_ str) -> &'_ str {
7+
fn some_function<'_>(str1: &'_ str, str2: &'_ str) -> &'_ str {
88
//Some code
99
}
1010
```
1111
or Erroneous code example 2:
1212
```
13-
fn some_function<'u8>(string1: &'u8 str, string2: &'u8 str) -> &'u8 str {
13+
fn some_function<'u8>(str1: &'u8 str, str2: &'u8 str) -> &'u8 str {
1414
//Some code
1515
}
1616
```
@@ -25,7 +25,7 @@ single lowercase letter, such as `'a`, is sufficient. For more information, see
2525

2626
Corrected code example:
2727
```
28-
fn some_function<'a>(string1: &'a str, string2: &'a str) -> &'a str {
28+
fn some_function<'a>(str1: &'a str, str2: &'a str) -> &'a str {
2929
//Some code
3030
}
3131
```

0 commit comments

Comments
 (0)