Remove Print::Error
All printing goes through `fmt::Error` now.
This commit is contained in:
parent
6038888118
commit
6fc6a6d783
6 changed files with 17 additions and 32 deletions
|
@ -28,7 +28,7 @@ pub struct Highlighted<'tcx, T> {
|
|||
|
||||
impl<'tcx, T> IntoDiagnosticArg for Highlighted<'tcx, T>
|
||||
where
|
||||
T: for<'a> Print<'tcx, FmtPrinter<'a, 'tcx>, Error = fmt::Error>,
|
||||
T: for<'a> Print<'tcx, FmtPrinter<'a, 'tcx>>,
|
||||
{
|
||||
fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue<'static> {
|
||||
rustc_errors::DiagnosticArgValue::Str(self.to_string().into())
|
||||
|
@ -43,7 +43,7 @@ impl<'tcx, T> Highlighted<'tcx, T> {
|
|||
|
||||
impl<'tcx, T> fmt::Display for Highlighted<'tcx, T>
|
||||
where
|
||||
T: for<'a> Print<'tcx, FmtPrinter<'a, 'tcx>, Error = fmt::Error>,
|
||||
T: for<'a> Print<'tcx, FmtPrinter<'a, 'tcx>>,
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let mut printer = ty::print::FmtPrinter::new(self.tcx, Namespace::TypeNS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue