Deprecates the `find_or_*` family of "internal mutation" methods on `HashMap` in
favour of the "external mutation" Entry API as part of RFC 60. Part of #17320,
although this still needs to be done on the rest of the maps, they don't have
any internal mutation methods defined, so they can be done without deprecating
or breaking anything. Work on `BTree`'s is part of the complete rewrite in #17334.
The implemented API deviates from the API described in the RFC in two key places:
* `VacantEntry.set` yields a mutable reference to the inserted element to avoid code
duplication where complex logic needs to be done *regardless* of whether the entry
was vacant or not.
* `OccupiedEntry.into_mut` was added so that it is possible to return a reference
into the map beyond the lifetime of the Entry itself, providing functional parity
to `VacantEntry.set`.
This allows the full find_or_insert functionality to be implemented using this API.
A PR will be submitted to the RFC to amend this.
[breaking-change]
The `std::rt` module was marked `unstable` [a while back](b6d4d117f4), and this change was not reverted when we moved to an `experimental` baseline for `std`.
This is waiting on an RFC, but this basic functionality should be
straightforward. The implementation essentially desugars during type
collection and AST type conversion time into the parameter scheme we
have now.
r? @nikomatsakis
The implementation essentially desugars during type collection and AST
type conversion time into the parameter scheme we have now. Only fully
qualified names--e.g. `<T as Foo>::Bar`--are supported.
RUST_LOG supports regex filtering of log messages with a syntax like
`RUST_LOG=main/foo` to use the regex filter 'foo'. Unfortunately, the
filter was inverted, so `RUST_LOG=main/foo` would actually show all
messages except the ones containing 'foo'.
RUST_LOG supports regex filtering of log messages with a syntax like
`RUST_LOG=main/foo` to use the regex filter 'foo'. Unfortunately, the
filter was inverted, so `RUST_LOG=main/foo` would actually show all
messages except the ones containing 'foo'.
The `std::rt` module was marked `unstable` [a while
back](b6d4d117f4),
and this change was not reverted when we moved to an `experimental`
baseline for `std`.
Recursive items are currently detected in the `check_const` pass which runs after type checking. This means a recursive static item used as an array length will cause type checking to blow the stack. This PR separates the recursion check out into a separate pass which is run before type checking.
Closes issue #17252
r? @nick29581