mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
This commit is contained in:
@@ -658,7 +658,9 @@ fn error_392<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, span: Span, param_name: ast::N
|
||||
}
|
||||
|
||||
fn error_194(tcx: TyCtxt, span: Span, name: ast::Name) {
|
||||
span_err!(tcx.sess, span, E0194,
|
||||
struct_span_err!(tcx.sess, span, E0194,
|
||||
"type parameter `{}` shadows another type parameter of the same name",
|
||||
name);
|
||||
name)
|
||||
.span_label(span, &format!("`{}` shadows another type parameter", name))
|
||||
.emit();
|
||||
}
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
|
||||
trait Foo<T> {
|
||||
fn do_something(&self) -> T;
|
||||
fn do_something_else<T: Clone>(&self, bar: T); //~ ERROR E0194
|
||||
fn do_something_else<T: Clone>(&self, bar: T);
|
||||
//~^ ERROR E0194
|
||||
//~| NOTE `T` shadows another type parameter
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
Reference in New Issue
Block a user