diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-31 02:54:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-31 02:54:07 +0100 |
| commit | 97b9d1023d80931ce9b2fe768526e419344a657d (patch) | |
| tree | 60a678dbf1f7ebf93a0d23c35b289aa7222555aa /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 0bd4037931042103a702bc8bf8aeca8ca5c7264b (diff) | |
| parent | fb4095df94bf07dc745a0c0e07adc93b52f04673 (diff) | |
| download | rust-97b9d1023d80931ce9b2fe768526e419344a657d.tar.gz rust-97b9d1023d80931ce9b2fe768526e419344a657d.zip | |
Rollup merge of #65850 - mikeyhew:patch-1, r=nikomatsakis
Update comments re type parameter hack in object safety To check if a method's receiver type is object safe, we create a new receiver type by substituting in a bogus type parameter (let's call it `U`) for `Self`, and checking that the unmodified receiver type implements `DispatchFromDyn<receiver type with Self = U>`. It would be better to use `dyn Trait` directly, and the only reason we don't is because it triggers another check that `Trait` is object safe, resulting in a query cycle. Once the feature `object_safe_for_dispatch` (tracking issue https://github.com/rust-lang/rust/issues/43561) is stabilized, this will no longer be the case, and we'll be able to use `dyn Trait` as the unsized `Self` type. I've updated the comments in object_safety.rs accordingly. cc @Centril @nikomatsakis @bovinebuddha
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
