E0263 updated to new format. rust-lang/rust#35518
This commit is contained in:
parent
f0139140f6
commit
46265a0809
2 changed files with 13 additions and 5 deletions
|
|
@ -718,10 +718,14 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
|
|||
let lifetime_j = &lifetimes[j];
|
||||
|
||||
if lifetime_i.lifetime.name == lifetime_j.lifetime.name {
|
||||
span_err!(self.sess, lifetime_j.lifetime.span, E0263,
|
||||
"lifetime name `{}` declared twice in \
|
||||
the same scope",
|
||||
lifetime_j.lifetime.name);
|
||||
struct_span_err!(self.sess, lifetime_j.lifetime.span, E0263,
|
||||
"lifetime name `{}` declared twice in the same scope",
|
||||
lifetime_j.lifetime.name)
|
||||
.span_label(lifetime_j.lifetime.span,
|
||||
&format!("declared twice"))
|
||||
.span_label(lifetime_i.lifetime.span,
|
||||
&format!("previous declaration here"))
|
||||
.emit();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) { } //~ ERROR E0263
|
||||
fn foo<'a, 'b, 'a>(x: &'a str, y: &'b str) {
|
||||
//~^ ERROR E0263
|
||||
//~| NOTE declared twice
|
||||
//~| NOTE previous declaration here
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue