diff options
| author | bors <bors@rust-lang.org> | 2020-02-20 08:41:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-20 08:41:17 +0000 |
| commit | 6af388b25050bca26710be7e4030e17bf6d8d2f7 (patch) | |
| tree | 7126a3429ceb0e584cdcca8b7b75ecaaebf88d02 /src/tools/publish_toolstate.py | |
| parent | de362d88ea17ab23ca2483cb798bc7aeb81a48f5 (diff) | |
| parent | 19801b12c950f727a4e6938a87b0b2fdece73c07 (diff) | |
| download | rust-6af388b25050bca26710be7e4030e17bf6d8d2f7.tar.gz rust-6af388b25050bca26710be7e4030e17bf6d8d2f7.zip | |
Auto merge of #68847 - ecstatic-morse:const-impl, r=oli-obk
Allow trait methods to be called on concrete types in a const context This partially implements [RFC 2632](https://github.com/rust-lang/rfcs/pull/2632) by const-checking methods inside an `impl const` block and allowing those methods to be called on concrete types. Calling trait methods on type parameters in a const context is not yet allowed. Implementing this will require much more work. Since we are only concerned with methods on concrete types, we are able to take advantage of the machinery in `Instance::resolve`, which is doing most of the work. This also propagates `#[rustc_const_unstable]` from parent items to child items, making that attribute behave like `#[stable]` and `#[unstable]` do. This allows trait methods to be marked as unstably const. cc #67792 #57563 cc @rust-lang/wg-const-eval r? @oli-obk
Diffstat (limited to 'src/tools/publish_toolstate.py')
0 files changed, 0 insertions, 0 deletions
