summary refs log tree commit diff
path: root/src/librustc_save_analysis
AgeCommit message (Collapse)AuthorLines
2019-06-26save-analysis: use buffered writesJeremy Fitzhardinge-3/+4
Otherwise it ends up writing the file byte at a time, which can be very slow for large outputs.
2019-06-25Rollup merge of #62091 - ljedrz:hiridification_almost_there, r=ZoxcMazdak Farrokhzad-4/+12
HirIdification: almost there I'm beginning to run out of stuff to HirIdify :wink:. This time I targeted mainly `hir::map::{find, get_parent_node}`, but a few other bits got changed too. r? @Zoxc
2019-06-25Rollup merge of #62055 - matthewjasper:fix-error-counting, r=pnkfelixMazdak Farrokhzad-6/+0
Fix error counting Count duplicate errors for `track_errors` and other error counting checks. Add FIXMEs to make it clear that we should be moving away from this kind of logic. Closes #61663
2019-06-24HIR: rename find_by_hir_id to findljedrz-3/+3
2019-06-24HIR: remove the NodeId findljedrz-3/+8
2019-06-24HIR: rename get_parent_node_by_hir_id to get_parent_nodeljedrz-1/+1
2019-06-24HIR: remove the NodeId get_parent_node, HirIdify is_argumentljedrz-1/+4
2019-06-24Auto merge of #62075 - Centril:guardless-match-arms, r=petrochenkovbors-3/+2
Remove `ast::Guard` With the introduction of `ast::ExprKind::Let` in https://github.com/rust-lang/rust/pull/60861, the `ast::Guard` structure is now redundant in terms of representing [`if let` guards](https://github.com/rust-lang/rust/issues/51114) in AST since it can be represented by `ExprKind::Let` syntactically. Therefore, we remove `ast::Guard` here. However, we keep `hir::Guard` because the semantic representation is a different matter and this story is more unclear right now (might involve `goto 'arm` in HIR or something...). r? @petrochenkov
2019-06-23Remove redundant syntax::ast::Guard.Mazdak Farrokhzad-3/+2
2019-06-23let_chains: Remove ast::ExprKind::{IfLet, WhileLet} from visitors and ↵Mazdak Farrokhzad-10/+2
introduce ::Let.
2019-06-22Count all errors for `track_errors`Matthew Jasper-6/+0
2019-06-21revert the NodeId to HirId parameter change to get_path_resljedrz-17/+12
2019-06-20rename hir::map::get_by_hir_id to getljedrz-1/+1
2019-06-20remove hir::map::getljedrz-14/+18
2019-06-20rename hir::map::expect_expr_by_hir_id to expect_exprljedrz-2/+2
2019-06-20remove uses of the NodeId hir::map::exprljedrz-2/+4
2019-06-18rustc: reintroduce lifetime bounds where necessary.Eduard-Mihai Burtescu-2/+2
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-6/+6
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-3/+3
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-3/+3
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-3/+3
2019-06-11Add deny(unused_lifetimes) to all the crates that have deny(internal).Eduard-Mihai Burtescu-0/+1
2019-06-10Emit artifact notifications for save-analysis outputJeremy Fitzhardinge-8/+18
Issue: https://github.com/rust-lang/rust/issues/61047
2019-06-08Remove unused `#![feature(custom_attribute)]`sVadim Petrochenkov-1/+0
2019-06-06syntax: Rename `TokenAndSpan` into `Token`Vadim Petrochenkov-9/+9
2019-06-06syntax: Rename `Token` into `TokenKind`Vadim Petrochenkov-2/+2
2019-06-03syntax: revert `ast::AsyncArgument` and associated changes.Eduard-Mihai Burtescu-1/+1
Here follows the main reverts applied in order to make this commit: Revert "Rollup merge of #60676 - davidtwco:issue-60674, r=cramertj" This reverts commit 45b09453dbf120cc23d889435aac3ed7d2ec8eb7, reversing changes made to f6df1f6c30b469cb9e65c5453a0efa03cbb6005e. Revert "Rollup merge of #60437 - davidtwco:issue-60236, r=nikomatsakis" This reverts commit 16939a50ea440e72cb6ecefdaabb988addb1ec0e, reversing changes made to 12bf98155249783583a91863c5dccf9e346f1226. Revert "Rollup merge of #59823 - davidtwco:issue-54716, r=cramertj" This reverts commit 62d1574876f5531bce1b267e62dff520d7adcbbb, reversing changes made to 4eff8526a789e0dfa8b97f7dec91b7b5c18e8544.
2019-06-01rustc: remove Res::Upvar.Eduard-Mihai Burtescu-1/+1
2019-05-26Rename "Associated*" to "Assoc*"Andrew Xu-6/+6
We are going to uniform the terminology of all associated items. Methods that may or may not have `self` are called "associated functions". Because `AssociatedFn` is a bit long, we rename `Associated` to `Assoc`.
2019-05-23Update dylib_dependency_formats, extern_crate and reachable_non_genericsJohn Kåre Alsaker-2/+2
2019-05-23Update privacy_access_levelsJohn Kåre Alsaker-2/+1
2019-05-20Fixed nits raised in review.Alexander Regueiro-1/+1
2019-05-20Ban multi-trait objects via trait aliases.Alexander Regueiro-3/+3
2019-05-18Declare DefIndex with the newtype_index macroFabian Drinck-1/+1
2019-05-13Auto merge of #60649 - Xanewok:save-analysis-assoc-const-ice, r=oli-obkbors-4/+6
save-analysis: Fix ICE when processing associated constant Closes #59134 Closes https://github.com/rust-lang/rls/issues/1449 Thanks @swgillespie for helping tracking this down and fixing it! r? @eddyb
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-1/+1
And also the equality between `Path` and strings, because `Path` is made up of `Symbol`s.
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-3/+3
2019-05-08save-analysis: Fix ICE when processing associated constantIgor Matuszewski-4/+6
2019-05-04Remove `Res::Label`Vadim Petrochenkov-2/+1
Paths can never resolve to labels
2019-05-03rustc: rename hir::def::Def to Res (short for "resolution").Eduard-Mihai Burtescu-73/+73
2019-05-03rustc: factor most DefId-containing variants out of Def and into DefKind.Eduard-Mihai Burtescu-34/+36
2019-04-23Rollup merge of #59823 - davidtwco:issue-54716, r=cramertjMazdak Farrokhzad-1/+1
[wg-async-await] Drop `async fn` arguments in async block Fixes #54716. This PR modifies the HIR lowering (and some other places to make this work) so that unused arguments to a async function are always dropped inside the async move block and not at the end of the function body. ``` async fn foo(<pattern>: <type>) { async move { } } // <-- dropped as you "exit" the fn // ...becomes... fn foo(__arg0: <ty>) { async move { let <pattern>: <ty> = __arg0; } // <-- dropped as you "exit" the async block } ``` However, the exact ordering of drops is not the same as a regular function, [as visible in this playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=be39af1a58e5d430be1eb3c722cb1ec3) - I believe this to be an unrelated issue. There is a [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/187312-t-compiler.2Fwg-async-await/topic/.2354716.20drop.20order) for this. r? @cramertj cc @nikomatsakis
2019-04-22Auto merge of #60053 - Xanewok:serde-save-analysis, r=nrcbors-10/+12
save-analysis: Use serde instead of libserialize to dump JSON data This breaks the save-analysis infrastructure (which also includes `rls-{analysis, data, span}` crates) from depending on rustc_serialize and so we can start moving them to being supported on stable without implementing `Decodable` et al. by hand for data structures defined there. Notable benefits: - we drop the awkward raw byte `PathBuf` [serialization](https://gist.github.com/Xanewok/f4fe8564d0dc0c3ab1dbc244279ff895) (until now (de)serialized as `&[u8]`) - [faster](https://github.com/serde-rs/json-benchmark) (hopefully noticeable for inner crate dependencies for the RLS workloads) - we can easily explore the binary serialization backend (which we planned to do for save-analysis anyway) ~This should be merged together with an update to RLS (https://github.com/rust-lang/rls/pull/1435), which technically could be included right now because we can use the bundled `rls-analysis` here directly, however I'd prefer to publish this to crates.io first (https://github.com/rust-lang/rls/pull/1434, cc @nrc) and use the published version, instead.~ Includes https://github.com/rust-lang/rls/pull/1436. @matklad @nikomatsakis This is also important for the potential RLS 1.0 - 2.0 bridge we talked about on Zulip today
2019-04-21Add `AsyncArgument` to AST.David Wood-1/+1
This commit adds an `AsyncArgument` struct to the AST that contains the generated argument and statement that will be used in HIR lowering, name resolution and def collection.
2019-04-21AST/HIR: Use `Mutability` instead of bool in foreign staticsVadim Petrochenkov-1/+1
2019-04-21Switch to serde-enabled rls-* and update RLS appropriatelyIgor Matuszewski-2/+2
This also bumps RLS version to 1.36. The updated rls-* packages use serde but *not* serde_derive thanks to manual proc macro expansion. This is a hack, since rustc cannot handle crates.io proc macros (duplicated in tools) when cross-compiling, so that's the best we can do in order to support serde_json in save-analysis.
2019-04-21save-analysis: Use serde instead of libserialize to dump JSON dataIgor Matuszewski-8/+10
2019-04-17Deny `internal` in stage0Mateusz Mikuła-1/+1
2019-04-14HirIdify hir::Defljedrz-4/+4
2019-04-11save-analysis: Simplify match arm for type node defIgor Matuszewski-5/+4