mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-12 20:16:49 +00:00
Update error message E0178
This commit is contained in:
parent
271d048523
commit
08ff7a80c0
@ -1086,6 +1086,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
|
||||
"expected a path on the left-hand side \
|
||||
of `+`, not `{}`",
|
||||
pprust::ty_to_string(ty));
|
||||
err.span_label(ty.span, &format!("expected a path"));
|
||||
let hi = bounds.iter().map(|x| match *x {
|
||||
hir::TraitTyParamBound(ref tr, _) => tr.span.hi,
|
||||
hir::RegionTyParamBound(ref r) => r.span.hi,
|
||||
|
@ -11,10 +11,18 @@
|
||||
trait Foo {}
|
||||
|
||||
struct Bar<'a> {
|
||||
w: &'a Foo + Copy, //~ ERROR E0178
|
||||
x: &'a Foo + 'a, //~ ERROR E0178
|
||||
y: &'a mut Foo + 'a, //~ ERROR E0178
|
||||
z: fn() -> Foo + 'a, //~ ERROR E0178
|
||||
w: &'a Foo + Copy,
|
||||
//~^ ERROR E0178
|
||||
//~| NOTE expected a path
|
||||
x: &'a Foo + 'a,
|
||||
//~^ ERROR E0178
|
||||
//~| NOTE expected a path
|
||||
y: &'a mut Foo + 'a,
|
||||
//~^ ERROR E0178
|
||||
//~| NOTE expected a path
|
||||
z: fn() -> Foo + 'a,
|
||||
//~^ ERROR E0178
|
||||
//~| NOTE expected a path
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user