You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// get the type that the function was called on, ie X in X::deser()
86
+
// get the type that the function was called on, ie X in X::call()
85
87
ifletExprKind::Path(qpath) = &fnc_expr.kind;
86
88
ifletQPath::TypeRelative(ty, _) = qpath;
87
89
ifletTyKind::Path(ty_qpath) = &ty.kind;
@@ -98,8 +100,10 @@ impl<'tcx> LateLintPass<'tcx> for TypeCosplay {
98
100
cx,
99
101
TYPE_COSPLAY,
100
102
fnc_expr.span,
101
-
&format!("{} type implements the anchor_lang::Discriminator trait. If you are using #[account] to derive Discriminator, use try_deserialize() instead.",
102
-
middle_ty),
103
+
&format!("`{}` type implements the `Discriminator` trait. If you are attempting to deserialize\n here and `{}` is annotated with #[account] use try_deserialize() instead.",
104
+
middle_ty,
105
+
middle_ty
106
+
),
103
107
None,
104
108
"otherwise, make sure you are accounting for this type's discriminator in your deserialization function"
0 commit comments