Move collect_and_partition_mono_items to rustc_mir
Most of the logic of it is inside rustc_mir anyway.
Also removes the single function crate rustc_metadata_utils. Based on #55225
rustdoc: Replaces fn main search and extern crate search with proper parsing during doctests.
Fixes#21299.
Fixes#33731.
Let me know if there's any additional changes you'd like made!
Fixed the bug in bootstrap where --exclude was ignored for run-pass test
This should fix the 3 hour timeout on AppVeyor which happened a lot recently.
Additionally, further rebalanced the AppVeyor subsets by moving "ui" and "linkchecker" into Set 2.
Rollup of 5 pull requests
Successful merges:
- #54162 (Hide default impls items)
- #55555 (Make `-Z ls` list the actual filename of external dependencies)
- #55567 (add test for deriving Debug on uninhabited enum)
- #55568 (test that rustdoc doesn't overflow on a big enum)
- #55598 (publish-toolstate: ping maintainers when a tool builds again)
Failed merges:
r? @ghost
publish-toolstate: ping maintainers when a tool builds again
And add @Xanewok as an RLS maintainer
r? @kennytm
Motivation is that I see when the RLS gets broken, but have to poll the website to see when it is fixed, I'd prefer to get pinged.
test that rustdoc doesn't overflow on a big enum
Adds a test to close#25295. The test case depended on `enum_primitive` so I just basically pulled its source into an auxiliary file, is that the right way to do it?
Add support for bound types
This PR may have some slight performance impacts, I don't know how hot is the code I touched.
Also, this breaks clippy and miri.
r? @nikomatsakis
Bump cargo-vendor version
Currently we pin `cargo-vendor` to 0.1.4, which doesn't set the `User-Agent` HTTP header. crates.io is going to require that header in the near future, so this PR bumps the pinned version of the crate to the latest one (which correctly sets the header).
r? @Mark-Simulacrum
cc @sgrif
Take 2: Implement object-safety and dynamic dispatch for arbitrary_self_types
This replaces #50173. Over the months that that PR was open, we made a lot of changes to the way this was going to be implemented, and the long, meandering comment thread and commit history would have been confusing to people reading it in the future. So I decided to package everything up with new, straighforward commits and open a new PR.
Here are the main points. Please read the commit messages for details.
- To simplify codegen, we only support receivers that have the ABI of a pointer. That means they are builtin pointer types, or newtypes thereof.
- We introduce a new trait: `DispatchFromDyn<T>`, similar to `CoerceUnsized<T>`. `DispatchFromDyn` has extra requirements that `CoerceUnsized` does not: when you implement `DispatchFromDyn` for a struct, there cannot be any extra fields besides the field being coerced and `PhantomData` fields. This ensures that the struct's ABI is the same as a pointer.
- For a method's receiver (e.g. `self: Rc<Self>`) to be object-safe, it needs to have the following property:
- let `DynReceiver` be the receiver when `Self = dyn Trait`
- let `ConcreteReceiver` be the receiver when `Self = T`, where `T` is some unknown `Sized` type that implements `Trait`, and is the erased type of the trait object.
- `ConcreteReceiver` must implement `DispatchFromDyn<DynReceiver>`
In the case of `Rc<Self>`, this requires `Rc<T>: DispatchFromDyn<Rc<dyn Trait>>`
These rules are explained more thoroughly in the doc comment on `receiver_is_dispatchable` in object_safety.rs.
r? @nikomatsakis and @eddyb
cc @arielb1 @cramertj @withoutboats
Special thanks to @nikomatsakis for getting me un-stuck when implementing the object-safety checks, and @eddyb for helping with the codegen parts.
EDIT 2018-11-01: updated because CoerceSized has been replaced with DispatchFromDyn
rustc: improve E0669 span
E0669 refers to an operand that cannot be coerced into a single LLVM
value, unfortunately right now this uses the Span for the entire inline
assembly statement, which is less than ideal.
This commit preserves the Span from HIR, which lets us emit the error
using the Span for the operand itself in MIR.
r? @nagisa
cc/ @parched