This commit moves Mutable, Map, MutableMap, Set, and MutableSet from
`core::collections` to the `collections` crate at the top-level. Additionally,
this removes the `deque` module and moves the `Deque` trait to only being
available at the top-level of the collections crate.
All functionality continues to be reexported through `std::collections`.
[breaking-change]
Part of #14248
Main contributors are @pcwalton, @alexcrichton and me. Only
@dguenther appear in git blame as a minor contribution, but it is
only adding the rust license, so removed by this relicensing.
@brson OK?
Part of #14248
Main contributors are @pcwalton, @alexcrichton and me. Only
@dguenther appear in git blame as a minor contribution, but it is
only adding the rust license, so removed by this relicensing.
It is in fact the case that `NaN != NaN`. The true relations for
compareQuietNotEqual are LT, GT *and* UN.
I also rephrased the docs for PartialOrd since floats are not the only
types which are not totally ordered.
It is in fact the case that `NaN != NaN`. The true relations for
compareQuietNotEqual are LT, GT *and* UN.
I also rephrased the docs for PartialOrd since floats are not the only
types which are not totally ordered.
After sitting down to build on the work merged in #14318, I realized that some of the test names were not clear, others probably weren't testing the right thing, and they were also not as exhaustive as they could have been.
This makes ast::Arg usable in the quote_ macros.
Please note that this commit doesn't include a regression test. There
are tests that use the quote macros, but all of them are ignored. Due to
that, there is no obvious (to me) way to test this.
Since this change is absolutely trivial and only hooks up an additional
type to existing infrastructure (which presumably is tested elsewhere),
I concluded it's not worth the effort to follow up on this.
Instead of calling a borrow() function that takes a pointer type, just
create a local pointer and dereference it. The dereference is there to
outsmart any future liveness analysis in borrowck.
The move_after_borrow / fu_move_after_borrow tests in
run-pass/borrowck-field-sensitivity.rs are not testing the right thing,
since the scope of the borrow is limited to the call to borrow(). When
fixed, these tests fail and thus should be moved to the corresponding
compile-fail test file.
A number of borrowck field-sensitivity tests perform more moves and
copies than their naming scheme would indicate. This is only necessary
for borrowed pointers (to ensure that the borrowws stay alive in the
near future when borrow liveness is tracked), but all other test
functions should be changed to match their name more closely.
Some of the borrowck field-sensitivity test functions have 'use' in
their name, but they don't refer to the specific kind of use (whether a
copy or a deref). It would be better if the name more precisely
reflected what the function is testing.
Currently, `Sem`, which is used as a building block for all the blocking primitives, uses a very ugly hack to implement `Share` and be able to mutate the stored `WaitQueue` by hiding it all behind a `transmute`d `*()`. This PR replaces all that ugly machinery with `Unsafe`. Beyond being cleaner and not requiring `transmute`, this removes an allocation in the creation and removes an indirection for access.