summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/issue-102989.stderr
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/traits/issue-102989.stderr
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/traits/issue-102989.stderr')
-rw-r--r--tests/ui/traits/issue-102989.stderr22
1 files changed, 18 insertions, 4 deletions
diff --git a/tests/ui/traits/issue-102989.stderr b/tests/ui/traits/issue-102989.stderr
index 7d0098fe8..40e49df2b 100644
--- a/tests/ui/traits/issue-102989.stderr
+++ b/tests/ui/traits/issue-102989.stderr
@@ -13,7 +13,7 @@ LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
| ^^^^^^ not found in this scope
error[E0425]: cannot find value `x` in this scope
- --> $DIR/issue-102989.rs:10:13
+ --> $DIR/issue-102989.rs:11:13
|
LL | let x = x << 1;
| ^ help: a local variable with a similar name exists: `f`
@@ -22,13 +22,27 @@ error[E0152]: found duplicate lang item `sized`
--> $DIR/issue-102989.rs:5:1
|
LL | trait Sized { }
- | ^^^^^^^^^^^
+ | ^^^^^^^^^^^^^^^
|
= note: the lang item is first defined in crate `core` (which `std` depends on)
= note: first definition in `core` loaded from SYSROOT/libcore-*.rlib
= note: second definition in the local crate (`issue_102989`)
-error: aborting due to 4 previous errors
+error[E0308]: mismatched types
+ --> $DIR/issue-102989.rs:7:42
+ |
+LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
+ | ---------- ^^^^ expected `&u32`, found `()`
+ | |
+ | implicitly returns `()` as its body has no tail or `return` expression
+ |
+help: consider returning the local binding `f`
+ |
+LL ~ let x = x << 1;
+LL + f
+ |
+
+error: aborting due to 5 previous errors
-Some errors have detailed explanations: E0152, E0412, E0425.
+Some errors have detailed explanations: E0152, E0308, E0412, E0425.
For more information about an error, try `rustc --explain E0152`.