@@ -88,7 +88,7 @@ enum DemangleStyle<'a> {
8888/// assert_eq!(demangle("_ZN3foo3barE").to_string(), "foo::bar");
8989/// assert_eq!(demangle("foo").to_string(), "foo");
9090/// ```
91- pub fn demangle ( mut s : & str ) -> Demangle {
91+ pub fn demangle ( mut s : & str ) -> Demangle < ' _ > {
9292 // During ThinLTO LLVM may import and rename internal symbols, so strip out
9393 // those endings first as they're one of the last manglings applied to symbol
9494 // names.
@@ -164,7 +164,7 @@ pub struct TryDemangleError {
164164/// // While `demangle` will just pass the non-symbol through as a no-op.
165165/// assert_eq!(rustc_demangle::demangle(not_a_rust_symbol).as_str(), not_a_rust_symbol);
166166/// ```
167- pub fn try_demangle ( s : & str ) -> Result < Demangle , TryDemangleError > {
167+ pub fn try_demangle ( s : & str ) -> Result < Demangle < ' _ > , TryDemangleError > {
168168 let sym = demangle ( s) ;
169169 if sym. style . is_some ( ) {
170170 Ok ( sym)
@@ -241,7 +241,7 @@ impl<F: fmt::Write> fmt::Write for SizeLimitedFmtAdapter<F> {
241241}
242242
243243impl < ' 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 {
245245 match self . style {
246246 None => f. write_str ( self . original ) ?,
247247 Some ( ref d) => {
@@ -276,7 +276,7 @@ impl<'a> fmt::Display for Demangle<'a> {
276276}
277277
278278impl < ' 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 {
280280 fmt:: Display :: fmt ( self , f)
281281 }
282282}
0 commit comments