@@ -98,13 +98,13 @@ pub fn in_macro(span: Span) -> bool {
9898/// Used to store the absolute path to a type.
9999///
100100/// See `match_def_path` for usage.
101- pub struct AbsolutePathBuffer < ' a , ' tcx > {
101+ pub struct AbsolutePathPrinter < ' a , ' tcx > {
102102 pub tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
103103}
104104
105105use rustc:: ty:: print:: Printer ;
106106
107- impl < ' tcx > Printer < ' tcx , ' tcx > for AbsolutePathBuffer < ' _ , ' tcx > {
107+ impl < ' tcx > Printer < ' tcx , ' tcx > for AbsolutePathPrinter < ' _ , ' tcx > {
108108 type Error = !;
109109
110110 type Path = Vec < String > ;
@@ -201,7 +201,7 @@ impl<'tcx> Printer<'tcx, 'tcx> for AbsolutePathBuffer<'_, 'tcx> {
201201///
202202/// See also the `paths` module.
203203pub fn match_def_path < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , def_id : DefId , path : & [ & str ] ) -> bool {
204- let names = AbsolutePathBuffer { tcx } . print_def_path ( def_id, & [ ] ) . unwrap ( ) ;
204+ let names = AbsolutePathPrinter { tcx } . print_def_path ( def_id, & [ ] ) . unwrap ( ) ;
205205
206206 names. len ( ) == path. len ( ) && names. into_iter ( ) . zip ( path. iter ( ) ) . all ( |( a, & b) | * a == * b)
207207}
@@ -216,7 +216,7 @@ pub fn match_def_path<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId, path
216216/// };
217217/// ```
218218pub fn get_def_path < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , def_id : DefId ) -> Vec < String > {
219- AbsolutePathBuffer { tcx } . print_def_path ( def_id, & [ ] ) . unwrap ( )
219+ AbsolutePathPrinter { tcx } . print_def_path ( def_id, & [ ] ) . unwrap ( )
220220}
221221
222222/// Checks if type is struct, enum or union type with the given def path.
0 commit comments