summaryrefslogtreecommitdiffstats
path: root/tests/ui/mismatched_types/wrap-suggestion-privacy.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/mismatched_types/wrap-suggestion-privacy.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/mismatched_types/wrap-suggestion-privacy.stderr')
-rw-r--r--tests/ui/mismatched_types/wrap-suggestion-privacy.stderr59
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/ui/mismatched_types/wrap-suggestion-privacy.stderr b/tests/ui/mismatched_types/wrap-suggestion-privacy.stderr
new file mode 100644
index 000000000..fdd92cbfc
--- /dev/null
+++ b/tests/ui/mismatched_types/wrap-suggestion-privacy.stderr
@@ -0,0 +1,59 @@
+error[E0308]: mismatched types
+ --> $DIR/wrap-suggestion-privacy.rs:12:19
+ |
+LL | needs_wrapper(0);
+ | ------------- ^ expected struct `Wrapper`, found integer
+ | |
+ | arguments to this function are incorrect
+ |
+ = note: expected struct `Wrapper<i32>`
+ found type `{integer}`
+note: function defined here
+ --> $DIR/wrap-suggestion-privacy.rs:5:4
+ |
+LL | fn needs_wrapper(t: inner::Wrapper<i32>) {}
+ | ^^^^^^^^^^^^^ ----------------------
+help: try wrapping the expression in `inner::Wrapper` (its field is private, but it's local to this crate and its privacy can be changed)
+ |
+LL | needs_wrapper(inner::Wrapper(0));
+ | +++++++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/wrap-suggestion-privacy.rs:17:20
+ |
+LL | needs_wrapping(0);
+ | -------------- ^ expected struct `Wrapping`, found integer
+ | |
+ | arguments to this function are incorrect
+ |
+ = note: expected struct `Wrapping<i32>`
+ found type `{integer}`
+note: function defined here
+ --> $DIR/wrap-suggestion-privacy.rs:6:4
+ |
+LL | fn needs_wrapping(t: std::num::Wrapping<i32>) {}
+ | ^^^^^^^^^^^^^^ --------------------------
+help: try wrapping the expression in `std::num::Wrapping`
+ |
+LL | needs_wrapping(std::num::Wrapping(0));
+ | +++++++++++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/wrap-suggestion-privacy.rs:22:17
+ |
+LL | needs_ready(Some(0));
+ | ----------- ^^^^^^^ expected struct `Ready`, found enum `Option`
+ | |
+ | arguments to this function are incorrect
+ |
+ = note: expected struct `std::future::Ready<i32>`
+ found enum `Option<{integer}>`
+note: function defined here
+ --> $DIR/wrap-suggestion-privacy.rs:7:4
+ |
+LL | fn needs_ready(t: std::future::Ready<i32>) {}
+ | ^^^^^^^^^^^ --------------------------
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0308`.