@@ -88,7 +88,7 @@ enum DemangleStyle<'a> {
88
88
/// assert_eq!(demangle("_ZN3foo3barE").to_string(), "foo::bar");
89
89
/// assert_eq!(demangle("foo").to_string(), "foo");
90
90
/// ```
91
- pub fn demangle ( mut s : & str ) -> Demangle {
91
+ pub fn demangle ( mut s : & str ) -> Demangle < ' _ > {
92
92
// During ThinLTO LLVM may import and rename internal symbols, so strip out
93
93
// those endings first as they're one of the last manglings applied to symbol
94
94
// names.
@@ -164,7 +164,7 @@ pub struct TryDemangleError {
164
164
/// // While `demangle` will just pass the non-symbol through as a no-op.
165
165
/// assert_eq!(rustc_demangle::demangle(not_a_rust_symbol).as_str(), not_a_rust_symbol);
166
166
/// ```
167
- pub fn try_demangle ( s : & str ) -> Result < Demangle , TryDemangleError > {
167
+ pub fn try_demangle ( s : & str ) -> Result < Demangle < ' _ > , TryDemangleError > {
168
168
let sym = demangle ( s) ;
169
169
if sym. style . is_some ( ) {
170
170
Ok ( sym)
@@ -241,7 +241,7 @@ impl<F: fmt::Write> fmt::Write for SizeLimitedFmtAdapter<F> {
241
241
}
242
242
243
243
impl < ' a > fmt:: Display for Demangle < ' a > {
244
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
244
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
245
245
match self . style {
246
246
None => f. write_str ( self . original ) ?,
247
247
Some ( ref d) => {
@@ -276,7 +276,7 @@ impl<'a> fmt::Display for Demangle<'a> {
276
276
}
277
277
278
278
impl < ' a > fmt:: Debug for Demangle < ' a > {
279
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
279
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
280
280
fmt:: Display :: fmt ( self , f)
281
281
}
282
282
}
0 commit comments