mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 12:44:40 +00:00
Update error message for E0172
This commit is contained in:
parent
40f3ee2a01
commit
ee8d6b0709
@ -1075,8 +1075,10 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
|
||||
Ok((trait_ref, projection_bounds))
|
||||
}
|
||||
_ => {
|
||||
span_err!(self.tcx().sess, ty.span, E0172,
|
||||
"expected a reference to a trait");
|
||||
struct_span_err!(self.tcx().sess, ty.span, E0172,
|
||||
"expected a reference to a trait")
|
||||
.span_label(ty.span, &format!("expected a trait"))
|
||||
.emit();
|
||||
Err(ErrorReported)
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,9 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn foo(bar: i32+std::fmt::Display) {} //~ ERROR E0172
|
||||
fn foo(bar: i32+std::fmt::Display) {}
|
||||
//~^ ERROR E0172
|
||||
//~| NOTE expected a trait
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user