summaryrefslogtreecommitdiffstats
path: root/src/test/ui/structs/struct-path-self-type-mismatch.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/structs/struct-path-self-type-mismatch.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/structs/struct-path-self-type-mismatch.stderr')
-rw-r--r--src/test/ui/structs/struct-path-self-type-mismatch.stderr46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/test/ui/structs/struct-path-self-type-mismatch.stderr b/src/test/ui/structs/struct-path-self-type-mismatch.stderr
new file mode 100644
index 000000000..b55a2cbf7
--- /dev/null
+++ b/src/test/ui/structs/struct-path-self-type-mismatch.stderr
@@ -0,0 +1,46 @@
+error[E0308]: mismatched types
+ --> $DIR/struct-path-self-type-mismatch.rs:7:23
+ |
+LL | Self { inner: 1.5f32 };
+ | ^^^^^^ expected `i32`, found `f32`
+
+error[E0308]: mismatched types
+ --> $DIR/struct-path-self-type-mismatch.rs:15:20
+ |
+LL | impl<T> Foo<T> {
+ | - expected type parameter
+LL | fn new<U>(u: U) -> Foo<U> {
+ | - found type parameter
+...
+LL | inner: u
+ | ^ expected type parameter `T`, found type parameter `U`
+ |
+ = note: expected type parameter `T`
+ found type parameter `U`
+ = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
+ = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
+
+error[E0308]: mismatched types
+ --> $DIR/struct-path-self-type-mismatch.rs:13:9
+ |
+LL | impl<T> Foo<T> {
+ | - found type parameter
+LL | fn new<U>(u: U) -> Foo<U> {
+ | - ------ expected `Foo<U>` because of return type
+ | |
+ | expected type parameter
+LL | / Self {
+LL | |
+LL | | inner: u
+LL | |
+LL | | }
+ | |_________^ expected type parameter `U`, found type parameter `T`
+ |
+ = note: expected struct `Foo<U>`
+ found struct `Foo<T>`
+ = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
+ = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0308`.