@@ -115,8 +115,10 @@ impl<'a> LateResolutionVisitor<'a, '_> {
115115 if is_self_type ( path, ns) {
116116 syntax:: diagnostic_used!( E0411 ) ;
117117 err. code ( DiagnosticId :: Error ( "E0411" . into ( ) ) ) ;
118- err. span_label ( span, format ! ( "`Self` is only available in impls, traits, \
119- and type definitions") ) ;
118+ err. span_label (
119+ span,
120+ format ! ( "`Self` is only available in impls, traits, and type definitions" ) ,
121+ ) ;
120122 return ( err, Vec :: new ( ) ) ;
121123 }
122124 if is_self_value ( path, ns) {
@@ -125,16 +127,12 @@ impl<'a> LateResolutionVisitor<'a, '_> {
125127 syntax:: diagnostic_used!( E0424 ) ;
126128 err. code ( DiagnosticId :: Error ( "E0424" . into ( ) ) ) ;
127129 err. span_label ( span, match source {
128- PathSource :: Pat => {
129- format ! ( "`self` value is a keyword \
130- and may not be bound to \
131- variables or shadowed")
132- }
133- _ => {
134- format ! ( "`self` value is a keyword \
135- only available in methods \
136- with `self` parameter")
137- }
130+ PathSource :: Pat => format ! (
131+ "`self` value is a keyword and may not be bound to variables or shadowed" ,
132+ ) ,
133+ _ => format ! (
134+ "`self` value is a keyword only available in methods with a `self` parameter" ,
135+ ) ,
138136 } ) ;
139137 return ( err, Vec :: new ( ) ) ;
140138 }
0 commit comments