This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ pub(super) fn check<'tcx>(
56
56
then {
57
57
let mut applicability = Applicability :: MachineApplicable ;
58
58
let hint = "unwrap_or_default()" ;
59
- let mut shrink = span;
59
+ let mut sugg_span = span;
60
60
61
61
let mut sugg: String = format!(
62
62
"{}.{}" ,
@@ -65,14 +65,14 @@ pub(super) fn check<'tcx>(
65
65
) ;
66
66
67
67
if sugg. lines( ) . count( ) > MAX_SUGGESTION_HIGHLIGHT_LINES {
68
- shrink = method_span. with_hi( span. hi( ) ) ;
68
+ sugg_span = method_span. with_hi( span. hi( ) ) ;
69
69
sugg = hint. to_string( ) ;
70
70
}
71
71
72
72
span_lint_and_sugg(
73
73
cx,
74
74
OR_FUN_CALL ,
75
- shrink ,
75
+ sugg_span ,
76
76
& format!( "use of `{}` followed by a call to `{}`" , name, path) ,
77
77
"try this" ,
78
78
sugg,
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ mod issue6675 {
177
177
}
178
178
179
179
mod issue8239 {
180
- unsafe fn more_than_max_suggestion_highest_lines_0() {
180
+ fn more_than_max_suggestion_highest_lines_0() {
181
181
let frames = Vec::new();
182
182
frames
183
183
.iter()
@@ -189,7 +189,7 @@ mod issue8239 {
189
189
.unwrap_or_default();
190
190
}
191
191
192
- unsafe fn more_to_max_suggestion_highest_lines_1() {
192
+ fn more_to_max_suggestion_highest_lines_1() {
193
193
let frames = Vec::new();
194
194
let iter = frames.iter();
195
195
iter.map(|f: &String| f.to_lowercase())
@@ -202,7 +202,7 @@ mod issue8239 {
202
202
.unwrap_or_default();
203
203
}
204
204
205
- unsafe fn equal_to_max_suggestion_highest_lines() {
205
+ fn equal_to_max_suggestion_highest_lines() {
206
206
let frames = Vec::new();
207
207
let iter = frames.iter();
208
208
iter.map(|f: &String| f.to_lowercase())
@@ -213,7 +213,7 @@ mod issue8239 {
213
213
}).unwrap_or_default();
214
214
}
215
215
216
- unsafe fn less_than_max_suggestion_highest_lines() {
216
+ fn less_than_max_suggestion_highest_lines() {
217
217
let frames = Vec::new();
218
218
let iter = frames.iter();
219
219
let map = iter.map(|f: &String| f.to_lowercase());
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ mod issue6675 {
177
177
}
178
178
179
179
mod issue8239 {
180
- unsafe fn more_than_max_suggestion_highest_lines_0 ( ) {
180
+ fn more_than_max_suggestion_highest_lines_0 ( ) {
181
181
let frames = Vec :: new ( ) ;
182
182
frames
183
183
. iter ( )
@@ -189,7 +189,7 @@ mod issue8239 {
189
189
. unwrap_or ( String :: new ( ) ) ;
190
190
}
191
191
192
- unsafe fn more_to_max_suggestion_highest_lines_1 ( ) {
192
+ fn more_to_max_suggestion_highest_lines_1 ( ) {
193
193
let frames = Vec :: new ( ) ;
194
194
let iter = frames. iter ( ) ;
195
195
iter. map ( |f : & String | f. to_lowercase ( ) )
@@ -202,7 +202,7 @@ mod issue8239 {
202
202
. unwrap_or ( String :: new ( ) ) ;
203
203
}
204
204
205
- unsafe fn equal_to_max_suggestion_highest_lines ( ) {
205
+ fn equal_to_max_suggestion_highest_lines ( ) {
206
206
let frames = Vec :: new ( ) ;
207
207
let iter = frames. iter ( ) ;
208
208
iter. map ( |f : & String | f. to_lowercase ( ) )
@@ -214,7 +214,7 @@ mod issue8239 {
214
214
. unwrap_or ( String :: new ( ) ) ;
215
215
}
216
216
217
- unsafe fn less_than_max_suggestion_highest_lines ( ) {
217
+ fn less_than_max_suggestion_highest_lines ( ) {
218
218
let frames = Vec :: new ( ) ;
219
219
let iter = frames. iter ( ) ;
220
220
let map = iter. map ( |f : & String | f. to_lowercase ( ) ) ;
You can’t perform that action at this time.
0 commit comments