about summary refs log tree commit diff
path: root/tests/ui/error-codes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-12 10:46:19 +0000
committerbors <bors@rust-lang.org>2023-01-12 10:46:19 +0000
commit606c3907251397a42e23d3e60de31be9d32525d5 (patch)
treed04af6e38cfba4aac7f02930873467da917f6c31 /tests/ui/error-codes
parent2b8590ef3bd1221830ec8a4131ea9d02b1636746 (diff)
parent9ec36f56684cbd0fa90ab2da3c5084811f7a3989 (diff)
downloadrust-606c3907251397a42e23d3e60de31be9d32525d5.tar.gz
rust-606c3907251397a42e23d3e60de31be9d32525d5.zip
Auto merge of #106760 - compiler-errors:rollup-0bogyco, r=compiler-errors
Rollup of 8 pull requests

Successful merges:

 - #103236 (doc: rewrite doc for signed int::{carrying_add,borrowing_sub})
 - #103800 (Stabilize `::{core,std}::pin::pin!`)
 - #106097 (Migrate mir_build diagnostics 2 of 3)
 - #106170 (Move autoderef to `rustc_hir_analysis`)
 - #106323 (Stabilize f16c_target_feature)
 - #106360 (Tweak E0277 `&`-removal suggestions)
 - #106524 (Label `struct/enum constructor` instead of `fn item`, mention that it should be called on type mismatch)
 - #106739 (Remove `<dyn AstConv<'tcx>>::fun(c, ...)` calls in favour of `c.astconv().fun(...)`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/error-codes')
-rw-r--r--tests/ui/error-codes/E0005.stderr13
-rw-r--r--tests/ui/error-codes/E0297.stderr7
2 files changed, 3 insertions, 17 deletions
diff --git a/tests/ui/error-codes/E0005.stderr b/tests/ui/error-codes/E0005.stderr
index 0f179259356..4692b66413d 100644
--- a/tests/ui/error-codes/E0005.stderr
+++ b/tests/ui/error-codes/E0005.stderr
@@ -1,4 +1,4 @@
-error[E0005]: refutable pattern in local binding: `None` not covered
+error[E0005]: refutable pattern in local binding
   --> $DIR/E0005.rs:3:9
    |
 LL |     let Some(y) = x;
@@ -6,17 +6,8 @@ LL |     let Some(y) = x;
    |
    = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
    = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
-note: `Option<i32>` defined here
-  --> $SRC_DIR/core/src/option.rs:LL:COL
-  ::: $SRC_DIR/core/src/option.rs:LL:COL
-   |
-   = note: not covered
    = note: the matched value is of type `Option<i32>`
-help: you might want to use `if let` to ignore the variant that isn't matched
-   |
-LL |     let y = if let Some(y) = x { y } else { todo!() };
-   |     ++++++++++                 ++++++++++++++++++++++
-help: alternatively, you might want to use let else to handle the variant that isn't matched
+help: you might want to use `let else` to handle the variant that isn't matched
    |
 LL |     let Some(y) = x else { todo!() };
    |                     ++++++++++++++++
diff --git a/tests/ui/error-codes/E0297.stderr b/tests/ui/error-codes/E0297.stderr
index 903422f3b9b..293028f5f68 100644
--- a/tests/ui/error-codes/E0297.stderr
+++ b/tests/ui/error-codes/E0297.stderr
@@ -1,14 +1,9 @@
-error[E0005]: refutable pattern in `for` loop binding: `None` not covered
+error[E0005]: refutable pattern in `for` loop binding
   --> $DIR/E0297.rs:4:9
    |
 LL |     for Some(x) in xs {}
    |         ^^^^^^^ pattern `None` not covered
    |
-note: `Option<i32>` defined here
-  --> $SRC_DIR/core/src/option.rs:LL:COL
-  ::: $SRC_DIR/core/src/option.rs:LL:COL
-   |
-   = note: not covered
    = note: the matched value is of type `Option<i32>`
 
 error: aborting due to previous error