Update error messages for E0091 and E0092
This commit is contained in:
parent
1744c46e47
commit
156c822ab2
@ -97,8 +97,10 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &hir::ForeignItem) {
|
||||
(0, Vec::new(), tcx.mk_nil())
|
||||
}
|
||||
op => {
|
||||
span_err!(tcx.sess, it.span, E0092,
|
||||
"unrecognized atomic operation function: `{}`", op);
|
||||
struct_span_err!(tcx.sess, it.span, E0092,
|
||||
"unrecognized atomic operation function: `{}`", op)
|
||||
.span_label(it.span, &format!("unrecognized atomic operation"))
|
||||
.emit();
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
@ -4637,9 +4637,11 @@ pub fn check_bounds_are_used<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
|
||||
|
||||
for (i, b) in tps_used.iter().enumerate() {
|
||||
if !*b {
|
||||
span_err!(ccx.tcx.sess, tps[i].span, E0091,
|
||||
struct_span_err!(ccx.tcx.sess, tps[i].span, E0091,
|
||||
"type parameter `{}` is unused",
|
||||
tps[i].name);
|
||||
tps[i].name)
|
||||
.span_label(tps[i].span, &format!("unused type parameter"))
|
||||
.emit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,9 @@
|
||||
// except according to those terms.
|
||||
|
||||
type Foo<T> = u32; //~ ERROR E0091
|
||||
//~| NOTE unused type parameter
|
||||
type Foo2<A, B> = Box<A>; //~ ERROR E0091
|
||||
//~| NOTE unused type parameter
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user