Rollup merge of #120959 - nnethercote:rm-good_path, r=oli-obk
Remove good path delayed bugs Because they're not that useful, and kind of annoying. Details in the individual commits. r? ```@compiler-errors```
This commit is contained in:
commit
93e9579b5d
10 changed files with 56 additions and 133 deletions
|
@ -132,20 +132,6 @@ pub struct TypeErrCtxt<'a, 'tcx> {
|
|||
Box<dyn Fn(Ty<'tcx>) -> Vec<(Ty<'tcx>, Vec<PredicateObligation<'tcx>>)> + 'a>,
|
||||
}
|
||||
|
||||
impl Drop for TypeErrCtxt<'_, '_> {
|
||||
fn drop(&mut self) {
|
||||
if self.dcx().has_errors().is_some() {
|
||||
// Ok, emitted an error.
|
||||
} else {
|
||||
// Didn't emit an error; maybe it was created but not yet emitted.
|
||||
self.infcx
|
||||
.tcx
|
||||
.sess
|
||||
.good_path_delayed_bug("used a `TypeErrCtxt` without raising an error or lint");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
||||
pub fn dcx(&self) -> &'tcx DiagCtxt {
|
||||
self.infcx.tcx.dcx()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue