@@ -6,7 +6,7 @@ use syntax::ast::{
6
6
self , Attribute , CrateSugar , MetaItem , MetaItemKind , NestedMetaItem , NodeId , Path , Visibility ,
7
7
VisibilityKind ,
8
8
} ;
9
- use syntax:: ptr;
9
+ use syntax:: { ptr, print :: pprust } ;
10
10
use unicode_width:: UnicodeWidthStr ;
11
11
12
12
use crate :: comment:: { filter_normal_code, CharClasses , FullCodeCharKind , LineClasses } ;
@@ -42,7 +42,7 @@ pub(crate) fn is_same_visibility(a: &Visibility, b: &Visibility) -> bool {
42
42
(
43
43
VisibilityKind :: Restricted { path : p, .. } ,
44
44
VisibilityKind :: Restricted { path : q, .. } ,
45
- ) => p . to_string ( ) == q . to_string ( ) ,
45
+ ) => pprust :: path_to_string ( p ) == pprust :: path_to_string ( q ) ,
46
46
( VisibilityKind :: Public , VisibilityKind :: Public )
47
47
| ( VisibilityKind :: Inherited , VisibilityKind :: Inherited )
48
48
| (
@@ -241,7 +241,7 @@ pub(crate) fn last_line_extendable(s: &str) -> bool {
241
241
fn is_skip ( meta_item : & MetaItem ) -> bool {
242
242
match meta_item. kind {
243
243
MetaItemKind :: Word => {
244
- let path_str = meta_item. path . to_string ( ) ;
244
+ let path_str = pprust :: path_to_string ( & meta_item. path ) ;
245
245
path_str == skip_annotation ( ) . as_str ( ) || path_str == depr_skip_annotation ( ) . as_str ( )
246
246
}
247
247
MetaItemKind :: List ( ref l) => {
0 commit comments