Skip to content
Permalink
Browse files

Make const parent errors delay_span_bugs

  • Loading branch information...
varkor committed May 10, 2019
1 parent cff1bdb commit 385d012d9e3479397482558e1750205f70b62ffc
Showing with 21 additions and 3 deletions.
  1. +21 −3 src/librustc_typeck/collect.rs
@@ -1404,15 +1404,27 @@ pub fn checked_type_of<'a, 'tcx>(
if !fail {
return None;
}
bug!("unexpected const parent path def {:?}", x);
tcx.sess.delay_span_bug(
DUMMY_SP,
&format!(
"unexpected const parent path def {:?}", x
),
);
tcx.types.err
}
}
}
x => {
if !fail {
return None;
}
bug!("unexpected const parent path {:?}", x);
tcx.sess.delay_span_bug(
DUMMY_SP,
&format!(
"unexpected const parent path {:?}", x
),
);
tcx.types.err
}
}
}
@@ -1421,7 +1433,13 @@ pub fn checked_type_of<'a, 'tcx>(
if !fail {
return None;
}
bug!("unexpected const parent in type_of_def_id(): {:?}", x);
tcx.sess.delay_span_bug(
DUMMY_SP,
&format!(
"unexpected const parent in type_of_def_id(): {:?}", x
),
);
tcx.types.err
}
}
}

0 comments on commit 385d012

Please sign in to comment.
You can’t perform that action at this time.