summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type/type-ascription-precedence.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/type/type-ascription-precedence.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/type/type-ascription-precedence.stderr')
-rw-r--r--src/test/ui/type/type-ascription-precedence.stderr66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/test/ui/type/type-ascription-precedence.stderr b/src/test/ui/type/type-ascription-precedence.stderr
new file mode 100644
index 000000000..a8139063d
--- /dev/null
+++ b/src/test/ui/type/type-ascription-precedence.stderr
@@ -0,0 +1,66 @@
+error[E0308]: mismatched types
+ --> $DIR/type-ascription-precedence.rs:31:7
+ |
+LL | &(S: &S);
+ | ^ expected `&S`, found struct `S`
+
+error[E0308]: mismatched types
+ --> $DIR/type-ascription-precedence.rs:35:7
+ |
+LL | *(S: Z);
+ | ^ expected struct `Z`, found struct `S`
+
+error[E0614]: type `Z` cannot be dereferenced
+ --> $DIR/type-ascription-precedence.rs:35:5
+ |
+LL | *(S: Z);
+ | ^^^^^^^
+
+error[E0308]: mismatched types
+ --> $DIR/type-ascription-precedence.rs:40:7
+ |
+LL | -(S: Z);
+ | ^ expected struct `Z`, found struct `S`
+
+error[E0600]: cannot apply unary operator `-` to type `Z`
+ --> $DIR/type-ascription-precedence.rs:40:5
+ |
+LL | -(S: Z);
+ | ^^^^^^^ cannot apply unary operator `-`
+ |
+note: an implementation of `std::ops::Neg` might be missing for `Z`
+ --> $DIR/type-ascription-precedence.rs:9:1
+ |
+LL | struct Z;
+ | ^^^^^^^^ must implement `std::ops::Neg`
+note: the following trait must be implemented
+ --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
+ |
+LL | pub trait Neg {
+ | ^^^^^^^^^^^^^
+
+error[E0308]: mismatched types
+ --> $DIR/type-ascription-precedence.rs:45:5
+ |
+LL | (S + Z): Z;
+ | ^^^^^^^ expected struct `Z`, found struct `S`
+
+error[E0308]: mismatched types
+ --> $DIR/type-ascription-precedence.rs:49:5
+ |
+LL | (S * Z): Z;
+ | ^^^^^^^ expected struct `Z`, found struct `S`
+
+error[E0308]: mismatched types
+ --> $DIR/type-ascription-precedence.rs:53:5
+ |
+LL | (S .. S): S;
+ | ^^^^^^^^ expected struct `S`, found struct `std::ops::Range`
+ |
+ = note: expected struct `S`
+ found struct `std::ops::Range<S>`
+
+error: aborting due to 8 previous errors
+
+Some errors have detailed explanations: E0308, E0600, E0614.
+For more information about an error, try `rustc --explain E0308`.