rust/tests
Matthias Krüger a7c07cf731
Rollup merge of #108548 - jamen:master, r=compiler-errors
Clarify the 'use a constant in a pattern' error message

```rs
use std::borrow::Cow;

const ERROR_CODE: Cow<'_, str> = Cow::Borrowed("23505");

fn main() {
    let x = Cow::from("23505");

    match x {
        ERROR_CODE => {}
    }
}
```
```
error: to use a constant of type `Cow` in a pattern, `Cow` must be annotated with `#[derive(PartialEq, Eq)]`
 --> src/main.rs:9:9
  |
9 |         ERROR_CODE => {}
  |         ^^^^^^^^^^

error: could not compile `playground` due to previous error
```

It seems helpful to link to StructuralEq in this message. I was a little confused, because `Cow<'_, str>` implements PartialEq and Eq, but they're not derived, which I learned is necessary for structural equality and using constants in patterns (thanks to the Rust community Discord server)

For tests, should I update every occurrence of this message? I see tests where this is still a warning and I'm not sure if I should update those.
2023-03-28 07:01:08 +02:00
..
assembly Ignore LVI incompatible assembly tests on sgx platform 2023-03-10 16:04:37 +01:00
auxiliary
codegen Auto merge of #109474 - nikic:llvm-16-again, r=cuviper 2023-03-25 19:55:10 +00:00
codegen-units Use unused_generic_params from crate metadata 2023-03-14 16:33:12 +00:00
debuginfo Bless debuginfo test. 2023-03-13 18:24:48 +00:00
incremental Rollup merge of #105793 - lukas-code:circular-deps, r=Mark-Simulacrum 2023-03-19 15:33:55 +05:30
mir-opt Auto merge of #106428 - saethlin:inline-diverging-functions, r=cjgillot 2023-03-26 05:55:32 +00:00
pretty Auto merge of #108148 - parthopdas:master, r=oli-obk 2023-03-20 03:24:27 +00:00
run-make Rollup merge of #108986 - fortanix:raoul/sync_lvi_patches, r=cuviper 2023-03-24 01:22:05 +01:00
run-make-fulldeps Rollup merge of #109213 - oli-obk:cstore, r=cjgillot 2023-03-22 22:44:40 +01:00
run-pass-valgrind
rustdoc Bless tidy 2023-03-27 18:58:07 +00:00
rustdoc-gui Rollup merge of #109633 - GuillaumeGomez:fix-go-to-only-setting, r=notriddle 2023-03-27 08:46:53 +02:00
rustdoc-js rustdoc: add support for type filters in arguments and generics 2023-03-20 22:41:57 -07:00
rustdoc-js-std rustdoc: add support for type filters in arguments and generics 2023-03-20 22:41:57 -07:00
rustdoc-json Add test for c_variadic in rustdoc-json 2023-03-18 17:59:29 +00:00
rustdoc-ui Rollup merge of #109330 - GuillaumeGomez:intermediate-reexport-intra-doc-ice, r=petrochenkov 2023-03-27 18:56:19 +02:00
ui Rollup merge of #108548 - jamen:master, r=compiler-errors 2023-03-28 07:01:08 +02:00
ui-fulldeps rustc: Remove unused Session argument from some attribute functions 2023-03-22 13:55:55 +04:00
COMPILER_TESTS.md