Rollup of 10 pull requests
Successful merges:
- #64131 (data_structures: Add deterministic FxHashMap and FxHashSet wrappers)
- #64387 (Fix redundant semicolon lint interaction with proc macro attributes)
- #64678 (added more context for duplicate lang item errors (fixes#60561))
- #64763 (Add E0734 and its long explanation)
- #64793 (Fix format macro expansions spans to be macro-generated)
- #64837 (Improve wording in documentation of MaybeUninit)
- #64852 (Print ParamTy span when accessing a field (#52082))
- #64875 (Upgrade async/await to "used" keywords.)
- #64876 (Fix typo in intrinsics op safety)
- #64880 (Slice docs: fix typo)
Failed merges:
r? @ghost
Improve wording in documentation of MaybeUninit
Changes
> variables are properly initialized **at** their respective type
into
> variables are properly initialized **as** their respective type
Fix format macro expansions spans to be macro-generated
New Exprs generated as part of the format macro expansion should get the macro
expansion span with an expansion context, rather than the span of the format string
which does not.
added more context for duplicate lang item errors (fixes#60561)
Some more information about #60561 -- these errors are pretty common when one works in restrictive environments with `no_std` or customized `std`, but they don't provide much context for debugging, as any transitive dependency could have brought in `std` crate. With that, currently, one needs to use something like `cargo tree` and investigate transitive dependencies one by one.
It'll be more helpful to know at least the crate that uses `std` (which `cargo tree` doesn't show) to pin down this investigation when debugging.
I'm not sure what the best way to get this context is inside rustc internals (I'm new to them). I found that `all_crate_nums` query returns the crates in some dependency order, so printing out the name of the preceding crate seems to do the trick. But I welcome suggestions if this can be done in a better way.
Fix redundant semicolon lint interaction with proc macro attributes
Fixes#63967 and fixes#63947, both of which were caused by the lint's changes to the parser interacting poorly with proc macro attributes and causing span information to be lost
r? @varkor
data_structures: Add deterministic FxHashMap and FxHashSet wrappers
StableMap
A wrapper for FxHashMap that allows to `insert`, `remove`, `get`, `get_mut` and convert a hashmap into a sorted vector using the method `into_sorted_vector` but no iteration support.
StableSet
A wrapper for FxHashSet that allows to `insert`, `remove`, `get` and convert a hashset into a sorted vector using the method `into_sorted_vector` but no iteration support.
Addresses issue #63713
We relied previously on the caller (e.g. `Q::in_operand`) to ignore
`Local`s that were indirectly mutable (and thus assumed to be
qualified). However, it's much clearer (and more efficient) to do this
in the resolver itself.
This does not yet remove the masking done in `Q::in_operand` and others
for safety's sake, although I believe that should now be possible.
Also adds an unstable flag to disable the ICE
(`-Zsuppress-const-validation-back-compat-ice`) so that nightly users do
not have to revert to a previous nightly if their code causes
disagreement between the validators.