Added test case for ptr_arg

This commit is contained in:
Josh Mcguigan 2018-09-05 05:59:07 -07:00
parent ed38d9c79f
commit 0f6d422817

View file

@ -77,3 +77,10 @@ fn test_cow_with_ref(c: &Cow<[i32]>) {
fn test_cow(c: Cow<[i32]>) { fn test_cow(c: Cow<[i32]>) {
let _c = c; let _c = c;
} }
trait Foo2 {
fn do_string(&self);
}
// no error for &self references where self is of type String (#2293)
impl Foo2 for String { fn do_string(&self) {} }