@@ -115,8 +115,10 @@ impl<'a> LateResolutionVisitor<'a, '_> {
115
115
if is_self_type ( path, ns) {
116
116
syntax:: diagnostic_used!( E0411 ) ;
117
117
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
+ ) ;
120
122
return ( err, Vec :: new ( ) ) ;
121
123
}
122
124
if is_self_value ( path, ns) {
@@ -125,16 +127,12 @@ impl<'a> LateResolutionVisitor<'a, '_> {
125
127
syntax:: diagnostic_used!( E0424 ) ;
126
128
err. code ( DiagnosticId :: Error ( "E0424" . into ( ) ) ) ;
127
129
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
+ ) ,
138
136
} ) ;
139
137
return ( err, Vec :: new ( ) ) ;
140
138
}
0 commit comments