| Age | Commit message (Collapse) | Author | Lines |
|
It is more robust to not fail if any directory in a path was created
concurrently. This change lifts rustc internal `create_dir_racy` that
was created to handle such conditions to be new `create_dir_all`
implementation.
|
|
Also adds a fixme and does cargo update
|
|
|
|
And fix some warnings and borrow errors
|
|
And remove a few data structures in favour of rls-data ones
|
|
than its own data structures
|
|
|
|
|
|
save-analysis: cope with lack of method data after a type error
Fixes #39957
r? @eddyb
|
|
Expect macro defs in save-analysis and add expn info to spans for att…
…r proc macros
r? @jseyfried
|
|
Fixes #39957
|
|
macros
|
|
|
|
Remove the AST structure
|
|
Some annotations like the "test" annotations might be of interest for
other projects, especially rls. Export all attributes in a new
attributes item.
|
|
|
|
`tokenstream::TokenTree::Sequence`.
|
|
|
|
|
|
|
|
|
|
|
|
save-analysis: be more paranoid about generated paths
fixes https://github.com/rust-lang-nursery/rls/issues/160
|
|
|
|
fixes https://github.com/rust-lang-nursery/rls/issues/160
|
|
Fixes an ICE when running with save-analsysis after an error
|
|
|
|
|
|
Catches generic types in paths
|
|
This is actually kinda hard to hit, but it fixes missing the `foo` in `for _ in foo {}`.
|
|
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
|
|
|
|
|
|
TBH, this is still not perfect, witness the FIXME, but it is an improvement. In particular it means we get information about trait references in impls.
|
|
|
|
[11/n] Separate ty::Tables into one per each body.
_This is part of a series ([prev](https://github.com/rust-lang/rust/pull/38449) | [next]()) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well.
If any motivation is unclear, please ask for additional PR description clarifications or code comments._
<hr>
In order to track the results of type-checking and inference for incremental recompilation, they must be stored separately for each function or constant value, instead of lumped together.
These side-`Tables` also have to be tracked by various passes, as they visit through bodies (all of which have `Tables`, even if closures share the ones from their parent functions). This is usually done by switching a `tables` field in an override of `visit_nested_body` before recursing through `visit_body`, to the relevant one and then restoring it - however, in many cases the nesting is unnecessary and creating the visitor for each body in the crate and then visiting that body, would be a much cleaner solution.
To simplify handling of inlined HIR & its side-tables, their `NodeId` remapping and entries HIR map were fully stripped out, which means that `NodeId`s from inlined HIR must not be used where a local `NodeId` is expected. It might be possible to make the nodes (`Expr`, `Block`, `Pat`, etc.) that only show up within a `Body` have IDs that are scoped to that `Body`, which would also allow `Tables` to use `Vec`s.
That last part also fixes #38790 which was accidentally introduced in a previous refactor.
|
|
|
|
Historically this was done to accommodate bugs in lints, but there hasn't been a
bug in a lint since this feature was added which the warnings affected. Let's
completely purge warnings from all our stages by denying warnings in all stages.
This will also assist in tracking down `stage0` code to be removed whenever
we're updating the bootstrap compiler.
|
|
|
|
save-analysis: add signature info
These 'signatures' for definitions contain enough info for the RLS to create Rustdoc-style info on the fly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Occurs when we produce save-analysis before type checking is complete (due to errors).
|
|
|
|
The OSX bots failed last night due a race condition in save analysis where
concurrent calls to `fs::create_dir_all` conflicted with one another. This
replaces the relevant function call with `fs::create_dir_racy` which is defined
internally to the compiler.
|
|
save-analysis: fix a few generated code errors
|