From eef6b4a37b9b7a1753bb91016c36435ad66309dc Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Fri, 1 May 2015 11:27:36 -0700 Subject: [PATCH] syntax: Allow pretty printing more interpolated items --- src/libsyntax/print/pprust.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 5a002dd790fe..419b37262945 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -287,19 +287,19 @@ pub fn token_to_string(tok: &Token) -> String { token::SpecialVarNt(var) => format!("${}", var.as_str()), token::Interpolated(ref nt) => match *nt { - token::NtExpr(ref e) => expr_to_string(&**e), - token::NtMeta(ref e) => meta_item_to_string(&**e), - token::NtTy(ref e) => ty_to_string(&**e), - token::NtPath(ref e) => path_to_string(&**e), - token::NtItem(..) => "an interpolated item".to_string(), - token::NtBlock(..) => "an interpolated block".to_string(), - token::NtStmt(..) => "an interpolated statement".to_string(), - token::NtPat(..) => "an interpolated pattern".to_string(), - token::NtIdent(..) => "an interpolated identifier".to_string(), - token::NtTT(..) => "an interpolated tt".to_string(), - token::NtArm(..) => "an interpolated arm".to_string(), - token::NtImplItem(..) => "an interpolated impl item".to_string(), - token::NtTraitItem(..) => "an interpolated trait item".to_string(), + token::NtExpr(ref e) => expr_to_string(&**e), + token::NtMeta(ref e) => meta_item_to_string(&**e), + token::NtTy(ref e) => ty_to_string(&**e), + token::NtPath(ref e) => path_to_string(&**e), + token::NtItem(ref e) => item_to_string(&**e), + token::NtBlock(ref e) => block_to_string(&**e), + token::NtStmt(ref e) => stmt_to_string(&**e), + token::NtPat(ref e) => pat_to_string(&**e), + token::NtIdent(ref e) => ident_to_string(&**e), + token::NtTT(ref e) => tt_to_string(&**e), + token::NtArm(ref e) => arm_to_string(&**e), + token::NtImplItem(ref e) => impl_item_to_string(&**e), + token::NtTraitItem(ref e) => trait_item_to_string(&**e), } } }