diff --git a/llvm/lib/Demangle/RustDemangle.cpp b/llvm/lib/Demangle/RustDemangle.cpp --- a/llvm/lib/Demangle/RustDemangle.cpp +++ b/llvm/lib/Demangle/RustDemangle.cpp @@ -113,7 +113,10 @@ demanglePath(rust_demangle::InType::No); - // FIXME parse optional . + if (Position != Input.size()) { + SwapAndRestore SavePrint(Print, false); + demanglePath(InType::No); + } if (Position != Input.size()) Error = true; diff --git a/llvm/test/Demangle/rust.test b/llvm/test/Demangle/rust.test --- a/llvm/test/Demangle/rust.test +++ b/llvm/test/Demangle/rust.test @@ -9,6 +9,11 @@ CHECK: a::b::c _RNvNvC1a1b1c +; Instantiating crate + +CHECK: crate + _RC5crateC3foo + ; Closure namespace CHECK: crate::{closure#0}