about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/mod.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-11-25 15:05:35 +0100
committerGitHub <noreply@github.com>2021-11-25 15:05:35 +0100
commit90dd7c03af736447f4340d7b17fe00eef0b27af7 (patch)
tree9d63ed6da6c3ae653ea2a7ad7bd519a3446b29b8 /compiler/rustc_mir_transform/src/coverage/mod.rs
parent23a436606b118bd2fbb12f64fce21e7f9d355349 (diff)
parent4f29f3cef85a2a66fcfc76bc7fa3cca3d84266f8 (diff)
downloadrust-90dd7c03af736447f4340d7b17fe00eef0b27af7.tar.gz
rust-90dd7c03af736447f4340d7b17fe00eef0b27af7.zip
Rollup merge of #89359 - fee1-dead:const-it, r=oli-obk
Various fixes for const_trait_impl

A few problems I found while making `Iterator` easier to const-implement.

1. More generous `~const Drop` check.

We check for nested fields with caller bounds.

For example, an ADT type with fields of types `A`, `B`, `C`, check if all of them are either:
 - Bounded (`A: ~const Drop`, `B: Copy`)
 - Known to be able to destruct at compile time (`C = i32`, `struct C(i32)`, `C = some_fn`)

2. Don't treat trait functions marked with `#[default_method_body_is_const]` as stable const fns when checking `const_for` and `const_try` feature gates.

I think anyone can review this, so no r? this time.
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/mod.rs')
0 files changed, 0 insertions, 0 deletions