diff options
Diffstat (limited to 'tests/ui/ufcs')
-rw-r--r-- | tests/ui/ufcs/ufcs-explicit-self-bad.rs | 8 | ||||
-rw-r--r-- | tests/ui/ufcs/ufcs-explicit-self-bad.stderr | 20 | ||||
-rw-r--r-- | tests/ui/ufcs/ufcs-polymorphic-paths.rs | 3 |
3 files changed, 15 insertions, 16 deletions
diff --git a/tests/ui/ufcs/ufcs-explicit-self-bad.rs b/tests/ui/ufcs/ufcs-explicit-self-bad.rs index 9b0f99a18..3bb3d906d 100644 --- a/tests/ui/ufcs/ufcs-explicit-self-bad.rs +++ b/tests/ui/ufcs/ufcs-explicit-self-bad.rs @@ -39,12 +39,12 @@ impl<'a, T> SomeTrait for &'a Bar<T> { //~| ERROR has an incompatible type for trait fn dummy3(self: &&Bar<T>) {} //~^ ERROR mismatched `self` parameter type - //~| expected reference `&'a Bar<T>` - //~| found reference `&Bar<T>` + //~| expected reference `&'a Bar<_>` + //~| found reference `&Bar<_>` //~| lifetime mismatch //~| ERROR mismatched `self` parameter type - //~| expected reference `&'a Bar<T>` - //~| found reference `&Bar<T>` + //~| expected reference `&'a Bar<_>` + //~| found reference `&Bar<_>` //~| lifetime mismatch } diff --git a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr index 0efaa41d4..4c2cb0eb7 100644 --- a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr +++ b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr @@ -31,8 +31,8 @@ error[E0308]: mismatched `self` parameter type LL | fn dummy2(self: &Bar<T>) {} | ^^^^^^^ lifetime mismatch | - = note: expected reference `&'a Bar<T>` - found reference `&Bar<T>` + = note: expected reference `&'a Bar<_>` + found reference `&Bar<_>` note: the anonymous lifetime defined here... --> $DIR/ufcs-explicit-self-bad.rs:37:21 | @@ -50,8 +50,8 @@ error[E0308]: mismatched `self` parameter type LL | fn dummy2(self: &Bar<T>) {} | ^^^^^^^ lifetime mismatch | - = note: expected reference `&'a Bar<T>` - found reference `&Bar<T>` + = note: expected reference `&'a Bar<_>` + found reference `&Bar<_>` note: the lifetime `'a` as defined here... --> $DIR/ufcs-explicit-self-bad.rs:35:6 | @@ -69,8 +69,8 @@ error[E0308]: mismatched `self` parameter type LL | fn dummy3(self: &&Bar<T>) {} | ^^^^^^^^ lifetime mismatch | - = note: expected reference `&'a Bar<T>` - found reference `&Bar<T>` + = note: expected reference `&'a Bar<_>` + found reference `&Bar<_>` note: the anonymous lifetime defined here... --> $DIR/ufcs-explicit-self-bad.rs:40:22 | @@ -88,8 +88,8 @@ error[E0308]: mismatched `self` parameter type LL | fn dummy3(self: &&Bar<T>) {} | ^^^^^^^^ lifetime mismatch | - = note: expected reference `&'a Bar<T>` - found reference `&Bar<T>` + = note: expected reference `&'a Bar<_>` + found reference `&Bar<_>` note: the lifetime `'a` as defined here... --> $DIR/ufcs-explicit-self-bad.rs:35:6 | @@ -115,8 +115,8 @@ note: type in trait | LL | fn dummy2(&self); | ^^^^^ - = note: expected signature `fn(&&'a Bar<T>)` - found signature `fn(&Bar<T>)` + = note: expected signature `fn(&&'a Bar<_>)` + found signature `fn(&Bar<_>)` error: aborting due to 8 previous errors diff --git a/tests/ui/ufcs/ufcs-polymorphic-paths.rs b/tests/ui/ufcs/ufcs-polymorphic-paths.rs index a14ebd6a4..71b9de818 100644 --- a/tests/ui/ufcs/ufcs-polymorphic-paths.rs +++ b/tests/ui/ufcs/ufcs-polymorphic-paths.rs @@ -1,7 +1,6 @@ // run-pass -use std::borrow::{Cow, ToOwned}; -use std::default::Default; +use std::borrow::Cow; use std::iter::FromIterator; use std::ops::Add; use std::option::IntoIter as OptionIter; |