Always format to internal String in FmtPrinter
This avoids monomorphizing for different parameters, decreasing generic code instantiated downstream from rustc_middle.
This commit is contained in:
@@ -983,10 +983,9 @@ fn foo(&self) -> Self::T { String::new() }
|
||||
}
|
||||
|
||||
fn format_generic_args(self, args: &[ty::GenericArg<'tcx>]) -> String {
|
||||
let mut item_args = String::new();
|
||||
FmtPrinter::new(self, &mut item_args, hir::def::Namespace::TypeNS)
|
||||
FmtPrinter::new(self, hir::def::Namespace::TypeNS)
|
||||
.path_generic_args(Ok, args)
|
||||
.expect("could not write to `String`.");
|
||||
item_args
|
||||
.expect("could not write to `String`.")
|
||||
.into_buffer()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user