summaryrefslogtreecommitdiffstats
path: root/tests/ui/generics/issue-106694.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/generics/issue-106694.stderr
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/generics/issue-106694.stderr')
-rw-r--r--tests/ui/generics/issue-106694.stderr93
1 files changed, 93 insertions, 0 deletions
diff --git a/tests/ui/generics/issue-106694.stderr b/tests/ui/generics/issue-106694.stderr
new file mode 100644
index 000000000..235b8982a
--- /dev/null
+++ b/tests/ui/generics/issue-106694.stderr
@@ -0,0 +1,93 @@
+error: expected a trait, found type
+ --> $DIR/issue-106694.rs:3:16
+ |
+LL | fn foo(_: impl &Trait) {}
+ | ^^^^^^
+ |
+help: consider removing the indirection
+ |
+LL - fn foo(_: impl &Trait) {}
+LL + fn foo(_: impl Trait) {}
+ |
+
+error: expected a trait, found type
+ --> $DIR/issue-106694.rs:6:11
+ |
+LL | fn bar<T: &Trait>(_: T) {}
+ | ^^^^^^
+ |
+help: consider removing the indirection
+ |
+LL - fn bar<T: &Trait>(_: T) {}
+LL + fn bar<T: Trait>(_: T) {}
+ |
+
+error: expected a trait, found type
+ --> $DIR/issue-106694.rs:9:35
+ |
+LL | fn partially_correct_impl(_: impl &*const &Trait + Copy) {}
+ | ^^^^^^^^^^^^^^
+ |
+help: consider removing the indirection
+ |
+LL - fn partially_correct_impl(_: impl &*const &Trait + Copy) {}
+LL + fn partially_correct_impl(_: impl Trait + Copy) {}
+ |
+
+error: expected a trait, found type
+ --> $DIR/issue-106694.rs:12:20
+ |
+LL | fn foo_bad(_: impl &BadTrait) {}
+ | ^^^^^^^^^
+ |
+help: consider removing the indirection
+ |
+LL - fn foo_bad(_: impl &BadTrait) {}
+LL + fn foo_bad(_: impl BadTrait) {}
+ |
+
+error: expected a trait, found type
+ --> $DIR/issue-106694.rs:16:15
+ |
+LL | fn bar_bad<T: &BadTrait>(_: T) {}
+ | ^^^^^^^^^
+ |
+help: consider removing the indirection
+ |
+LL - fn bar_bad<T: &BadTrait>(_: T) {}
+LL + fn bar_bad<T: BadTrait>(_: T) {}
+ |
+
+error: expected a trait, found type
+ --> $DIR/issue-106694.rs:20:39
+ |
+LL | fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
+ | ^^^^^^^^^^^^^^^^^
+ |
+help: consider removing the indirection
+ |
+LL - fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
+LL + fn partially_correct_impl_bad(_: impl BadTrait + Copy) {}
+ |
+
+error[E0405]: cannot find trait `BadTrait` in this scope
+ --> $DIR/issue-106694.rs:12:21
+ |
+LL | fn foo_bad(_: impl &BadTrait) {}
+ | ^^^^^^^^ not found in this scope
+
+error[E0405]: cannot find trait `BadTrait` in this scope
+ --> $DIR/issue-106694.rs:16:16
+ |
+LL | fn bar_bad<T: &BadTrait>(_: T) {}
+ | ^^^^^^^^ not found in this scope
+
+error[E0405]: cannot find trait `BadTrait` in this scope
+ --> $DIR/issue-106694.rs:20:48
+ |
+LL | fn partially_correct_impl_bad(_: impl &*const &BadTrait + Copy) {}
+ | ^^^^^^^^ not found in this scope
+
+error: aborting due to 9 previous errors
+
+For more information about this error, try `rustc --explain E0405`.