Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update E0229 to new format #35374

Merged
merged 2 commits into from
Aug 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/librustc/middle/astconv_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {

pub fn prohibit_projection(self, span: Span)
{
span_err!(self.sess, span, E0229,
"associated type bindings are not allowed here");
let mut err = struct_span_err!(self.sess, span, E0229,
"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,
Expand Down
4 changes: 3 additions & 1 deletion src/test/compile-fail/E0229.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ impl Foo for isize {
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() {
}
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-23543.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub trait D {
fn f<T>(self)
where T<Bogus = Foo>: A;
//~^ ERROR associated type bindings are not allowed here [E0229]
//~| NOTE associate type not allowed here
}

fn main() {}
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-23544.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub trait D {
fn f<T>(self)
where T<Bogus = Self::AlsoBogus>: A;
//~^ ERROR associated type bindings are not allowed here [E0229]
//~| NOTE associate type not allowed here
}

fn main() {}