rust/src/tools
Jonas Schievink c7a67209c8
Rollup merge of #79287 - jonas-schievink:const-trait-impl, r=oli-obk
Allow using generic trait methods in `const fn`

Next step for https://github.com/rust-lang/rust/issues/67792, this now also allows code like the following:

```rust
struct S;

impl const PartialEq for S {
    fn eq(&self, _: &S) -> bool {
        true
    }
}

const fn equals_self<T: PartialEq>(t: &T) -> bool {
    *t == *t
}

pub const EQ: bool = equals_self(&S);
```

This works by threading const-ness of trait predicates through trait selection, in particular through `ParamCandidate`, and exposing it in the resulting `ImplSource`.

Since this change makes two bounds `T: Trait` and `T: ?const Trait` that only differ in their const-ness be treated like different bounds, candidate winnowing has been changed to drop the `?const` candidate in favor of the const candidate, to avoid ambiguities when both a const and a non-const bound is present.
2020-11-23 15:25:44 +01:00
..
build-manifest build-manifest: strip newline from rustc version 2020-11-16 19:26:03 +01:00
cargo@2af662e221 Update cargo 2020-11-12 18:39:16 -08:00
cargotest update tokei and ripgrep in cargotest 2020-09-27 10:58:42 +02:00
clippy Thread Constness through selection 2020-11-22 02:13:53 +01:00
compiletest Auto merge of #78752 - jyn514:html-diff, r=GuillaumeGomez 2020-11-22 01:09:04 +00:00
error_index_generator mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
expand-yaml-anchors expand-yaml-anchors: fix clippy::match_ref_pats and clippy::redundant_closure 2020-08-23 23:53:53 +02:00
linkchecker Set MDBOOK_OUTPUT__HTML__INPUT_404 on linkchecker 2020-10-18 02:30:08 +09:00
lint-docs Pass --target to lint docs 2020-09-16 17:25:39 -04:00
miri@746ea5b141 update miri 2020-11-21 00:35:48 +01:00
remote-test-client Support configurable deny-warnings for all in-tree crates. 2020-06-25 21:17:21 -07:00
remote-test-server Support configurable deny-warnings for all in-tree crates. 2020-06-25 21:17:21 -07:00
rls@dab1468d6a Bump Rustfmt and RLS 2020-11-06 18:44:06 +00:00
rust-analyzer@0d03fe6ef5 ⬆️ rust-analyzer 2020-09-14 16:11:06 +02:00
rust-demangler Update rustc-demangle 2020-10-21 21:05:38 +01:00
rust-installer@d66f476b4d Update rust-installer to latest version 2020-07-07 14:15:51 -07:00
rustbook Fix displaying errors when rustbook tests fail. 2020-11-14 17:37:02 -08:00
rustc-workspace-hack Bump Rustfmt and RLS 2020-11-06 18:44:06 +00:00
rustdoc Format the world 2019-12-22 17:42:47 -05:00
rustdoc-js rustdoc: Fix doc aliases with crate filtering 2020-06-23 09:27:37 +01:00
rustdoc-themes Format the world 2019-12-22 17:42:47 -05:00
rustfmt@580d826e9b update rustfmt to v1.4.27 2020-11-16 19:30:21 -06:00
tidy Rollup merge of #77950 - arlosi:sha256, r=eddyb 2020-11-03 19:32:26 +01:00
tier-check Remove note about missing ios/tvos targets in platform docs. 2020-09-25 12:09:06 -07:00
unicode-table-generator unicode_table_generator: fix clippy::writeln_empty_string, clippy::useless_format, clippy:::for_kv_map 2020-08-24 00:43:50 +02:00
unstable-book-gen Replace write_fmt with write! 2020-09-20 10:35:23 +02:00
x Add a tool to run x.py from any subdirectory 2020-11-03 19:40:02 -08:00
publish_toolstate.py Remove mark-i-m from rustc-dev-guide maintainers 2020-10-13 03:13:00 +09:00