File tree 3 files changed +5
-2
lines changed
3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,9 @@ pub struct InferenceResult {
466
466
pub type_of_for_iterator : FxHashMap < ExprId , Ty > ,
467
467
type_mismatches : FxHashMap < ExprOrPatId , TypeMismatch > ,
468
468
/// Whether there are any type-mismatching errors in the result.
469
+ // FIXME: This isn't as useful as initially thought due to us falling back placeholders to
470
+ // `TyKind::Error`.
471
+ // Which will then mark this field.
469
472
pub ( crate ) has_errors : bool ,
470
473
/// Interned common types to return references to.
471
474
// FIXME: Move this into `InferenceContext`
Original file line number Diff line number Diff line change @@ -1202,7 +1202,7 @@ impl Evaluator<'_> {
1202
1202
ty = z. clone ( ) ;
1203
1203
let size = if ty. is_str ( ) {
1204
1204
if * op != BinOp :: Eq {
1205
- never ! ( "Only eq is builtin for `str`" ) ;
1205
+ never ! ( "Only `eq` is builtin for `str`" ) ;
1206
1206
}
1207
1207
let ls = from_bytes ! ( usize , & lc[ self . ptr_size( ) ..self . ptr_size( ) * 2 ] ) ;
1208
1208
let rs = from_bytes ! ( usize , & rc[ self . ptr_size( ) ..self . ptr_size( ) * 2 ] ) ;
Original file line number Diff line number Diff line change @@ -2156,7 +2156,7 @@ pub fn lower_to_mir(
2156
2156
// need to take this input explicitly.
2157
2157
root_expr : ExprId ,
2158
2158
) -> Result < MirBody > {
2159
- if infer. has_errors {
2159
+ if infer. type_mismatches ( ) . next ( ) . is_some ( ) {
2160
2160
return Err ( MirLowerError :: HasErrors ) ;
2161
2161
}
2162
2162
let mut ctx = MirLowerCtx :: new ( db, owner, body, infer) ;
You can’t perform that action at this time.
0 commit comments