Cleanup check_cast. Fixes #21554
This also makes the cast error messages somewhat more uniform.
This commit is contained in:
parent
76fbb35831
commit
e7245252cc
7 changed files with 119 additions and 91 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue