summaryrefslogtreecommitdiffstats
path: root/tests/ui/methods/method-deref-to-same-trait-object-with-separate-params.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/methods/method-deref-to-same-trait-object-with-separate-params.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/methods/method-deref-to-same-trait-object-with-separate-params.stderr')
-rw-r--r--tests/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr87
1 files changed, 87 insertions, 0 deletions
diff --git a/tests/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr b/tests/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
new file mode 100644
index 000000000..82addab94
--- /dev/null
+++ b/tests/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
@@ -0,0 +1,87 @@
+warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:2:12
+ |
+LL | #![feature(unsized_locals, unsized_fn_params)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
+ = note: `#[warn(incomplete_features)]` on by default
+
+error[E0308]: mismatched types
+ --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:87:24
+ |
+LL | let _seetype: () = z;
+ | -- ^ expected `()`, found `u32`
+ | |
+ | expected due to this
+
+error[E0308]: mismatched types
+ --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:104:24
+ |
+LL | let _seetype: () = z;
+ | -- ^ expected `()`, found `u64`
+ | |
+ | expected due to this
+
+error[E0034]: multiple applicable items in scope
+ --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:122:15
+ |
+LL | let z = x.foo();
+ | ^^^ multiple `foo` found
+ |
+note: candidate #1 is defined in an impl of the trait `X` for the type `T`
+ --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:45:9
+ |
+LL | fn foo(self: Smaht<Self, u64>) -> u64 {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: candidate #2 is defined in an impl of the trait `NuisanceFoo` for the type `T`
+ --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:72:9
+ |
+LL | fn foo(self) {}
+ | ^^^^^^^^^^^^
+note: candidate #3 is defined in the trait `FinalFoo`
+ --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:59:5
+ |
+LL | fn foo(&self) -> u8;
+ | ^^^^^^^^^^^^^^^^^^^^
+help: disambiguate the associated function for candidate #1
+ |
+LL | let z = X::foo(x);
+ | ~~~~~~~~~
+help: disambiguate the associated function for candidate #2
+ |
+LL | let z = NuisanceFoo::foo(x);
+ | ~~~~~~~~~~~~~~~~~~~
+help: disambiguate the associated function for candidate #3
+ |
+LL | let z = FinalFoo::foo(x);
+ | ~~~~~~~~~~~~~~~~
+
+error[E0308]: mismatched types
+ --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:139:24
+ |
+LL | let _seetype: () = z;
+ | -- ^ expected `()`, found `u8`
+ | |
+ | expected due to this
+
+error[E0308]: mismatched types
+ --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:157:24
+ |
+LL | let _seetype: () = z;
+ | -- ^ expected `()`, found `u32`
+ | |
+ | expected due to this
+
+error[E0308]: mismatched types
+ --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:174:24
+ |
+LL | let _seetype: () = z;
+ | -- ^ expected `()`, found `u32`
+ | |
+ | expected due to this
+
+error: aborting due to 6 previous errors; 1 warning emitted
+
+Some errors have detailed explanations: E0034, E0308.
+For more information about an error, try `rustc --explain E0034`.