Rollup merge of #36050 - abhiQmar:e0076-formatting, r=jonathandturner
Update compiler error E0076 to use new error format Fixes #35221 part of #35233 r? @jonathandturner
This commit is contained in:
commit
051685b2bc
2 changed files with 6 additions and 2 deletions
|
@ -1204,7 +1204,9 @@ pub fn check_simd<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, sp: Span, id: ast::Node
|
|||
}
|
||||
let e = fields[0].ty(tcx, substs);
|
||||
if !fields.iter().all(|f| f.ty(tcx, substs) == e) {
|
||||
span_err!(tcx.sess, sp, E0076, "SIMD vector should be homogeneous");
|
||||
struct_span_err!(tcx.sess, sp, E0076, "SIMD vector should be homogeneous")
|
||||
.span_label(sp, &format!("SIMD elements must have the same type"))
|
||||
.emit();
|
||||
return;
|
||||
}
|
||||
match e.sty {
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
#![feature(repr_simd)]
|
||||
|
||||
#[repr(simd)]
|
||||
struct Bad(u16, u32, u32); //~ ERROR E0076
|
||||
struct Bad(u16, u32, u32);
|
||||
//~^ ERROR E0076
|
||||
//~| NOTE SIMD elements must have the same type
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue