Merge pull request #3131 from JoshMcguigan/ptr_arg-2293

Fix #2293 - ptr_arg
This commit is contained in:
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer 2018-09-05 16:22:03 +02:00 committed by GitHub
commit ebb88a4208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -77,3 +77,10 @@ fn test_cow_with_ref(c: &Cow<[i32]>) {
fn test_cow(c: Cow<[i32]>) {
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) {} }