Skip to content

Commit 0f6d422

Browse files
committed
Added test case for ptr_arg
1 parent ed38d9c commit 0f6d422

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/ui/ptr_arg.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,10 @@ fn test_cow_with_ref(c: &Cow<[i32]>) {
7777
fn test_cow(c: Cow<[i32]>) {
7878
let _c = c;
7979
}
80+
81+
trait Foo2 {
82+
fn do_string(&self);
83+
}
84+
85+
// no error for &self references where self is of type String (#2293)
86+
impl Foo2 for String { fn do_string(&self) {} }

0 commit comments

Comments
 (0)