rust/src
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
..
bootstrap Auto merge of #82076 - jyn514:update-bootstrap, r=Mark-Simulacrum 2021-02-23 07:19:41 +00:00
build_helper
ci Auto merge of #79979 - GuillaumeGomez:rustdoc-gui-tests, r=Mark-Simulacrum 2021-02-22 06:47:59 +00:00
doc Rollup merge of #82166 - kaniini:s390x-musl-target, r=nagisa 2021-02-23 02:51:53 +01:00
etc Rollup merge of #81891 - CraftSpider:fn-header, r=jyn514 2021-02-14 16:54:45 +01:00
librustdoc Auto merge of #82517 - Dylan-DPC:rollup-a1958gb, r=Dylan-DPC 2021-02-25 15:15:59 +00:00
llvm-project@2a054c1e4f Update LLVM to pull in fixes to llvm-dwp 2021-02-20 15:56:36 +02:00
rustdoc-json-types Rollup merge of #81891 - CraftSpider:fn-header, r=jyn514 2021-02-14 16:54:45 +01:00
test Auto merge of #82447 - Amanieu:legacy_const_generics, r=oli-obk 2021-02-25 18:14:50 +00:00
tools Fix Clippy build and test 2021-02-25 11:25:45 +01:00
README.md update message 2021-02-14 10:08:37 +05:30
stage0.txt Update the bootstrap compiler 2021-02-20 17:19:30 -05:00
version bump nightly version to 1.52.0 2021-02-05 16:25:08 +01:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.