summaryrefslogtreecommitdiffstats
path: root/tests/ui/polymorphization
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
commit837b550238aa671a591ccf282dddeab29cadb206 (patch)
tree914b6b8862bace72bd3245ca184d374b08d8a672 /tests/ui/polymorphization
parentAdding debian version 1.70.0+dfsg2-1. (diff)
downloadrustc-837b550238aa671a591ccf282dddeab29cadb206.tar.xz
rustc-837b550238aa671a591ccf282dddeab29cadb206.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/polymorphization')
-rw-r--r--tests/ui/polymorphization/generators.stderr12
-rw-r--r--tests/ui/polymorphization/predicates.stderr18
-rw-r--r--tests/ui/polymorphization/type_parameters/closures.stderr30
3 files changed, 21 insertions, 39 deletions
diff --git a/tests/ui/polymorphization/generators.stderr b/tests/ui/polymorphization/generators.stderr
index 84888f6fb..32d49d25f 100644
--- a/tests/ui/polymorphization/generators.stderr
+++ b/tests/ui/polymorphization/generators.stderr
@@ -15,12 +15,6 @@ LL | pub fn unused_type<T>() -> impl Generator<(), Yield = u32, Return = u32> +
LL | || {
| ^^
-note: the above error was encountered while instantiating `fn finish::<[generator@$DIR/generators.rs:35:5: 35:7], u32, u32>`
- --> $DIR/generators.rs:86:5
- |
-LL | finish(unused_type::<u32>());
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
error: item has unused generic parameters
--> $DIR/generators.rs:60:5
|
@@ -29,11 +23,5 @@ LL | pub fn unused_const<const T: u32>() -> impl Generator<(), Yield = u32, Retu
LL | || {
| ^^
-note: the above error was encountered while instantiating `fn finish::<[generator@$DIR/generators.rs:60:5: 60:7], u32, u32>`
- --> $DIR/generators.rs:89:5
- |
-LL | finish(unused_const::<1u32>());
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
error: aborting due to 2 previous errors; 1 warning emitted
diff --git a/tests/ui/polymorphization/predicates.stderr b/tests/ui/polymorphization/predicates.stderr
index 80bb2af25..a3b2f75b1 100644
--- a/tests/ui/polymorphization/predicates.stderr
+++ b/tests/ui/polymorphization/predicates.stderr
@@ -1,4 +1,10 @@
error: item has unused generic parameters
+ --> $DIR/predicates.rs:10:4
+ |
+LL | fn bar<I>() {
+ | ^^^ - generic parameter `I` is unused
+
+error: item has unused generic parameters
--> $DIR/predicates.rs:15:4
|
LL | fn foo<I, T>(_: I)
@@ -35,17 +41,5 @@ error: item has unused generic parameters
LL | fn foobar<F, G>() -> usize
| ^^^^^^ - generic parameter `F` is unused
-error: item has unused generic parameters
- --> $DIR/predicates.rs:10:4
- |
-LL | fn bar<I>() {
- | ^^^ - generic parameter `I` is unused
-
-note: the above error was encountered while instantiating `fn foo::<std::slice::Iter<'_, u32>, T>`
- --> $DIR/predicates.rs:86:5
- |
-LL | foo(x.iter());
- | ^^^^^^^^^^^^^
-
error: aborting due to 6 previous errors
diff --git a/tests/ui/polymorphization/type_parameters/closures.stderr b/tests/ui/polymorphization/type_parameters/closures.stderr
index 94a4a08bd..5c3b46c60 100644
--- a/tests/ui/polymorphization/type_parameters/closures.stderr
+++ b/tests/ui/polymorphization/type_parameters/closures.stderr
@@ -44,21 +44,6 @@ LL | pub fn unused_all<G: Default>() -> u32 {
| ^^^^^^^^^^ - generic parameter `G` is unused
error: item has unused generic parameters
- --> $DIR/closures.rs:128:23
- |
-LL | pub fn used_impl<G: Default>() -> u32 {
- | - generic parameter `G` is unused
-LL |
-LL | let add_one = |x: u32| {
- | ^^^^^^^^
-
-error: item has unused generic parameters
- --> $DIR/closures.rs:126:12
- |
-LL | pub fn used_impl<G: Default>() -> u32 {
- | ^^^^^^^^^ - generic parameter `G` is unused
-
-error: item has unused generic parameters
--> $DIR/closures.rs:115:23
|
LL | impl<F: Default> Foo<F> {
@@ -76,5 +61,20 @@ LL | impl<F: Default> Foo<F> {
LL | pub fn used_fn<G: Default>() -> u32 {
| ^^^^^^^
+error: item has unused generic parameters
+ --> $DIR/closures.rs:128:23
+ |
+LL | pub fn used_impl<G: Default>() -> u32 {
+ | - generic parameter `G` is unused
+LL |
+LL | let add_one = |x: u32| {
+ | ^^^^^^^^
+
+error: item has unused generic parameters
+ --> $DIR/closures.rs:126:12
+ |
+LL | pub fn used_impl<G: Default>() -> u32 {
+ | ^^^^^^^^^ - generic parameter `G` is unused
+
error: aborting due to 9 previous errors