Cleanup check_cast. Fixes #21554

This also makes the cast error messages somewhat more uniform.
This commit is contained in:
Ariel Ben-Yehuda 2015-01-25 01:44:49 +02:00
parent 76fbb35831
commit e7245252cc
7 changed files with 119 additions and 91 deletions

View file

@ -3128,7 +3128,6 @@ pub fn type_is_scalar(ty: Ty) -> bool {
ty_bool | ty_char | ty_int(_) | ty_float(_) | ty_uint(_) |
ty_infer(IntVar(_)) | ty_infer(FloatVar(_)) |
ty_bare_fn(..) | ty_ptr(_) => true,
ty_tup(ref tys) if tys.is_empty() => true,
_ => false
}
}