]> git.lizzy.rs Git - rust.git/commit - src/tools/rustfmt
Auto merge of #65182 - anp:reify-shim, r=eddyb
authorbors <bors@rust-lang.org>
Sun, 13 Oct 2019 07:32:38 +0000 (07:32 +0000)
committerbors <bors@rust-lang.org>
Sun, 13 Oct 2019 07:32:38 +0000 (07:32 +0000)
commit29b6e0f0a1d1a37f8dc729484a64e59bf0b9a0a3
treeb8ba6dfcb88418db3dd9f5f1e93ada676fc7ce70
parent3da6836cc9fd654fa204fe7e113973f7b5b3e5f6
parent19f26fafdd6e27847a155a2ba8854c8d4ff61597
Auto merge of #65182 - anp:reify-shim, r=eddyb

Add `Instance::resolve_for_fn_ptr` (RFC 2091 #2/N)

Supercedes: https://github.com/rust-lang/rust/pull/65082
Depends on: https://github.com/rust-lang/rust/pull/65037
Tracking issue: https://github.com/rust-lang/rust/issues/47809
[RFC text](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md)

steps taken:

* [x] add a `ReifyShim` that is similar to `VirtualShim` in behavior (see #54183)
* [x] add `ty::Instance::resolve_for_fn_ptr` (leave `ty::Instance::resolve_vtable` alone), migrate appropriate callers
* [x] `resolve_for_fn_ptr` returns the shim if calling a `#[track_caller]` function
src/librustc_mir/monomorphize/collector.rs