@@ -50,7 +50,7 @@ struct BindingInfo {
5050}
5151
5252#[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
53- enum PatternSource {
53+ pub enum PatternSource {
5454 Match ,
5555 Let ,
5656 For ,
@@ -64,7 +64,7 @@ enum IsRepeatExpr {
6464}
6565
6666impl PatternSource {
67- fn descr ( self ) -> & ' static str {
67+ pub fn descr ( self ) -> & ' static str {
6868 match self {
6969 PatternSource :: Match => "match binding" ,
7070 PatternSource :: Let => "let binding" ,
@@ -2845,11 +2845,11 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
28452845 self . report_error (
28462846 ident. span ,
28472847 ResolutionError :: BindingShadowsSomethingUnacceptable {
2848- shadowing_binding_descr : pat_src. descr ( ) ,
2848+ shadowing_binding : pat_src,
28492849 name : ident. name ,
28502850 participle : if binding. is_import ( ) { "imported" } else { "defined" } ,
28512851 article : binding. res ( ) . article ( ) ,
2852- shadowed_binding_descr : binding. res ( ) . descr ( ) ,
2852+ shadowed_binding : binding. res ( ) ,
28532853 shadowed_binding_span : binding. span ,
28542854 } ,
28552855 ) ;
@@ -2861,11 +2861,11 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
28612861 self . report_error (
28622862 ident. span ,
28632863 ResolutionError :: BindingShadowsSomethingUnacceptable {
2864- shadowing_binding_descr : pat_src. descr ( ) ,
2864+ shadowing_binding : pat_src,
28652865 name : ident. name ,
28662866 participle : "defined" ,
28672867 article : res. article ( ) ,
2868- shadowed_binding_descr : res. descr ( ) ,
2868+ shadowed_binding : res,
28692869 shadowed_binding_span : self . r . opt_span ( def_id) . expect ( "const parameter defined outside of local crate" ) ,
28702870 }
28712871 ) ;
0 commit comments