1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 #![feature(managed_boxes)]
13 // Check that we correctly infer that b and c must be region
14 // parameterized because they reference a which requires a region.
24 fn set_f_ok(&self, b: @b<'a>);
25 fn set_f_bad(&self, b: @b);
28 impl<'a> set_f<'a> for c<'a> {
29 fn set_f_ok(&self, b: @b<'a>) {
33 fn set_f_bad(&self, b: @b) {
34 self.f = b; //~ ERROR mismatched types: expected `@@&'a int` but found `@@&int`
35 //~^ ERROR cannot infer