- 02 11月, 2018 6 次提交
-
-
由 Michael Hewson 提交于
also updated the doc on `receiver_is_dispatchable` to reflect current state of the implementation
-
由 Michael Hewson 提交于
If object-safety checks succeed for a receiver type, make sure the receiver’s abi is a) a Scalar, when Self = () b) a ScalarPair, when Self = dyn Trait
-
由 Michael Hewson 提交于
-
由 Michael Hewson 提交于
Rename `CoerceSized` to `DispatchFromDyn`, and reverse the direction so that, for example, you write ``` impl<T: Unsize<U>, U> DispatchFromDyn<*const U> for *const T {} ``` instead of ``` impl<T: Unsize<U>, U> DispatchFromDyn<*const T> for *const U {} ``` this way the trait is really just a subset of `CoerceUnsized`. The checks in object_safety.rs are updated for the new trait, and some documentation and method names in there are updated for the new trait name — e.g. `receiver_is_coercible` is now called `receiver_is_dispatchable`. Since the trait now works in the opposite direction, some code had to updated here for that too. I did not update the error messages for invalid `CoerceSized` (now `DispatchFromDyn`) implementations, except to find/replace `CoerceSized` with `DispatchFromDyn`. Will ask for suggestions in the PR thread.
-
由 Michael Hewson 提交于
For a trait method to be considered object-safe, the receiver type must satisfy certain properties: first, we need to be able to get the vtable to so we can look up the method, and second, we need to convert the receiver from the version where `Self=dyn Trait`, to the version where `Self=T`, `T` being some unknown, `Sized` type that implements `Trait`. To check that the receiver satisfies those properties, we use the following query: forall (U) { if (Self: Unsize<U>) { Receiver[Self => U]: CoerceSized<Receiver> } } where `Receiver` is the receiver type of the method (e.g. `Rc<Self>`), and `Receiver[Self => U]` is the receiver type where `Self = U`, e.g. `Rc<U>`. forall queries like this aren’t implemented in the trait system yet, so for now we are using a bit of a hack — see the code for explanation.
-
由 Michael Hewson 提交于
-
- 28 9月, 2018 1 次提交
-
-
由 Eduard-Mihai Burtescu 提交于
-
- 18 9月, 2018 1 次提交
-
-
由 ljedrz 提交于
-
- 22 8月, 2018 2 次提交
- 27 7月, 2018 1 次提交
-
-
由 ljedrz 提交于
-
- 02 7月, 2018 1 次提交
-
-
由 Niko Matsakis 提交于
Co-authored-by: NTyler Mandry <tmandry@gmail.com>
-
- 28 6月, 2018 1 次提交
-
-
由 Vadim Petrochenkov 提交于
Remove emulation of hygiene with gensyms
-
- 25 6月, 2018 2 次提交
-
-
由 leonardo.yvens 提交于
-
由 leonardo.yvens 提交于
This is virtually certain to cause regressions, needs crater. In #50781 it was discovered that our object safety rules are not sound because we allow `Self` in where clauses without restrain. This PR is a direct fix to the rules so that we disallow methods with unsound where clauses. This currently uses hard error to measure impact, but we will want to downgrade it to a future compat error. Fixes #50781. r? @nikomatsakis
-
- 15 5月, 2018 6 次提交
- 25 4月, 2018 1 次提交
-
-
由 Tyler Mandry 提交于
-
- 04 3月, 2018 1 次提交
-
-
由 Tatsuyuki Ishi 提交于
-
- 17 12月, 2017 1 次提交
-
-
由 Michael Hewson 提交于
-
- 06 12月, 2017 1 次提交
-
-
由 Oliver Schneider 提交于
-
- 09 11月, 2017 1 次提交
-
-
由 Michael Hewson 提交于
-
- 08 11月, 2017 1 次提交
-
-
由 Michael Hewson 提交于
-
- 11 9月, 2017 1 次提交
-
-
由 Eduard-Mihai Burtescu 提交于
-
- 05 9月, 2017 1 次提交
-
-
由 Alex Crichton 提交于
This commit moves the calculation of the `LanguageItems` structure into a query rather than being calculated before the `TyCtxt` exists, with the eventual end goal of removing some `CrateStore` methods.
-
- 11 7月, 2017 1 次提交
-
-
由 Tobias Schottdorf 提交于
Addresses the second part of #42171 by removing the `TraitRef` from `ProjectionTy`, and directly storing its `Substs`. Closes #42171.
-
- 27 6月, 2017 1 次提交
-
-
由 Eduard-Mihai Burtescu 提交于
-
- 15 5月, 2017 1 次提交
-
-
由 Michael Woerister 提交于
-
- 13 5月, 2017 2 次提交
-
-
由 Eduard-Mihai Burtescu 提交于
-
由 Eduard-Mihai Burtescu 提交于
-
- 01 5月, 2017 2 次提交
-
-
由 Niko Matsakis 提交于
Instead, thread around `Option<CodeExtent>` where applicable.
-
由 Taylor Cramer 提交于
-
- 24 4月, 2017 4 次提交
-
-
由 Eduard-Mihai Burtescu 提交于
-
由 Without Boats 提交于
-
由 Without Boats 提交于
-
由 Without Boats 提交于
-