diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-07-24 13:52:47 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-07-25 00:50:35 -0700 |
| commit | f1520ea0cfa2a96731475cea221cd9ab70cf5588 (patch) | |
| tree | d3056ffda31a5b3292b884fb454b6ab0e599d0d8 /src/rustllvm/RustWrapper.cpp | |
| parent | b9035c26e2c4368b39c8daa979f669d10d484825 (diff) | |
| download | rust-f1520ea0cfa2a96731475cea221cd9ab70cf5588.tar.gz rust-f1520ea0cfa2a96731475cea221cd9ab70cf5588.zip | |
librustc: Check built-in trait bounds on implementations when direct
method calls are involved.
This breaks code like:
impl<T:Copy> Foo for T { ... }
fn take_param<T:Foo>(foo: &T) { ... }
fn main() {
let x = box 3i; // note no `Copy` bound
take_param(&x);
}
Change this code to not contain a type error. For example:
impl<T:Copy> Foo for T { ... }
fn take_param<T:Foo>(foo: &T) { ... }
fn main() {
let x = 3i; // satisfies `Copy` bound
take_param(&x);
}
Closes #15860.
[breaking-change]
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
