diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-22 11:00:30 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-22 11:00:30 +1100 |
| commit | 012a304a167aa4bafe91f40cc73ed4bb0073877c (patch) | |
| tree | f271f0cb8b6f18fcfd6ffe3a58b475f4dbea2802 /compiler | |
| parent | ef71f1047e04438181d7cb925a833e2ada6ab390 (diff) | |
| download | rust-012a304a167aa4bafe91f40cc73ed4bb0073877c.tar.gz rust-012a304a167aa4bafe91f40cc73ed4bb0073877c.zip | |
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 #120035.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 4028de27cae..a06f4c6ba12 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -3072,8 +3072,6 @@ fn for_each_def(tcx: TyCtxt<'_>, mut collect_fn: impl for<'b> FnMut(&'b Ident, N /// See also [`DelayDm`](rustc_error_messages::DelayDm) and [`with_no_trimmed_paths!`]. // this is pub to be able to intra-doc-link it pub fn trimmed_def_paths(tcx: TyCtxt<'_>, (): ()) -> DefIdMap<Symbol> { - assert!(tcx.sess.opts.trimmed_def_paths); - // Trimming paths is expensive and not optimized, since we expect it to only be used for error // reporting. // |
