diff options
| author | Lukas Markeffsky <@> | 2023-06-10 19:13:42 +0200 |
|---|---|---|
| committer | Lukas Markeffsky <@> | 2023-08-01 16:51:20 +0000 |
| commit | 3694fd08e6e9d0828369ac1c9ee205cd0de71287 (patch) | |
| tree | 817a5572422ff096a5f8aead6243304d4889e1e3 /tests | |
| parent | 10ef96f6a5e71746968417892feeddd0a099774d (diff) | |
| download | rust-3694fd08e6e9d0828369ac1c9ee205cd0de71287.tar.gz rust-3694fd08e6e9d0828369ac1c9ee205cd0de71287.zip | |
introduce `Span::find_ancestor_inside_same_ctxt`
and use it for function argument diagnostics
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/argument-suggestions/extra_arguments.stderr | 10 | ||||
| -rw-r--r-- | tests/ui/issues/issue-48364.stderr | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/tests/ui/argument-suggestions/extra_arguments.stderr b/tests/ui/argument-suggestions/extra_arguments.stderr index a32101e2518..1016c7ba438 100644 --- a/tests/ui/argument-suggestions/extra_arguments.stderr +++ b/tests/ui/argument-suggestions/extra_arguments.stderr @@ -321,7 +321,10 @@ error[E0061]: this function takes 1 argument but 2 arguments were supplied --> $DIR/extra_arguments.rs:53:3 | LL | one_arg(1, panic!()); - | ^^^^^^^ -------- unexpected argument + | ^^^^^^^ ---------- + | | | + | | unexpected argument + | help: remove the extra argument | note: function defined here --> $DIR/extra_arguments.rs:2:4 @@ -333,8 +336,9 @@ error[E0061]: this function takes 1 argument but 2 arguments were supplied --> $DIR/extra_arguments.rs:54:3 | LL | one_arg(panic!(), 1); - | ^^^^^^^ - - unexpected argument of type `{integer}` - | | + | ^^^^^^^ --- + | | | + | | unexpected argument of type `{integer}` | help: remove the extra argument | note: function defined here diff --git a/tests/ui/issues/issue-48364.stderr b/tests/ui/issues/issue-48364.stderr index cac4af6a7f3..3f2e1b83ad5 100644 --- a/tests/ui/issues/issue-48364.stderr +++ b/tests/ui/issues/issue-48364.stderr @@ -10,7 +10,6 @@ LL | b"".starts_with(stringify!(foo)) found reference `&'static str` note: method defined here --> $SRC_DIR/core/src/slice/mod.rs:LL:COL - = note: this error originates in the macro `stringify` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error |
