-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement impl reachability rules. This is a [breaking-change]. Type
parameters on impls must now also appear in the trait ref, self type, or some associated type declared on the impl. This ensures that they are constrianed in some way and that the semantics of the trait system are well-defined (always a good thing). There are three major ways to fix this error: 1. Convert the trait to use associated types; most often the type parameters are not constrained because they are in fact outputs of the impl. 2. Move the type parameters to methods. 3. Add an additional type parameter to the self type or trait so that the unused parameter can appear there. In some cases, it is not possible to fix the impl because the trait definition needs to be changed first (and that may be out of your control). In that case, for the time being, you can opt out of these rules by using `#[old_impl_check]` on the impl and adding a `#![feature(old_impl_check)]` to your crate declaration.
- Loading branch information
1 parent
3ed7f06
commit 2375a79
Showing
3 changed files
with
110 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters