about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-07-04 18:49:28 +0000
committerbors <bors@rust-lang.org>2015-07-04 18:49:28 +0000
commit42e545ffa73836525d10e1c658b622ddb12b7f93 (patch)
tree5073694b309554caddbd9e84303978768d5699ce /src/libstd/sys/unix/stack_overflow.rs
parentb381449dfffef27e8b28a6f0867a8c238eef7188 (diff)
parentd256eb1c5ddd6740140b6538a018a0171f45fdae (diff)
downloadrust-42e545ffa73836525d10e1c658b622ddb12b7f93.tar.gz
rust-42e545ffa73836525d10e1c658b622ddb12b7f93.zip
Auto merge of #26694 - eddyb:method-nan, r=arielb1
`MethodCallee` now has no information about the method, other than its `DefId`.
The previous bits of information can be recovered as follows:
```rust
let method_item = tcx.impl_or_trait_item(callee.def_id);
let container = method_item.container();
```
The method is inherent if `container` is a `ty::ImplContainer`:
* the `impl` the method comes from is `container.id()`

The method is a trait method if `container` is a `ty::TraitContainer:
* the `trait` the method is part of is `container.id()`
* a `ty::TraitRef` can be constructed by putting together:
 * `container.id()` as the `trait` ID
 * `callee.substs.clone().method_to_trait()` as the `trait` substs (including `Self`)
* the above `trait_ref` is a valid `T: Trait<A, B, C>` predicate
* selecting `trait_ref` could result in one of the following:
 * `traits::VtableImpl(data)`: static dispatch to `data.impl_def_id`
 * `traits::VtableObject(data)`: dynamic dispatch, with the vtable index:
`traits::get_vtable_index_of_object_method(tcx, data, callee.def_id)`
 * other variants of `traits::Vtable`: various other `impl` sources
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions