Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c13f519

Browse files
authoredJan 23, 2024
Unrolled build for rust-lang#120216
Rollup merge of rust-lang#120216 - nnethercote:fix-trimmed_def_paths-assertion, r=compiler-errors Fix a `trimmed_def_paths` assertion failure. `RegionHighlightMode::force_print_trimmed_def_path` can call `trimmed_def_paths` even when `tcx.sess.opts.trimmed_def_paths` is false. Based on the `force` in the method name, it seems this is deliberate, so I have removed the assertion. Fixes rust-lang#120035. r? `@compiler-errors`
2 parents d5fd099 + 012a304 commit c13f519

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed
 

‎compiler/rustc_middle/src/ty/print/pretty.rs

-2
Original file line numberDiff line numberDiff line change
@@ -3072,8 +3072,6 @@ fn for_each_def(tcx: TyCtxt<'_>, mut collect_fn: impl for<'b> FnMut(&'b Ident, N
30723072
/// See also [`DelayDm`](rustc_error_messages::DelayDm) and [`with_no_trimmed_paths!`].
30733073
// this is pub to be able to intra-doc-link it
30743074
pub fn trimmed_def_paths(tcx: TyCtxt<'_>, (): ()) -> DefIdMap<Symbol> {
3075-
assert!(tcx.sess.opts.trimmed_def_paths);
3076-
30773075
// Trimming paths is expensive and not optimized, since we expect it to only be used for error
30783076
// reporting.
30793077
//

0 commit comments

Comments
 (0)
Please sign in to comment.