Make non-zero check more obvious
This commit is contained in:
parent
a6dfd89fa7
commit
94c9d0c90f
@ -464,7 +464,7 @@ fn virtual_call_violation_for_method<'tcx>(
|
||||
|
||||
// We can't monomorphize things like `fn foo<A>(...)`.
|
||||
let own_counts = tcx.generics_of(method.def_id).own_counts();
|
||||
if own_counts.types + own_counts.consts != 0 {
|
||||
if own_counts.types > 0 || own_counts.consts > 0 {
|
||||
return Some(MethodViolationCode::Generic);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user