1
Fork 0

Rollup merge of #35374 - mrabault:e0229_format, r=jonathandturner

Update E0229 to new format

Hello,

This fixes #35305. I ran the tests, no unit test broke, even though some were ignored.

Cheers

r? @jonathandturner
This commit is contained in:
Eduard-Mihai Burtescu 2016-08-06 15:01:22 +03:00 committed by GitHub
commit 77c342e03c
4 changed files with 8 additions and 3 deletions

View file

@ -47,8 +47,9 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
pub fn prohibit_projection(self, span: Span) pub fn prohibit_projection(self, span: Span)
{ {
span_err!(self.sess, span, E0229, let mut err = struct_span_err!(self.sess, span, E0229,
"associated type bindings are not allowed here"); "associated type bindings are not allowed here");
err.span_label(span, &format!("associate type not allowed here")).emit();
} }
pub fn prim_ty_to_ty(self, pub fn prim_ty_to_ty(self,

View file

@ -20,7 +20,9 @@ impl Foo for isize {
fn boo(&self) -> usize { 42 } fn boo(&self) -> usize { 42 }
} }
fn baz<I>(x: &<I as Foo<A=Bar>>::A) {} //~ ERROR E0229 fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
//~^ ERROR associated type bindings are not allowed here [E0229]
//~| NOTE associate type not allowed here
fn main() { fn main() {
} }

View file

@ -16,6 +16,7 @@ pub trait D {
fn f<T>(self) fn f<T>(self)
where T<Bogus = Foo>: A; where T<Bogus = Foo>: A;
//~^ ERROR associated type bindings are not allowed here [E0229] //~^ ERROR associated type bindings are not allowed here [E0229]
//~| NOTE associate type not allowed here
} }
fn main() {} fn main() {}

View file

@ -14,6 +14,7 @@ pub trait D {
fn f<T>(self) fn f<T>(self)
where T<Bogus = Self::AlsoBogus>: A; where T<Bogus = Self::AlsoBogus>: A;
//~^ ERROR associated type bindings are not allowed here [E0229] //~^ ERROR associated type bindings are not allowed here [E0229]
//~| NOTE associate type not allowed here
} }
fn main() {} fn main() {}