about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-04-04 09:16:19 +0000
committerbors <bors@rust-lang.org>2020-04-04 09:16:19 +0000
commit49dc2f9f091748beb1a8a9d5b3eb3bbe7362c3bd (patch)
tree3c9f383370676a43b5e46b1e57785f62427b9889 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parent1b521f57735663de9373679cf8c6502622036bf1 (diff)
parent8ad149a0e0810cb2ef17b2b0aef18c9a2a9062b0 (diff)
downloadrust-49dc2f9f091748beb1a8a9d5b3eb3bbe7362c3bd.tar.gz
rust-49dc2f9f091748beb1a8a9d5b3eb3bbe7362c3bd.zip
Auto merge of #70272 - eddyb:type-of-impl-trait, r=nikomatsakis
typeck/type_of: let wfcheck handle generics in opaque types' substs.

I was working on #70164, and `type_of`'s handling of opaque types seemed to be, by far, the trickiest use of `Ty::walk`, but I believe it wasn't doing anything (see https://github.com/rust-lang/rust/pull/57896#discussion_r396064431 - I suspect, based on glancing at the PR discussion, that an early attempt was kept in, despite becoming just an overcomplicated way to do exactly the same as the previous simple type equality check).

I would've loved to remove `ResolvedOpaqueTy` (keep the `Ty` and lose the `Substs`), but it looks like the MIR borrowck part of the process needs that now, so it would've been added anyway since #57896, even if that PR hadn't happened.

<hr/>

In the process, I've moved the remaining substitution validation to `wfcheck`, which was already handling lifetimes, and kept only `delay_span_bug`s in `type_of`, as an insurance policy.

I've added tests for lifetime and const cases, they seem to be checked correctly now.
(and more uniform than they were in https://github.com/rust-lang/rust/issues/63063#issuecomment-602162804)

However, the quality of the errors is maybe a bit worse, and they don't trigger when there are other errors (not sure if this is due to compilation stop points or something more specific to one opaque type).

r? @nikomatsakis cc @matthewjasper @oli-obk @Aaron1011
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions