rust/src
Matthias Krüger cc043aa75f
Rollup merge of #92037 - fee1-dead:fix_env_dmbic, r=oli-obk
Use a const ParamEnv when in default_method_body_is_const

r? `@oli-obk`

This PR fixes the param_env function to return `constness: Const` correctly for trait methods marked with `#[default_method_body_is_const]`. The snippet below is erroneously accepted by the compiler and has been fixed by this change. ([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=12dc6681b2eeee5f604203d96259eeb4))

```rust
#![feature(const_fn_trait_bound)]
#![feature(const_trait_impl)]

trait Tr {}
impl Tr for () {}

const fn foo<T>() where T: ~const Tr {}

pub trait Foo {
    #[default_method_body_is_const]
    fn foo() {
        foo::<()>();
    }
}
```
2021-12-18 14:49:42 +01:00
..
bootstrap bootstrap: Change unwrap() to expect() for WIX path 2021-12-12 03:31:40 +05:30
build_helper Migrate to 2021 2021-09-20 22:21:42 -04:00
ci Pull in libdevstat on FreeBSD 2021-12-15 16:16:26 +02:00
doc Address review feedback 2021-12-12 11:26:59 +00:00
etc Implement @snapshot check for htmldocck 2021-12-01 15:12:10 -08:00
librustdoc Auto merge of #91812 - camelid:assoc-const-lazy, r=GuillaumeGomez 2021-12-17 06:03:38 +00:00
llvm-project@8404254254 Update LLVM submodule 2021-12-08 11:05:48 +01:00
rustdoc-json-types Moved format-version constant to rustdoc-json-types 2021-10-15 12:27:42 +03:00
test Rollup merge of #92037 - fee1-dead:fix_env_dmbic, r=oli-obk 2021-12-18 14:49:42 +01:00
tools Rollup merge of #92030 - rukai:stdlib2021, r=m-ou-se 2021-12-18 10:26:40 +01:00
README.md
stage0.json Bump bootstrap compiler 2021-11-30 10:44:21 -05:00
version Bump to 1.59 2021-11-26 14:53:55 -05: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.