You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this symbol will be parsed successfully, unwrap will work, but to_string() will panic!:
let x = cpp_demangle::Symbol::new("_Z18convertCase_helperIN14QUnicodeTables14CasefoldTraitsEtET0_S2_");println!("{:?}",x);let y = x.unwrap();println!("{:?}",y);let z = y.to_string();println!("{:?}",z);
results in:
Ok(Symbol { raw: "_Z18convertCase_helperIN14QUnicodeTables14CasefoldTraitsEtET0_S2_", substitutions: SubstitutionTable {0: UnscopedTemplateName(UnscopedTemplateName(Unqualified(Source(SourceName(Identifier { start: 4, end: 22 }))))), 1: Prefix(Unqualified(Source(SourceName(Identifier { start: 26, end: 40 })))), 2: Prefix(Nested(BackReference(1), Source(SourceName(Identifier { start: 42, end: 56 })))), 3: Type(ClassEnum(Named(Nested(NestedName(CvQualifiers { restrict: false, volatile: false, const_: false }, None, BackReference(2)))))), 4: Type(TemplateParam(TemplateParam(1)))}, parsed: Encoding(Function(UnscopedTemplate(BackReference(0), TemplateArgs([Type(BackReference(3)), Type(Builtin(Standard(UnsignedShort)))])), BareFunctionType([BackReference(4), BackReference(3)]))) })
Symbol { raw: "_Z18convertCase_helperIN14QUnicodeTables14CasefoldTraitsEtET0_S2_", substitutions: SubstitutionTable {0: UnscopedTemplateName(UnscopedTemplateName(Unqualified(Source(SourceName(Identifier { start: 4, end: 22 }))))), 1: Prefix(Unqualified(Source(SourceName(Identifier { start: 26, end: 40 })))), 2: Prefix(Nested(BackReference(1), Source(SourceName(Identifier { start: 42, end: 56 })))), 3: Type(ClassEnum(Named(Nested(NestedName(CvQualifiers { restrict: false, volatile: false, const_: false }, None, BackReference(2)))))), 4: Type(TemplateParam(TemplateParam(1)))}, parsed: Encoding(Function(UnscopedTemplate(BackReference(0), TemplateArgs([Type(BackReference(3)), Type(Builtin(Standard(UnsignedShort)))])), BareFunctionType([BackReference(4), BackReference(3)]))) }
thread 'main' panicked at 'a Display implementation return an error unexpectedly: Error', /checkout/src/libcore/result.rs:860
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at /checkout/src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at /checkout/src/libstd/sys_common/backtrace.rs:60
at /checkout/src/libstd/panicking.rs:355
3: std::panicking::default_hook
at /checkout/src/libstd/panicking.rs:371
4: std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:549
5: std::panicking::begin_panic
at /checkout/src/libstd/panicking.rs:511
6: std::panicking::begin_panic_fmt
at /checkout/src/libstd/panicking.rs:495
7: rust_begin_unwind
at /checkout/src/libstd/panicking.rs:471
8: core::panicking::panic_fmt
at /checkout/src/libcore/panicking.rs:69
9: core::result::unwrap_failed
at /checkout/src/libcore/macros.rs:29
10: <core::result::Result<T, E>>::expect
at /checkout/src/libcore/result.rs:762
11: <T as collections::string::ToString>::to_string
at /checkout/src/libcollections/string.rs:2027
12: cpp_test_demangle::main
at src/main.rs:41
13: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
14: std::rt::lang_start
at /checkout/src/libstd/panicking.rs:433
at /checkout/src/libstd/panic.rs:361
at /checkout/src/libstd/rt.rs:59
15: main
16: __libc_start_main
17: _start
this symbol should be:
>> c++filt
_Z18convertCase_helperIN14QUnicodeTables14CasefoldTraitsEtET0_S2_
unsigned short convertCase_helper<QUnicodeTables::CasefoldTraits, unsigned short>(unsigned short)
The text was updated successfully, but these errors were encountered:
this symbol will be parsed successfully, unwrap will work, but to_string() will panic!:
results in:
this symbol should be:
The text was updated successfully, but these errors were encountered: