rust/tests
bors fcf3006e01 Auto merge of #113199 - b-naber:slice-pattern-type-inference, r=lcnr
Infer type in irrefutable slice patterns with fixed length as array

Fixes https://github.com/rust-lang/rust/issues/76342

In irrefutable slice patterns with a fixed length, we can infer the type as an array type. We now choose to prefer some implementations over others, e.g. in:

```
struct Zeroes;

const ARR: [usize; 2] = [0; 2];
const ARR2: [usize; 2] = [2; 2];

impl Into<&'static [usize; 2]> for Zeroes {
    fn into(self) -> &'static [usize; 2] {
        &ARR
    }
}

impl Into<&'static [usize]> for Zeroes {
    fn into(self) -> &'static [usize] {
        &ARR2
    }
}

fn main() {
    let &[a, b] = Zeroes.into();
}
```

We now prefer the impl candidate `impl Into<&'static [usize; 2]> for Zeroes`, it's not entirely clear to me that this is correct, but given that the slice impl would require a type annotation anyway, this doesn't seem unreasonable.

r? `@lcnr`
2023-08-03 11:48:33 +00:00
..
assembly Auto merge of #112922 - g0djan:godjan/wasi-threads, r=wesleywiser 2023-08-02 01:01:48 +00:00
auxiliary
codegen Auto merge of #105545 - erikdesjardins:ptrclean, r=bjorn3 2023-08-01 19:44:17 +00:00
codegen-units
debuginfo Replace ignore-everything with only-arch 2023-07-29 15:49:07 -07:00
incremental Querify unused trait check. 2023-07-16 21:51:00 +00:00
mir-opt Make coverage counter IDs count up from 0, not 1 2023-08-01 11:29:55 +10:00
pretty
run-coverage refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
run-coverage-rustdoc Re-bless the newly-migrated tests 2023-06-28 11:09:19 +10:00
run-make Auto merge of #112849 - m-ou-se:panic-message-format, r=thomcc 2023-08-01 14:15:09 +00:00
run-make-fulldeps On nightly, dump ICE backtraces to disk 2023-07-19 14:10:07 +00:00
run-pass-valgrind
rustdoc Mark lazy_type_alias as incomplete 2023-07-29 19:47:15 +00:00
rustdoc-gui Migrate GUI colors test to original CSS color format 2023-07-31 00:48:17 +02:00
rustdoc-js Auto merge of #112233 - notriddle:notriddle/search-unify, r=GuillaumeGomez 2023-06-15 03:04:46 +00:00
rustdoc-js-std Auto merge of #108537 - GuillaumeGomez:rustdoc-search-whitespace-as-separator, r=notriddle 2023-07-02 18:49:29 +00:00
rustdoc-json Auto merge of #113574 - GuillaumeGomez:rustdoc-json-strip-hidden-impl, r=aDotInTheVoid,notriddle 2023-07-18 02:47:03 +00:00
rustdoc-ui Fix windows test output. 2023-08-01 14:24:11 +02:00
ui Auto merge of #113199 - b-naber:slice-pattern-type-inference, r=lcnr 2023-08-03 11:48:33 +00:00
ui-fulldeps Bump syn dependency 2023-07-26 08:42:40 +00:00
COMPILER_TESTS.md