summaryrefslogtreecommitdiffstats
path: root/src/test/ui/methods/issues/issue-61525.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/methods/issues/issue-61525.stderr
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/methods/issues/issue-61525.stderr')
-rw-r--r--src/test/ui/methods/issues/issue-61525.stderr39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/test/ui/methods/issues/issue-61525.stderr b/src/test/ui/methods/issues/issue-61525.stderr
new file mode 100644
index 000000000..aec968d7c
--- /dev/null
+++ b/src/test/ui/methods/issues/issue-61525.stderr
@@ -0,0 +1,39 @@
+error[E0277]: the size for values of type `dyn ToString` cannot be known at compilation time
+ --> $DIR/issue-61525.rs:14:33
+ |
+LL | 1.query::<dyn ToString>("")
+ | ----- ^^ doesn't have a size known at compile-time
+ | |
+ | required by a bound introduced by this call
+ |
+ = help: the trait `Sized` is not implemented for `dyn ToString`
+note: required by a bound in `Example::query`
+ --> $DIR/issue-61525.rs:2:14
+ |
+LL | fn query<Q>(self, q: Q);
+ | ^ required by this bound in `Example::query`
+help: consider relaxing the implicit `Sized` restriction
+ |
+LL | fn query<Q: ?Sized>(self, q: Q);
+ | ++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/issue-61525.rs:14:33
+ |
+LL | 1.query::<dyn ToString>("")
+ | --------------------- ^^ expected trait object `dyn ToString`, found `&str`
+ | |
+ | arguments to this function are incorrect
+ |
+ = note: expected trait object `dyn ToString`
+ found reference `&'static str`
+note: associated function defined here
+ --> $DIR/issue-61525.rs:2:8
+ |
+LL | fn query<Q>(self, q: Q);
+ | ^^^^^
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0277, E0308.
+For more information about an error, try `rustc --explain E0277`.