From 0f6d4228170af9287a76eb15245ec69253f7a687 Mon Sep 17 00:00:00 2001 From: Josh Mcguigan Date: Wed, 5 Sep 2018 05:59:07 -0700 Subject: [PATCH] Added test case for ptr_arg --- tests/ui/ptr_arg.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/ui/ptr_arg.rs b/tests/ui/ptr_arg.rs index e76221355ae..7cd3c9f9c72 100644 --- a/tests/ui/ptr_arg.rs +++ b/tests/ui/ptr_arg.rs @@ -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) {} }