Rollup merge of #35421 - razielgn:updated-e0225-to-new-format, r=jonathandturner

Updated E0225 to new format.

Part of #35233.
Fixes #35388.

r? @jonathandturner
This commit is contained in:
Jonathan Turner 2016-08-07 09:59:43 -07:00 committed by GitHub
commit 6bb7f354c1
2 changed files with 8 additions and 3 deletions

View File

@ -2097,8 +2097,11 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
if !trait_bounds.is_empty() {
let b = &trait_bounds[0];
span_err!(self.tcx().sess, b.trait_ref.path.span, E0225,
"only the builtin traits can be used as closure or object bounds");
let span = b.trait_ref.path.span;
struct_span_err!(self.tcx().sess, span, E0225,
"only the builtin traits can be used as closure or object bounds")
.span_label(span, &format!("non-builtin trait used as bounds"))
.emit();
}
let region_bound =

View File

@ -9,5 +9,7 @@
// except according to those terms.
fn main() {
let _: Box<std::io::Read + std::io::Write>; //~ ERROR E0225
let _: Box<std::io::Read + std::io::Write>;
//~^ ERROR only the builtin traits can be used as closure or object bounds [E0225]
//~| NOTE non-builtin trait used as bounds
}