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
|
@ -3156,13 +3156,12 @@ fn for_each_def(tcx: TyCtxt<'_>, mut collect_fn: impl for<'b> FnMut(&'b Ident, N
|
|||
// this is pub to be able to intra-doc-link it
|
||||
pub fn trimmed_def_paths(tcx: TyCtxt<'_>, (): ()) -> DefIdMap<Symbol> {
|
||||
// Trimming paths is expensive and not optimized, since we expect it to only be used for error
|
||||
// reporting.
|
||||
// reporting. Record the fact that we did it, so we can abort if we later found it was
|
||||
// unnecessary.
|
||||
//
|
||||
// For good paths causing this bug, the `rustc_middle::ty::print::with_no_trimmed_paths`
|
||||
// wrapper can be used to suppress this query, in exchange for full paths being formatted.
|
||||
tcx.sess.good_path_delayed_bug(
|
||||
"trimmed_def_paths constructed but no error emitted; use `DelayDm` for lints or `with_no_trimmed_paths` for debugging",
|
||||
);
|
||||
// The `rustc_middle::ty::print::with_no_trimmed_paths` wrapper can be used to suppress this
|
||||
// checking, in exchange for full paths being formatted.
|
||||
tcx.sess.record_trimmed_def_paths();
|
||||
|
||||
// Once constructed, unique namespace+symbol pairs will have a `Some(_)` entry, while
|
||||
// non-unique pairs will have a `None` entry.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue