about summary refs log tree commit diff
path: root/src/test/ui/pattern
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-13 19:57:11 +0100
committerGitHub <noreply@github.com>2022-12-13 19:57:11 +0100
commit15b9e206409fe4a8d2307fe67e22372ecd4d22cc (patch)
treee908ebc87b63802c59677d4011f1e37a14bbb5ab /src/test/ui/pattern
parentdcdbbd0471af4445f3eed20dccd4f02a4ff5859b (diff)
parent82ce70af62a2fb709ee4c19a46e8092054459a50 (diff)
downloadrust-15b9e206409fe4a8d2307fe67e22372ecd4d22cc.tar.gz
rust-15b9e206409fe4a8d2307fe67e22372ecd4d22cc.zip
Rollup merge of #105500 - oli-obk:unhide_unknown_spans, r=estebank
Make some diagnostics not depend on the source of what they reference being available

r? `@estebank`

follow up to https://github.com/rust-lang/rust/pull/104449
Diffstat (limited to 'src/test/ui/pattern')
-rw-r--r--src/test/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr7
-rw-r--r--src/test/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr7
-rw-r--r--src/test/ui/pattern/usefulness/issue-35609.stderr3
-rw-r--r--src/test/ui/pattern/usefulness/issue-3601.stderr6
-rw-r--r--src/test/ui/pattern/usefulness/match-arm-statics-2.stderr12
-rw-r--r--src/test/ui/pattern/usefulness/match-privately-empty.stderr7
-rw-r--r--src/test/ui/pattern/usefulness/non-exhaustive-match.stderr7
7 files changed, 12 insertions, 37 deletions
diff --git a/src/test/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr b/src/test/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr
index f3dca9bcb07..2a016048f2f 100644
--- a/src/test/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr
+++ b/src/test/ui/pattern/suggest-adding-appropriate-missing-pattern-excluding-comments.stderr
@@ -6,12 +6,9 @@ LL |     match Some(1) {
    |
 note: `Option<i32>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
+  ::: $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | pub enum Option<T> {
-   | ------------------
-...
-LL |     None,
-   |     ^^^^ not covered
+   = note: not covered
    = note: the matched value is of type `Option<i32>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/src/test/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr b/src/test/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr
index b450a9aeddf..17e1a2304a1 100644
--- a/src/test/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr
+++ b/src/test/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr
@@ -66,12 +66,9 @@ LL |     match None {
    |
 note: `Option<HiddenEnum>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
+  ::: $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | pub enum Option<T> {
-   | ------------------
-...
-LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-   |     ^^^^ not covered
+   = note: not covered
    = note: the matched value is of type `Option<HiddenEnum>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
diff --git a/src/test/ui/pattern/usefulness/issue-35609.stderr b/src/test/ui/pattern/usefulness/issue-35609.stderr
index c9781d52e6d..12113957d63 100644
--- a/src/test/ui/pattern/usefulness/issue-35609.stderr
+++ b/src/test/ui/pattern/usefulness/issue-35609.stderr
@@ -107,9 +107,6 @@ LL |     match Some(A) {
    |
 note: `Option<Enum>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
-   |
-LL | pub enum Option<T> {
-   | ^^^^^^^^^^^^^^^^^^
    = note: the matched value is of type `Option<Enum>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
    |
diff --git a/src/test/ui/pattern/usefulness/issue-3601.stderr b/src/test/ui/pattern/usefulness/issue-3601.stderr
index eb8c63919b6..59d7bcd4b5e 100644
--- a/src/test/ui/pattern/usefulness/issue-3601.stderr
+++ b/src/test/ui/pattern/usefulness/issue-3601.stderr
@@ -6,12 +6,6 @@ LL |         box NodeKind::Element(ed) => match ed.kind {
    |
 note: `Box<ElementKind>` defined here
   --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
-   |
-LL | / pub struct Box<
-LL | |     T: ?Sized,
-LL | |     #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global,
-LL | | >(Unique<T>, A);
-   | |_^
    = note: the matched value is of type `Box<ElementKind>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr b/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr
index b0d7fe5eb68..e4dd35a5995 100644
--- a/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr
+++ b/src/test/ui/pattern/usefulness/match-arm-statics-2.stderr
@@ -19,15 +19,11 @@ LL |     match Some(Some(North)) {
    |
 note: `Option<Option<Direction>>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
+  ::: $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | pub enum Option<T> {
-   | ------------------
-...
-LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-   |     ^^^^
-   |     |
-   |     not covered
-   |     not covered
+   = note: not covered
+   |
+   = note: not covered
    = note: the matched value is of type `Option<Option<Direction>>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/src/test/ui/pattern/usefulness/match-privately-empty.stderr b/src/test/ui/pattern/usefulness/match-privately-empty.stderr
index 4607cfaae17..86f75d15cfd 100644
--- a/src/test/ui/pattern/usefulness/match-privately-empty.stderr
+++ b/src/test/ui/pattern/usefulness/match-privately-empty.stderr
@@ -6,12 +6,9 @@ LL |     match private::DATA {
    |
 note: `Option<Private>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
+  ::: $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | pub enum Option<T> {
-   | ------------------
-...
-LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-   |     ^^^^ not covered
+   = note: not covered
    = note: the matched value is of type `Option<Private>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr b/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr
index 4234600d0d0..e2260f50bfe 100644
--- a/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr
+++ b/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr
@@ -36,12 +36,9 @@ LL |     match Some(10) {
    |
 note: `Option<i32>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
+  ::: $SRC_DIR/core/src/option.rs:LL:COL
    |
-LL | pub enum Option<T> {
-   | ------------------
-...
-LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
-   |     ^^^^ not covered
+   = note: not covered
    = note: the matched value is of type `Option<i32>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |