about summary refs log tree commit diff
path: root/tests/ui/suggestions/args-instead-of-tuple-errors.stderr
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-11 11:17:22 +0000
committerbors <bors@rust-lang.org>2023-01-11 11:17:22 +0000
commitb22c152958eade17a71d899b29a2d39bcc77aa48 (patch)
treeec6da75dc598a0a4086c0cc032c86d7241be1bc1 /tests/ui/suggestions/args-instead-of-tuple-errors.stderr
parent8ecaad85f61375b18e1667b51a3ef350121d2ca0 (diff)
parent40ba0e84d53f605ccf01836e9c2d27892728ae81 (diff)
downloadrust-b22c152958eade17a71d899b29a2d39bcc77aa48.tar.gz
rust-b22c152958eade17a71d899b29a2d39bcc77aa48.zip
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
Move src/test to the root

See MCP at rust-lang/compiler-team#573

There may be more changes needed.

The first commit is just the move of the files:
You can check that the first commit did not do anything else than renames by running
```
git diff --diff-filter=r -M100% <rust-lang remote>/master <first commit hash>
```
The output should be empty, because the filter excludes renames, and the match threshold for qualifying a rename is 100%.

The second one is mostly a "find and replace" of `src/test` to `tests` and whatever is needed to make CI pass.

What is left to do:
---

- [x] Move directory
- [ ] Change references to `src/test`
    - [x] Change references in-tree
    - [ ] Change references in submodules / out-of-tree docs
- [x] Make CI pass:
    - [x] Fix tidy
    - [x] Fix tests
    - [x] Bless tests if needed (shouldn't normally)
- [ ] Merge it !
Diffstat (limited to 'tests/ui/suggestions/args-instead-of-tuple-errors.stderr')
-rw-r--r--tests/ui/suggestions/args-instead-of-tuple-errors.stderr86
1 files changed, 86 insertions, 0 deletions
diff --git a/tests/ui/suggestions/args-instead-of-tuple-errors.stderr b/tests/ui/suggestions/args-instead-of-tuple-errors.stderr
new file mode 100644
index 00000000000..44a39efdf25
--- /dev/null
+++ b/tests/ui/suggestions/args-instead-of-tuple-errors.stderr
@@ -0,0 +1,86 @@
+error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied
+  --> $DIR/args-instead-of-tuple-errors.rs:6:34
+   |
+LL |     let _: Option<(i32, bool)> = Some(1, 2);
+   |                                  ^^^^    - argument of type `{integer}` unexpected
+   |
+note: expected tuple, found integer
+  --> $DIR/args-instead-of-tuple-errors.rs:6:39
+   |
+LL |     let _: Option<(i32, bool)> = Some(1, 2);
+   |                                       ^
+   = note: expected tuple `(i32, bool)`
+               found type `{integer}`
+note: tuple variant defined here
+  --> $SRC_DIR/core/src/option.rs:LL:COL
+help: remove the extra argument
+   |
+LL |     let _: Option<(i32, bool)> = Some(/* (i32, bool) */);
+   |                                      ~~~~~~~~~~~~~~~~~~~
+
+error[E0061]: this function takes 1 argument but 2 arguments were supplied
+  --> $DIR/args-instead-of-tuple-errors.rs:8:5
+   |
+LL |     int_bool(1, 2);
+   |     ^^^^^^^^    - argument of type `{integer}` unexpected
+   |
+note: expected tuple, found integer
+  --> $DIR/args-instead-of-tuple-errors.rs:8:14
+   |
+LL |     int_bool(1, 2);
+   |              ^
+   = note: expected tuple `(i32, bool)`
+               found type `{integer}`
+note: function defined here
+  --> $DIR/args-instead-of-tuple-errors.rs:21:4
+   |
+LL | fn int_bool(_: (i32, bool)) {
+   |    ^^^^^^^^ --------------
+help: remove the extra argument
+   |
+LL |     int_bool(/* (i32, bool) */);
+   |             ~~~~~~~~~~~~~~~~~~~
+
+error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied
+  --> $DIR/args-instead-of-tuple-errors.rs:11:28
+   |
+LL |     let _: Option<(i8,)> = Some();
+   |                            ^^^^-- an argument of type `(i8,)` is missing
+   |
+note: tuple variant defined here
+  --> $SRC_DIR/core/src/option.rs:LL:COL
+help: provide the argument
+   |
+LL |     let _: Option<(i8,)> = Some(/* (i8,) */);
+   |                                ~~~~~~~~~~~~~
+
+error[E0308]: mismatched types
+  --> $DIR/args-instead-of-tuple-errors.rs:14:34
+   |
+LL |     let _: Option<(i32,)> = Some(5_usize);
+   |                             ---- ^^^^^^^ expected tuple, found `usize`
+   |                             |
+   |                             arguments to this enum variant are incorrect
+   |
+   = note: expected tuple `(i32,)`
+               found type `usize`
+note: tuple variant defined here
+  --> $SRC_DIR/core/src/option.rs:LL:COL
+
+error[E0308]: mismatched types
+  --> $DIR/args-instead-of-tuple-errors.rs:17:34
+   |
+LL |     let _: Option<(i32,)> = Some((5_usize));
+   |                             ---- ^^^^^^^^^ expected tuple, found `usize`
+   |                             |
+   |                             arguments to this enum variant are incorrect
+   |
+   = note: expected tuple `(i32,)`
+               found type `usize`
+note: tuple variant defined here
+  --> $SRC_DIR/core/src/option.rs:LL:COL
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0061, E0308.
+For more information about an error, try `rustc --explain E0061`.