@@ -50,7 +50,7 @@ struct BindingInfo {
50
50
}
51
51
52
52
#[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
53
- enum PatternSource {
53
+ pub enum PatternSource {
54
54
Match ,
55
55
Let ,
56
56
For ,
@@ -64,7 +64,7 @@ enum IsRepeatExpr {
64
64
}
65
65
66
66
impl PatternSource {
67
- fn descr ( self ) -> & ' static str {
67
+ pub fn descr ( self ) -> & ' static str {
68
68
match self {
69
69
PatternSource :: Match => "match binding" ,
70
70
PatternSource :: Let => "let binding" ,
@@ -2845,11 +2845,11 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
2845
2845
self . report_error (
2846
2846
ident. span ,
2847
2847
ResolutionError :: BindingShadowsSomethingUnacceptable {
2848
- shadowing_binding_descr : pat_src. descr ( ) ,
2848
+ shadowing_binding : pat_src,
2849
2849
name : ident. name ,
2850
2850
participle : if binding. is_import ( ) { "imported" } else { "defined" } ,
2851
2851
article : binding. res ( ) . article ( ) ,
2852
- shadowed_binding_descr : binding. res ( ) . descr ( ) ,
2852
+ shadowed_binding : binding. res ( ) ,
2853
2853
shadowed_binding_span : binding. span ,
2854
2854
} ,
2855
2855
) ;
@@ -2861,11 +2861,11 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
2861
2861
self . report_error (
2862
2862
ident. span ,
2863
2863
ResolutionError :: BindingShadowsSomethingUnacceptable {
2864
- shadowing_binding_descr : pat_src. descr ( ) ,
2864
+ shadowing_binding : pat_src,
2865
2865
name : ident. name ,
2866
2866
participle : "defined" ,
2867
2867
article : res. article ( ) ,
2868
- shadowed_binding_descr : res. descr ( ) ,
2868
+ shadowed_binding : res,
2869
2869
shadowed_binding_span : self . r . opt_span ( def_id) . expect ( "const parameter defined outside of local crate" ) ,
2870
2870
}
2871
2871
) ;
0 commit comments