File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
compiler/rustc_errors/src
src/tools/clippy/tests/ui Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -2152,6 +2152,7 @@ impl HumanEmitter {
21522152
21532153 let line_start = sm. lookup_char_pos ( parts[ 0 ] . original_span . lo ( ) ) . line ;
21542154 let mut lines = complete. lines ( ) ;
2155+ let lines_len = lines. clone ( ) . count ( ) ;
21552156 if lines. clone ( ) . next ( ) . is_none ( ) {
21562157 // Account for a suggestion to completely remove a line(s) with whitespace (#94192).
21572158 let line_end = sm. lookup_char_pos ( parts[ 0 ] . original_span . hi ( ) ) . line ;
@@ -2192,6 +2193,7 @@ impl HumanEmitter {
21922193 if highlight_parts. len ( ) == 1
21932194 && line. trim ( ) . starts_with ( "#[" )
21942195 && line. trim ( ) . ends_with ( ']' )
2196+ && lines_len == 1
21952197 {
21962198 is_item_attribute = true ;
21972199 }
Original file line number Diff line number Diff line change @@ -191,7 +191,6 @@ LL + fn default() -> Self {
191191LL + Self::new()
192192LL + }
193193LL + }
194- LL | impl NewWithCfg {
195194 |
196195
197196error: you should consider adding a `Default` implementation for `NewWith2Cfgs`
@@ -212,7 +211,6 @@ LL + fn default() -> Self {
212211LL + Self::new()
213212LL + }
214213LL + }
215- LL | impl NewWith2Cfgs {
216214 |
217215
218216error: you should consider adding a `Default` implementation for `NewWithExtraneous`
@@ -250,7 +248,6 @@ LL + fn default() -> Self {
250248LL + Self::new()
251249LL + }
252250LL + }
253- LL | impl NewWithCfgAndExtraneous {
254251 |
255252
256253error: aborting due to 13 previous errors
You can’t perform that action at this time.
0 commit comments