We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6dfd89 commit 94c9d0cCopy full SHA for 94c9d0c
compiler/rustc_trait_selection/src/traits/object_safety.rs
@@ -464,7 +464,7 @@ fn virtual_call_violation_for_method<'tcx>(
464
465
// We can't monomorphize things like `fn foo<A>(...)`.
466
let own_counts = tcx.generics_of(method.def_id).own_counts();
467
- if own_counts.types + own_counts.consts != 0 {
+ if own_counts.types > 0 || own_counts.consts > 0 {
468
return Some(MethodViolationCode::Generic);
469
}
470
0 commit comments