diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-04-19 06:35:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-19 06:35:35 +0200 |
| commit | f20da94ccfc4b62a668dbaeb563e39452eb07a06 (patch) | |
| tree | 7949389042528a6eafeb0064015b3ce8d3dc074d /compiler | |
| parent | a184557d1d3ae6d17a502b9b5c5994d968a47579 (diff) | |
| parent | c5e6ccb1ed0b1e8d4861d47d4728da4bda90efbd (diff) | |
| download | rust-f20da94ccfc4b62a668dbaeb563e39452eb07a06.tar.gz rust-f20da94ccfc4b62a668dbaeb563e39452eb07a06.zip | |
Rollup merge of #110476 - compiler-errors:ty-err-ctxt-good-path, r=lcnr
Delay a good path bug on drop for `TypeErrCtxt` (instead of a regular delayed bug) r? `@lcnr` Perhaps we should just delete the `Drop` impl altogether though? Fixes rust-lang/rust-clippy#10645 `@matthiaskrgr:` I don't know how to make a clippy test for this. Any idea? Clippy's UI tests run with `-D warnings` and I have no idea how to switch it off to make a test that triggers this ICE in the clippy test suite 🤣
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_infer/src/infer/error_reporting/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index f6a4ddd7855..b0c376a26f6 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -74,7 +74,6 @@ use rustc_middle::ty::{ self, error::TypeError, List, Region, Ty, TyCtxt, TypeFoldable, TypeSuperVisitable, TypeVisitable, TypeVisitableExt, }; -use rustc_span::DUMMY_SP; use rustc_span::{sym, symbol::kw, BytePos, DesugaringKind, Pos, Span}; use rustc_target::spec::abi; use std::ops::{ControlFlow, Deref}; @@ -138,7 +137,7 @@ impl Drop for TypeErrCtxt<'_, '_> { self.infcx .tcx .sess - .delay_span_bug(DUMMY_SP, "used a `TypeErrCtxt` without failing compilation"); + .delay_good_path_bug("used a `TypeErrCtxt` without raising an error or lint"); } } } |
