| Age | Commit message (Collapse) | Author | Lines |
|
On-demandify associated item retrieval
Part of #40614.
I also started converting `adt_def`, but I decided to open a PR with just this bit first to make sure I'm going about this correctly.
r? @nikomatsakis
|
|
Some preparations for directly computing the ICH of crate-metadata.
This PR contains some small fixes in preparation for direct metadata hashing. It mostly just moves stuff into places where it will be needed (making the module structure slightly cleaner along the way) and it fixes some omissions in the MIR region eraser.
r? @nikomatsakis
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #28708.
|
|
Rollup of 12 pull requests
- Successful merges: #40146, #40299, #40315, #40319, #40344, #40345, #40372, #40373, #40400, #40404, #40419, #40431
- Failed merges:
|
|
syntax: add `ast::ItemKind::MacroDef`, simplify hygiene info
This PR
- adds a new variant `MacroDef` to `ast::ItemKind` for `macro_rules!` and eventually `macro` items,
- [breaking-change] forbids macro defs without a name (`macro_rules! { () => {} }` compiles today),
- removes `ast::MacroDef`, and
- no longer uses `Mark` and `Invocation` to identify and characterize macro definitions.
- We used to apply (at least) two `Mark`s to an expanded identifier's `SyntaxContext` -- the definition mark(s) and the expansion mark(s). We now only apply the latter.
r? @nrc
|
|
rustc: Whitelist the FMA target feature
This commit adds the entry `"fma\0"` to the whitelist for the x86
target. LLVM already supports fma but rustc did not directly. Previously
rustc permitted `+fma` in the target-feature argument and enabled the use
of FMA instructions, but it did not list it in the configuration and
attributes.
fixes #40406
|
|
[MIR] Implement Inlining
Fairly basic implementation of inlining for MIR. Uses conservative
heuristics for inlining.
Doesn't handle a number of cases, but can be extended later. This is basically the same as the previous inlining PR, but without the span-related changes (as the bugs it was dealing with have since been fixed).
/cc @rust-lang/compiler
|
|
rustc: Exit quickly on only `--emit dep-info`
This commit alters the compiler to exit quickly if the only output being emitted
is `dep-info`, which doesn't need a lot of other information to generate.
Closes #40328
|
|
This commit adds the entry `"fma\0"` to the whitelist for the x86
target. LLVM already supports fma but rustc did not directly. Previously
rustc permitted `+fma` in the target-feature argument and enabled the use
of FMA instructions, but it did not list it in the configuration and
attributes.
fixes #40406
|
|
This commit alters the compiler to exit quickly if the only output being emitted
is `dep-info`, which doesn't need a lot of other information to generate.
Closes #40328
|
|
In recent months there have been a few different people investigating how to make a plugin that
registers a MIR-pass – one that isn’t intended to be eventually merged into rustc proper.
The interface to register MIR passes was added primarily for miri (& later was
found to make prototyping of rustc-proper MIR passes a tiny bit faster). Since miri does not use
this interface anymore it seems like a good time to remove this "feature".
For prototyping purposes a similar interface can be added by developers themselves in their custom
rustc build.
|
|
|
|
Fairly basic implementation of inlining for MIR. Uses conservative
heuristics for inlining.
|
|
transition borrowck to visit all **bodies** and not item-likes
This is a better structure for incremental compilation and also more compatible with the eventual borrowck mir. It also fixes #38520 as a drive-by fix.
r? @eddyb
|
|
|
|
Fixes #38520
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Refactor macro resolution errors + add derive macro suggestions
Move legacy macro resolution error reporting to `finalize_current_module_macro_resolutions`, and provide suggestions for derive macros.
Fixes #39323
cc https://github.com/rust-lang/rust/issues/30197
r? @jseyfried
|
|
|
|
Add intrinsics & target features for rd{rand,seed}
One question is whether or not we want to map feature name `rdrnd` to `rdrand` instead.
EDIT: as for use case, I would like to port my rdrand crate from inline assembly to these intrinsics.
|
|
|
|
rename other than copy/remove
|
|
|
|
|
|
|
|
|
|
comment rewording and argument unifying
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
run rustdoc tests in the same sort of thread rustc runs in
Not sure yet if this is the problem in #38973 but seems like an improvement regardless.
r? @brson
|
|
Refactor the parser to consume token trees
This is groundwork for efficiently parsing attribute proc macro invocations, bang macro invocations, and `TokenStream`-based attributes and fragment matchers.
This improves parsing performance by 8-15% and expansion performance by 0-5% on a sampling of the compiler's crates.
r? @nrc
|