]> git.proxmox.com Git - rustc.git/blob - src/librustc_error_codes/error_codes/E0263.md
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0263.md
1 A lifetime was declared more than once in the same scope.
2
3 Erroneous code example:
4
5 ```compile_fail,E0263
6 fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str, z: &'a str) { // error!
7 }
8 ```
9
10 Two lifetimes cannot have the same name. To fix this example, change
11 the second `'a` lifetime into something else (`'c` for example):
12
13 ```
14 fn foo<'a, 'b, 'c>(x: &'a str, y: &'b str, z: &'c str) { // ok!
15 }
16 ```