File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,17 @@ impl fmt::Debug for Lifetime {
50
50
f,
51
51
"lifetime({}: {})" ,
52
52
self . id,
53
- pprust :: lifetime_to_string ( self )
53
+ self
54
54
)
55
55
}
56
56
}
57
57
58
+ impl fmt:: Display for Lifetime {
59
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
60
+ write ! ( f, "{}" , self . ident. name. as_str( ) )
61
+ }
62
+ }
63
+
58
64
/// A "Path" is essentially Rust's notion of a name.
59
65
///
60
66
/// It's represented as a sequence of identifiers,
Original file line number Diff line number Diff line change @@ -326,10 +326,6 @@ pub fn expr_to_string(e: &ast::Expr) -> String {
326
326
to_string ( |s| s. print_expr ( e) )
327
327
}
328
328
329
- pub fn lifetime_to_string ( lt : & ast:: Lifetime ) -> String {
330
- to_string ( |s| s. print_lifetime ( * lt) )
331
- }
332
-
333
329
pub fn tt_to_string ( tt : tokenstream:: TokenTree ) -> String {
334
330
to_string ( |s| s. print_tt ( tt, false ) )
335
331
}
You can’t perform that action at this time.
0 commit comments