1
+ use rustc_span:: { self , BytePos , FileName } ;
1
2
use rustc_target:: spec:: abi:: Abi ;
2
3
use syntax:: ast;
3
4
use syntax:: print:: pp:: Breaks :: { Consistent , Inconsistent } ;
@@ -7,7 +8,6 @@ use syntax::sess::ParseSess;
7
8
use syntax:: source_map:: { SourceMap , Spanned } ;
8
9
use syntax:: symbol:: kw;
9
10
use syntax:: util:: parser:: { self , AssocOp , Fixity } ;
10
- use syntax_pos:: { self , BytePos , FileName } ;
11
11
12
12
use crate :: hir;
13
13
use crate :: hir:: { GenericArg , GenericParam , GenericParamKind } ;
@@ -178,7 +178,7 @@ impl<'a> State<'a> {
178
178
self . end ( ) ; // close the head-box
179
179
}
180
180
181
- pub fn bclose_maybe_open ( & mut self , span : syntax_pos :: Span , close_box : bool ) {
181
+ pub fn bclose_maybe_open ( & mut self , span : rustc_span :: Span , close_box : bool ) {
182
182
self . maybe_print_comment ( span. hi ( ) ) ;
183
183
self . break_offset_if_not_bol ( 1 , -( INDENT_UNIT as isize ) ) ;
184
184
self . s . word ( "}" ) ;
@@ -187,7 +187,7 @@ impl<'a> State<'a> {
187
187
}
188
188
}
189
189
190
- pub fn bclose ( & mut self , span : syntax_pos :: Span ) {
190
+ pub fn bclose ( & mut self , span : rustc_span :: Span ) {
191
191
self . bclose_maybe_open ( span, true )
192
192
}
193
193
@@ -223,7 +223,7 @@ impl<'a> State<'a> {
223
223
pub fn commasep_cmnt < T , F , G > ( & mut self , b : Breaks , elts : & [ T ] , mut op : F , mut get_span : G )
224
224
where
225
225
F : FnMut ( & mut State < ' _ > , & T ) ,
226
- G : FnMut ( & T ) -> syntax_pos :: Span ,
226
+ G : FnMut ( & T ) -> rustc_span :: Span ,
227
227
{
228
228
self . rbox ( 0 , b) ;
229
229
let len = elts. len ( ) ;
@@ -704,7 +704,7 @@ impl<'a> State<'a> {
704
704
enum_definition : & hir:: EnumDef < ' _ > ,
705
705
generics : & hir:: Generics < ' _ > ,
706
706
name : ast:: Name ,
707
- span : syntax_pos :: Span ,
707
+ span : rustc_span :: Span ,
708
708
visibility : & hir:: Visibility < ' _ > ,
709
709
) {
710
710
self . head ( visibility_qualified ( visibility, "enum" ) ) ;
@@ -715,7 +715,7 @@ impl<'a> State<'a> {
715
715
self . print_variants ( & enum_definition. variants , span)
716
716
}
717
717
718
- pub fn print_variants ( & mut self , variants : & [ hir:: Variant < ' _ > ] , span : syntax_pos :: Span ) {
718
+ pub fn print_variants ( & mut self , variants : & [ hir:: Variant < ' _ > ] , span : rustc_span :: Span ) {
719
719
self . bopen ( ) ;
720
720
for v in variants {
721
721
self . space_if_not_bol ( ) ;
@@ -763,7 +763,7 @@ impl<'a> State<'a> {
763
763
struct_def : & hir:: VariantData < ' _ > ,
764
764
generics : & hir:: Generics < ' _ > ,
765
765
name : ast:: Name ,
766
- span : syntax_pos :: Span ,
766
+ span : rustc_span :: Span ,
767
767
print_finalizer : bool ,
768
768
) {
769
769
self . print_name ( name) ;
@@ -839,18 +839,18 @@ impl<'a> State<'a> {
839
839
match ti. kind {
840
840
hir:: TraitItemKind :: Const ( ref ty, default) => {
841
841
let vis =
842
- Spanned { span : syntax_pos :: DUMMY_SP , node : hir:: VisibilityKind :: Inherited } ;
842
+ Spanned { span : rustc_span :: DUMMY_SP , node : hir:: VisibilityKind :: Inherited } ;
843
843
self . print_associated_const ( ti. ident , & ty, default, & vis) ;
844
844
}
845
845
hir:: TraitItemKind :: Method ( ref sig, hir:: TraitMethod :: Required ( ref arg_names) ) => {
846
846
let vis =
847
- Spanned { span : syntax_pos :: DUMMY_SP , node : hir:: VisibilityKind :: Inherited } ;
847
+ Spanned { span : rustc_span :: DUMMY_SP , node : hir:: VisibilityKind :: Inherited } ;
848
848
self . print_method_sig ( ti. ident , sig, & ti. generics , & vis, arg_names, None ) ;
849
849
self . s . word ( ";" ) ;
850
850
}
851
851
hir:: TraitItemKind :: Method ( ref sig, hir:: TraitMethod :: Provided ( body) ) => {
852
852
let vis =
853
- Spanned { span : syntax_pos :: DUMMY_SP , node : hir:: VisibilityKind :: Inherited } ;
853
+ Spanned { span : rustc_span :: DUMMY_SP , node : hir:: VisibilityKind :: Inherited } ;
854
854
self . head ( "" ) ;
855
855
self . print_method_sig ( ti. ident , sig, & ti. generics , & vis, & [ ] , Some ( body) ) ;
856
856
self . nbsp ( ) ;
@@ -2097,8 +2097,8 @@ impl<'a> State<'a> {
2097
2097
}
2098
2098
let generics = hir:: Generics {
2099
2099
params : & [ ] ,
2100
- where_clause : hir:: WhereClause { predicates : & [ ] , span : syntax_pos :: DUMMY_SP } ,
2101
- span : syntax_pos :: DUMMY_SP ,
2100
+ where_clause : hir:: WhereClause { predicates : & [ ] , span : rustc_span :: DUMMY_SP } ,
2101
+ span : rustc_span :: DUMMY_SP ,
2102
2102
} ;
2103
2103
self . print_fn (
2104
2104
decl,
@@ -2110,7 +2110,7 @@ impl<'a> State<'a> {
2110
2110
} ,
2111
2111
name,
2112
2112
& generics,
2113
- & Spanned { span : syntax_pos :: DUMMY_SP , node : hir:: VisibilityKind :: Inherited } ,
2113
+ & Spanned { span : rustc_span :: DUMMY_SP , node : hir:: VisibilityKind :: Inherited } ,
2114
2114
arg_names,
2115
2115
None ,
2116
2116
) ;
@@ -2119,7 +2119,7 @@ impl<'a> State<'a> {
2119
2119
2120
2120
pub fn maybe_print_trailing_comment (
2121
2121
& mut self ,
2122
- span : syntax_pos :: Span ,
2122
+ span : rustc_span :: Span ,
2123
2123
next_pos : Option < BytePos > ,
2124
2124
) {
2125
2125
if let Some ( cmnts) = self . comments ( ) {
0 commit comments