Skip to content

Commit 77c342e

Browse files
authored
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
2 parents b053da3 + 51a270f commit 77c342e

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

src/librustc/middle/astconv_util.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
4747

4848
pub fn prohibit_projection(self, span: Span)
4949
{
50-
span_err!(self.sess, span, E0229,
51-
"associated type bindings are not allowed here");
50+
let mut err = struct_span_err!(self.sess, span, E0229,
51+
"associated type bindings are not allowed here");
52+
err.span_label(span, &format!("associate type not allowed here")).emit();
5253
}
5354

5455
pub fn prim_ty_to_ty(self,

src/test/compile-fail/E0229.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ impl Foo for isize {
2020
fn boo(&self) -> usize { 42 }
2121
}
2222

23-
fn baz<I>(x: &<I as Foo<A=Bar>>::A) {} //~ ERROR E0229
23+
fn baz<I>(x: &<I as Foo<A=Bar>>::A) {}
24+
//~^ ERROR associated type bindings are not allowed here [E0229]
25+
//~| NOTE associate type not allowed here
2426

2527
fn main() {
2628
}

src/test/compile-fail/issue-23543.rs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub trait D {
1616
fn f<T>(self)
1717
where T<Bogus = Foo>: A;
1818
//~^ ERROR associated type bindings are not allowed here [E0229]
19+
//~| NOTE associate type not allowed here
1920
}
2021

2122
fn main() {}

src/test/compile-fail/issue-23544.rs

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pub trait D {
1414
fn f<T>(self)
1515
where T<Bogus = Self::AlsoBogus>: A;
1616
//~^ ERROR associated type bindings are not allowed here [E0229]
17+
//~| NOTE associate type not allowed here
1718
}
1819

1920
fn main() {}

0 commit comments

Comments
 (0)