about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-01-05 06:17:42 -0500
committerNiko Matsakis <niko@alum.mit.edu>2015-01-06 17:17:48 -0500
commit2375a79152b8a6554c3e97a3f127fedd75f7495f (patch)
tree5e69902cf0c81942c2e79d6dba326650680b689f /src/rustllvm/RustWrapper.cpp
parent3ed7f067dc0319cd9e7bb6a8253ba031d0bdf1f3 (diff)
downloadrust-2375a79152b8a6554c3e97a3f127fedd75f7495f.tar.gz
rust-2375a79152b8a6554c3e97a3f127fedd75f7495f.zip
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.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions