about summary refs log tree commit diff
path: root/src/test/ui/array-slice-vec
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2022-07-01 23:39:09 +0200
committerGitHub <noreply@github.com>2022-07-01 23:39:09 +0200
commitb0935b1ddf12f96546df32d805b7dd874459f4cb (patch)
treea65d54f984425280be478034cc92d7a53e75dc60 /src/test/ui/array-slice-vec
parentbda659e873f25d8891c02c5a6fb7d07ecf1efe5f (diff)
parent6711313f76b712271b10080067ebd4e0034b6be8 (diff)
downloadrust-b0935b1ddf12f96546df32d805b7dd874459f4cb.tar.gz
rust-b0935b1ddf12f96546df32d805b7dd874459f4cb.zip
Rollup merge of #98497 - compiler-errors:span-inference-note, r=lcnr
Improve some inference diagnostics

- Properly point out point location where "type must be known at this point", or else omit the note if it's not associated with a useful span.
- Fix up some type ambiguity diagnostics, errors shouldn't say "cannot infer type for reference `&'a ()`" when the given type has no inference variables.
Diffstat (limited to 'src/test/ui/array-slice-vec')
-rw-r--r--src/test/ui/array-slice-vec/infer_array_len.stderr1
-rw-r--r--src/test/ui/array-slice-vec/slice-pat-type-mismatches.stderr2
2 files changed, 0 insertions, 3 deletions
diff --git a/src/test/ui/array-slice-vec/infer_array_len.stderr b/src/test/ui/array-slice-vec/infer_array_len.stderr
index 8da6d97251b..919550cac30 100644
--- a/src/test/ui/array-slice-vec/infer_array_len.stderr
+++ b/src/test/ui/array-slice-vec/infer_array_len.stderr
@@ -4,7 +4,6 @@ error[E0282]: type annotations needed
 LL |     let [_, _] = a.into();
    |         ^^^^^^
    |
-   = note: type must be known at this point
 help: consider giving this pattern a type
    |
 LL |     let [_, _]: _ = a.into();
diff --git a/src/test/ui/array-slice-vec/slice-pat-type-mismatches.stderr b/src/test/ui/array-slice-vec/slice-pat-type-mismatches.stderr
index 20a5b99845b..70a4cbebeee 100644
--- a/src/test/ui/array-slice-vec/slice-pat-type-mismatches.stderr
+++ b/src/test/ui/array-slice-vec/slice-pat-type-mismatches.stderr
@@ -27,8 +27,6 @@ error[E0282]: type annotations needed
    |
 LL |         [] => {}
    |         ^^ cannot infer type
-   |
-   = note: type must be known at this point
 
 error: aborting due to 5 previous errors