@@ -4,9 +4,9 @@ use std::borrow::Cow;
44use std:: cmp:: { max, min, Ordering } ;
55
66use regex:: Regex ;
7+ use rustc_ast:: visit;
8+ use rustc_ast:: { ast, ptr} ;
79use rustc_span:: { source_map, symbol, BytePos , Span , DUMMY_SP } ;
8- use syntax:: visit;
9- use syntax:: { ast, ptr} ;
1010
1111use crate :: attr:: filter_inline_attrs;
1212use crate :: comment:: {
@@ -594,7 +594,7 @@ impl<'a> FmtVisitor<'a> {
594594 self . buffer . clear ( ) ;
595595 }
596596
597- fn is_type ( ty : & Option < syntax :: ptr:: P < ast:: Ty > > ) -> bool {
597+ fn is_type ( ty : & Option < rustc_ast :: ptr:: P < ast:: Ty > > ) -> bool {
598598 match ty {
599599 None => true ,
600600 Some ( lty) => match lty. kind . opaque_top_hack ( ) {
@@ -604,7 +604,7 @@ impl<'a> FmtVisitor<'a> {
604604 }
605605 }
606606
607- fn is_opaque ( ty : & Option < syntax :: ptr:: P < ast:: Ty > > ) -> bool {
607+ fn is_opaque ( ty : & Option < rustc_ast :: ptr:: P < ast:: Ty > > ) -> bool {
608608 match ty {
609609 None => false ,
610610 Some ( lty) => match lty. kind . opaque_top_hack ( ) {
@@ -615,15 +615,15 @@ impl<'a> FmtVisitor<'a> {
615615 }
616616
617617 fn both_type (
618- a : & Option < syntax :: ptr:: P < ast:: Ty > > ,
619- b : & Option < syntax :: ptr:: P < ast:: Ty > > ,
618+ a : & Option < rustc_ast :: ptr:: P < ast:: Ty > > ,
619+ b : & Option < rustc_ast :: ptr:: P < ast:: Ty > > ,
620620 ) -> bool {
621621 is_type ( a) && is_type ( b)
622622 }
623623
624624 fn both_opaque (
625- a : & Option < syntax :: ptr:: P < ast:: Ty > > ,
626- b : & Option < syntax :: ptr:: P < ast:: Ty > > ,
625+ a : & Option < rustc_ast :: ptr:: P < ast:: Ty > > ,
626+ b : & Option < rustc_ast :: ptr:: P < ast:: Ty > > ,
627627 ) -> bool {
628628 is_opaque ( a) && is_opaque ( b)
629629 }
0 commit comments