diff options
| author | bors <bors@rust-lang.org> | 2022-11-10 02:05:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-10 02:05:38 +0000 |
| commit | 5eef9b2c50ddd4e445c10043908f785b08456489 (patch) | |
| tree | bdd2204999f8ad7b584d2a94d6552c8e2f3a29e3 /compiler/rustc_middle/src | |
| parent | 34115d040b43d9a0dcc313c6282520a86d1e6f61 (diff) | |
| parent | 7df4b0b66252748108b5d7edee27ee5776222f64 (diff) | |
Auto merge of #101990 - clubby789:dont-machine-apply-placeholder-method, r=compiler-errors
Fix auto-application of associated generic functions with placeholders Fixes #101920
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index c8815537835..2432b517519 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -1659,6 +1659,12 @@ impl<'t> TyCtxt<'t> { debug!("def_path_str: def_id={:?}, ns={:?}", def_id, ns); FmtPrinter::new(self, ns).print_def_path(def_id, substs).unwrap().into_buffer() } + + pub fn value_path_str_with_substs(self, def_id: DefId, substs: &'t [GenericArg<'t>]) -> String { + let ns = guess_def_namespace(self, def_id); + debug!("value_path_str: def_id={:?}, ns={:?}", def_id, ns); + FmtPrinter::new(self, ns).print_value_path(def_id, substs).unwrap().into_buffer() + } } impl fmt::Write for FmtPrinter<'_, '_> { |
