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
When calling call_f, the bound T: Tr2 does not appear, but it is used. To visit trait bounds correctly, see in rustc_traits/src/codegen.rs, the implementation of function codegen_select_candidate.
After #1220, the termination check must be reworked (again), as it allows the following two incorrect examples:
Recursive instantiation
When calling
call_f
, the boundT: Tr2
does not appear, but it is used. To visit trait bounds correctly, see inrustc_traits/src/codegen.rs
, the implementation of functioncodegen_select_candidate
.Default function uses trait instance
This is never flagged by the current check, even if we do something like
We should forbid
f
from using the trait instance it is defining.The text was updated successfully, but these errors were encountered: