use rustc_hir_pretty::qpath_to_string to avoid span_to_snippet when rendering path
This commit is contained in:
parent
04c590b7ef
commit
7a45a60418
9 changed files with 52 additions and 15 deletions
|
@ -211,6 +211,10 @@ pub fn path_to_string(segment: &hir::Path<'_>) -> String {
|
|||
to_string(NO_ANN, |s| s.print_path(segment, false))
|
||||
}
|
||||
|
||||
pub fn qpath_to_string(segment: &hir::QPath<'_>) -> String {
|
||||
to_string(NO_ANN, |s| s.print_qpath(segment, false))
|
||||
}
|
||||
|
||||
pub fn fn_to_string(
|
||||
decl: &hir::FnDecl<'_>,
|
||||
header: hir::FnHeader,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue