summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/let-binding-init-expr-as-ty.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /tests/ui/suggestions/let-binding-init-expr-as-ty.stderr
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/suggestions/let-binding-init-expr-as-ty.stderr')
-rw-r--r--tests/ui/suggestions/let-binding-init-expr-as-ty.stderr34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/ui/suggestions/let-binding-init-expr-as-ty.stderr b/tests/ui/suggestions/let-binding-init-expr-as-ty.stderr
new file mode 100644
index 000000000..b90ae051f
--- /dev/null
+++ b/tests/ui/suggestions/let-binding-init-expr-as-ty.stderr
@@ -0,0 +1,34 @@
+error[E0573]: expected type, found local variable `num`
+ --> $DIR/let-binding-init-expr-as-ty.rs:2:27
+ |
+LL | let foo: i32::from_be(num);
+ | -- ^^^ not a type
+ | |
+ | help: use `=` if you meant to assign
+
+error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
+ --> $DIR/let-binding-init-expr-as-ty.rs:2:19
+ |
+LL | let foo: i32::from_be(num);
+ | ^^^^^^^^^^^^ only `Fn` traits may use parentheses
+ |
+help: use angle brackets instead
+ |
+LL | let foo: i32::from_be<num>;
+ | ~ ~
+
+error[E0223]: ambiguous associated type
+ --> $DIR/let-binding-init-expr-as-ty.rs:2:14
+ |
+LL | let foo: i32::from_be(num);
+ | ^^^^^^^^^^^^^^^^^
+ |
+help: if there were a trait named `Example` with associated type `from_be` implemented for `i32`, you could use the fully-qualified path
+ |
+LL | let foo: <i32 as Example>::from_be;
+ | ~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0214, E0223, E0573.
+For more information about an error, try `rustc --explain E0214`.