rust/src/test
bors 98f8cce6db Auto merge of #82447 - Amanieu:legacy_const_generics, r=oli-obk
Add #[rustc_legacy_const_generics]

This is the first step towards removing `#[rustc_args_required_const]`: a new attribute is added which rewrites function calls of the form `func(a, b, c)` to `func::<{b}>(a, c)`. This allows previously stabilized functions in `stdarch` which use `rustc_args_required_const` to use const generics instead.

This new attribute is not intended to ever be stabilized, it is only intended for use in `stdarch` as a replacement for `#[rustc_args_required_const]`.

```rust
#[rustc_legacy_const_generics(1)]
pub fn foo<const Y: usize>(x: usize, z: usize) -> [usize; 3] {
    [x, Y, z]
}

fn main() {
    assert_eq!(foo(0 + 0, 1 + 1, 2 + 2), [0, 2, 4]);
    assert_eq!(foo::<{1 + 1}>(0 + 0, 2 + 2), [0, 2, 4]);
}
```

r? `@oli-obk`
2021-02-25 18:14:50 +00:00
..
assembly 32-bit ARM: Emit lr instead of r14 when specified as an asm! output register. 2021-02-14 23:41:10 -08:00
auxiliary
codegen Test CU directory is the work_dir 2021-02-20 15:56:36 +02:00
codegen-units
debuginfo Update tests for extern block linting 2021-01-13 07:49:16 -05:00
incremental Revert "Auto merge of #79637 - spastorino:revert-trait-inheritance-self, r=Mark-Simulacrum" 2021-02-05 18:56:56 -03:00
mir-opt New mir-opt pass to simplify gotos with const values 2021-02-22 21:03:57 +01:00
pretty Fix pretty printing of generic associated type constraints 2021-02-13 19:29:55 +00:00
run-make [libtest] Run the test synchronously when hitting thread limit 2021-02-17 21:38:25 +08:00
run-make-fulldeps Auto merge of #82102 - nagisa:nagisa/fix-dwo-name, r=davidtwco 2021-02-23 10:02:16 +00:00
run-pass-valgrind Update tests for extern block linting 2021-01-13 07:49:16 -05:00
rustdoc * Fix some typo 2021-02-23 21:58:17 +01:00
rustdoc-gui Add rustdoc gui tests 2021-02-21 14:25:12 +01:00
rustdoc-js Add test for primitive search 2021-02-01 15:56:51 +01:00
rustdoc-js-std Add search index test for primitive types 2021-01-27 10:05:06 +01:00
rustdoc-json Implement using @set values 2021-02-20 01:50:12 +00:00
rustdoc-ui [intra-doc links] Don't check feature gates of items re-exported across crates 2021-02-19 11:38:14 -05:00
rustfix
ui Auto merge of #82447 - Amanieu:legacy_const_generics, r=oli-obk 2021-02-25 18:14:50 +00:00
ui-fulldeps Allow/fix non_fmt_panic in tests. 2021-02-03 23:15:45 +01:00
COMPILER_TESTS.md