@@ -4,9 +4,9 @@ use std::borrow::Cow;
4
4
use std:: cmp:: { max, min, Ordering } ;
5
5
6
6
use regex:: Regex ;
7
+ use rustc_ast:: visit;
8
+ use rustc_ast:: { ast, ptr} ;
7
9
use rustc_span:: { source_map, symbol, BytePos , Span , DUMMY_SP } ;
8
- use syntax:: visit;
9
- use syntax:: { ast, ptr} ;
10
10
11
11
use crate :: attr:: filter_inline_attrs;
12
12
use crate :: comment:: {
@@ -594,7 +594,7 @@ impl<'a> FmtVisitor<'a> {
594
594
self . buffer . clear ( ) ;
595
595
}
596
596
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 {
598
598
match ty {
599
599
None => true ,
600
600
Some ( lty) => match lty. kind . opaque_top_hack ( ) {
@@ -604,7 +604,7 @@ impl<'a> FmtVisitor<'a> {
604
604
}
605
605
}
606
606
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 {
608
608
match ty {
609
609
None => false ,
610
610
Some ( lty) => match lty. kind . opaque_top_hack ( ) {
@@ -615,15 +615,15 @@ impl<'a> FmtVisitor<'a> {
615
615
}
616
616
617
617
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 > > ,
620
620
) -> bool {
621
621
is_type ( a) && is_type ( b)
622
622
}
623
623
624
624
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 > > ,
627
627
) -> bool {
628
628
is_opaque ( a) && is_opaque ( b)
629
629
}
0 commit comments