@@ -35,7 +35,7 @@ pub(super) enum CallOutcome<'db> {
35
35
call_outcome : Box < CallOutcome < ' db > > ,
36
36
} ,
37
37
StaticAssertionError {
38
- ty : Type < ' db > ,
38
+ argument_ty : Type < ' db > ,
39
39
truthiness : Truthiness ,
40
40
} ,
41
41
}
@@ -260,7 +260,7 @@ impl<'db> CallOutcome<'db> {
260
260
}
261
261
}
262
262
CallOutcome :: StaticAssertionError {
263
- ty : Type :: BooleanLiteral ( false ) ,
263
+ argument_ty : Type :: BooleanLiteral ( false ) ,
264
264
truthiness : _,
265
265
} => {
266
266
context. report_lint (
@@ -271,31 +271,38 @@ impl<'db> CallOutcome<'db> {
271
271
272
272
Ok ( Type :: Unknown )
273
273
}
274
- CallOutcome :: StaticAssertionError { ty, truthiness }
275
- if truthiness. is_always_false ( ) =>
276
- {
274
+ CallOutcome :: StaticAssertionError {
275
+ argument_ty,
276
+ truthiness,
277
+ } if truthiness. is_always_false ( ) => {
277
278
context. report_lint (
278
279
& STATIC_ASSERT_ERROR ,
279
280
node,
280
- format_args ! ( "Static assertion error: argument of type `{ty }` is statically known to be falsy" , ty=ty . display( db) ) ,
281
+ format_args ! ( "Static assertion error: argument of type `{argument_ty }` is statically known to be falsy" , argument_ty=argument_ty . display( db) ) ,
281
282
) ;
282
283
283
284
Ok ( Type :: Unknown )
284
285
}
285
- CallOutcome :: StaticAssertionError { ty, truthiness } if truthiness. is_ambiguous ( ) => {
286
+ CallOutcome :: StaticAssertionError {
287
+ argument_ty,
288
+ truthiness,
289
+ } if truthiness. is_ambiguous ( ) => {
286
290
context. report_lint (
287
291
& STATIC_ASSERT_ERROR ,
288
292
node,
289
- format_args ! ( "Static assertion error: argument of type `{ty }` has an ambiguous static truthiness" , ty=ty . display( db) ) ,
293
+ format_args ! ( "Static assertion error: argument of type `{argument_ty }` has an ambiguous static truthiness" , argument_ty=argument_ty . display( db) ) ,
290
294
) ;
291
295
292
296
Ok ( Type :: Unknown )
293
297
}
294
- CallOutcome :: StaticAssertionError { ty, truthiness : _ } => {
298
+ CallOutcome :: StaticAssertionError {
299
+ argument_ty,
300
+ truthiness : _,
301
+ } => {
295
302
context. report_lint (
296
303
& STATIC_ASSERT_ERROR ,
297
304
node,
298
- format_args ! ( "Static assertion error: expected argument of type `{ty }` to have static truthiness" , ty=ty . display( db) ) ,
305
+ format_args ! ( "Static assertion error: expected argument of type `{argument_ty }` to have static truthiness" , argument_ty=argument_ty . display( db) ) ,
299
306
) ;
300
307
301
308
Ok ( Type :: Unknown )
0 commit comments