summaryrefslogtreecommitdiffstats
path: root/tests/ui/ufcs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
commit018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch)
treea835ebdf2088ef88fa681f8fad45f09922c1ae9a /tests/ui/ufcs
parentAdding debian version 1.75.0+dfsg1-5. (diff)
downloadrustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz
rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/ufcs')
-rw-r--r--tests/ui/ufcs/ufcs-explicit-self-bad.rs8
-rw-r--r--tests/ui/ufcs/ufcs-explicit-self-bad.stderr20
-rw-r--r--tests/ui/ufcs/ufcs-polymorphic-paths.rs3
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;