| Age | Commit message (Collapse) | Author | Lines |
|
Make re-export collection deterministic
Fixes https://github.com/rust-lang/rust/issues/65036
Previously, we were using an `FxHashMap` to collect module re-exports.
However, re-exports end up getting serialized into crate metadata, which
means that metadata generation was non-deterministic. This resulted in
spurious error messages changes (e.g. PR #64906) due to pretty-printing
implicitly depending on the order of re-exports when computing the
proper path to show to the user.
See #65042 for a long-term strategy to detect this kind of issue
|
|
Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend"
This change caused the runtime of the linux-asmjs builder to nearly double from 2+ hours to about 4 hours, which happens to be the bors timeout. (It made it in barely under 4 hours when it was merged.) This is causing timeouts on all new changes.
This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing
changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
|
|
lint: extern non-exhaustive types are improper
This PR makes the `improper_ctype` lint trigger for non-exhaustive types when those types aren't defined in the current crate, as per [this comment](https://github.com/rust-lang/rust/issues/44109#issuecomment-537583344).
cc @Centril
|
|
Account for macro invocation in `let mut $pat` diagnostic.
Fixes https://github.com/rust-lang/rust/issues/65122.
r? @estebank
|
|
wesleywiser:fix_const_prop_ice_on_polymorphic_promoted_mir, r=oli-obk
[const-prop] Fix ICE when trying to eval polymorphic promoted MIR
Fixes #64908
r? @oli-obk
cc @nikomatsakis @pnkfelix
|
|
Do not ICE when dereferencing non-Copy raw pointer
CC #52262. Confirmed to remove the unnecessary ICE, but without a repro case.
|
|
When encountering chained operators use heuristics to recover from bad turbofish
|
|
Stabilize `Option::as_deref` and `Option::as_deref_mut`
The tracking issue https://github.com/rust-lang/rust/issues/50264 still has unresolved question for the corresponding `Result` methods.
|
|
r=alexcrichton"
This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing
changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
|
|
Now that `Resolutions` has a deterministic iteration order, it's no
longer necessary to sort its entries before iterating over them
|
|
This commit makes the `improper_ctype` lint trigger for non-exhaustive
types when those types aren't defined in the current crate.
Signed-off-by: David Wood <david@davidtw.co>
|
|
|
|
Upgrade Emscripten targets to use upstream LLVM backend
- Refactors the Emscripten target spec to share code with other wasm
targets.
- Replaces the incorrect wasm32 C call ABI with the old asmjs
version, which is correct for both wasm32 and JS.
- Updates the varargs ABI used by Emscripten and deletes the old one.
- Removes the obsolete wasm32-experimental-emscripten target.
- Temporarily makes Emscripten targets use panic=abort by default
because supporting unwinding will require an LLVM patch.
|
|
|
|
|
|
|
|
- Refactors the Emscripten target spec to share code with other wasm
targets.
- Replaces the incorrect wasm32 C call ABI with the old asmjs
version, which is correct for both wasm32 and JS.
- Updates the varargs ABI used by Emscripten and deletes the old one.
- Removes the obsolete wasm32-experimental-emscripten target.
- Temporarily makes Emscripten targets use panic=abort by default
because supporting unwinding will require an LLVM patch.
|
|
Remove `borrowck_graphviz_postflow` from test
Resolves #65071.
r? @petrochenkov
|
|
metadata: Some crate loading cleanup
So, my goal was to fix caching of loaded crates which is broken and causes ICEs like #56935 or #64450.
While investigating I found that the code is pretty messy and likes to confuse various things that look similar but are actually different.
This PR does some initial cleanup in that area, I hope to get to the caching itself a bit later.
|
|
Simplify ExprUseVisitor
* Remove HIR const qualification
* Remove parts of ExprUseVisitor that aren't being used
r? @eddyb
|
|
Fix most remaining Polonius test differences
This fixes most of the Polonius test differences and also avoids overflow in issue-38591.rs.
r? @nikomatsakis
|
|
typo: fix typo in E0392
See #64931.
---
Cc: @Centril @estebank
|
|
r=petrochenkov
Add long error explanation for E0556
Part of #61137
|
|
Set RUST_BACKTRACE=0 in tests that include a backtrace in stderr
This removes the implicit dependency on the environment variables set
when running `./x.py test`
|
|
pnkfelix:fix-issue-61631-self-in-type-param-default, r=alexreg
Disallow Self in type param defaults of ADTs
Fix #61631
(also includes a drive-by fix to a typo in some related diagnostic output.)
|
|
r=QuietMisdreavus
Prevent rustdoc feature doctests
Part of https://github.com/rust-lang/rust/pull/61351
cc @ollie27
|
|
add regression test for #60218
Fixes #60218
|
|
proc_macro API: Expose `macro_rules` hygiene
Proc macros do not have direct access to our oldest and most stable hygiene kind - `macro_rules` hygiene.
To emulate it macro authors have to go through two steps - first generate a temporary `macro_rules` item (using a derive, at least until https://github.com/rust-lang/rust/pull/64035 is merged), then generate a macro call to that item. Popular crates like [proc_macro_hack](https://crates.io/crates/proc-macro-hack) use this trick to generate hygienic identifiers from proc macros.
I'd say that these workarounds with nested macro definitions have more chances to hit some corner cases in our hygiene system, in which we don't have full confidence.
So, let's provide a direct access to `macro_rules` hygiene instead.
This PR does that by adding a new method `Span::mixed_site` (bikeshedding is welcome) in addition to existing `Span::call_site` (stable) and `Span::def_site` (unstable).
Identifiers with this span resolve at def-site in for local variables, labels and `$crate`, and resolve at call-site for everything else, i.e. exactly like identifiers produced by `macro_rules`.
This API addition opens the way to stabilizing proc macros in expression positions (https://github.com/rust-lang/rust/issues/54727), for which use of call-site hygiene or workarounds with temporary items would be quite unfortunate.
(`macro_rules` expanded in expression position, on the other hand, are stable since 1.0 and widely used.)
r? @dtolnay @alexcrichton
|
|
Deprecate `#![plugin]` & `#[plugin_registrar]`
This PR deprecates `#![plugin]` and `#[plugin_registrar]`.
~A removal deadline is set: 1.44.0. This will be in 9 months from now and should give everyone who is still relying on the feature ample time to rid themselves of this dependency.~
cc https://github.com/rust-lang/rust/issues/29597
r? @Mark-Simulacrum
|
|
|
|
It's a crate name after renaming, so it's entirely irrelevant to crate loading
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Update: incorporate review feedback.
|
|
Avoid ICE on ReFree region on where clause
Fix #64855.
|
|
See #64931.
|
|
r=cramertj
extract expected return type for async fn generators
Fixes #60424
cc @Centril, I know you've been eager to see this fixed.
r? @cramertj
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r=Centril,estebank
syntax: improve parameter without type suggestions
Fixes #64252.
This PR improves the suggestions provided when function parameters
do not have types:
- A new suggestion is added for arbitrary self types, which suggests
adding `self: ` before the type.
- Existing suggestions are now provided when a `<` is found where a `:`
was expected (previously only `,` and `)` or trait items), this gives
suggestions in the case where the unnamed parameter type is generic
in a free function.
- The suggestion that a type name be provided (e.g. `fn foo(HashMap<u32>)`
-> `fn foo(HashMap: TypeName<u32>)`) will no longer occur when a `<` was
found instead of `:`.
- The ident will not be used for recovery when a `<` was found instead
of `:`.
r? @Centril
cc @estebank @yoshuawuyts
|
|
Reword E0392 slightly
Make it clearer that a type or lifetime argument not being used can be
fixed by referencing it in a struct's fields, not just using `PhathomData`.
CC #53589.
|