1 // Copyright 2014 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.
14 fn bah(_: Option<&Self>) { }
27 impl Foo for *const BarTy {
30 //~^ ERROR: unresolved name `baz`. Did you mean to call `self.baz`?
32 //~^ ERROR: unresolved name `a`
36 impl<'a> Foo for &'a BarTy {
39 //~^ ERROR: unresolved name `baz`. Did you mean to call `self.baz`?
41 //~^ ERROR: unresolved name `x`. Did you mean `self.x`?
43 //~^ ERROR: unresolved name `y`. Did you mean `self.y`?
45 //~^ ERROR: unresolved name `a`
47 //~^ ERROR: unresolved name `bah`. Did you mean to call `Foo::bah`?
49 //~^ ERROR: unresolved name `b`
53 impl<'a> Foo for &'a mut BarTy {
56 //~^ ERROR: unresolved name `baz`. Did you mean to call `self.baz`?
58 //~^ ERROR: unresolved name `x`. Did you mean `self.x`?
60 //~^ ERROR: unresolved name `y`. Did you mean `self.y`?
62 //~^ ERROR: unresolved name `a`
64 //~^ ERROR: unresolved name `bah`. Did you mean to call `Foo::bah`?
66 //~^ ERROR: unresolved name `b`
70 impl Foo for Box<BarTy> {
73 //~^ ERROR: unresolved name `baz`. Did you mean to call `self.baz`?
75 //~^ ERROR: unresolved name `bah`. Did you mean to call `Foo::bah`?
79 impl Foo for *const isize {
82 //~^ ERROR: unresolved name `baz`. Did you mean to call `self.baz`?
84 //~^ ERROR: unresolved name `bah`. Did you mean to call `Foo::bah`?
88 impl<'a> Foo for &'a isize {
91 //~^ ERROR: unresolved name `baz`. Did you mean to call `self.baz`?
93 //~^ ERROR: unresolved name `bah`. Did you mean to call `Foo::bah`?
97 impl<'a> Foo for &'a mut isize {
100 //~^ ERROR: unresolved name `baz`. Did you mean to call `self.baz`?
102 //~^ ERROR: unresolved name `bah`. Did you mean to call `Foo::bah`?
106 impl Foo for Box<isize> {
109 //~^ ERROR: unresolved name `baz`. Did you mean to call `self.baz`?
111 //~^ ERROR: unresolved name `bah`. Did you mean to call `Foo::bah`?