about summary refs log tree commit diff
path: root/src/librustc_save_analysis
AgeCommit message (Collapse)AuthorLines
2016-09-19save-analysis: better 'parent' infoNick Cameron-43/+69
In particular, this fixes some bugs displaying doc URLs for method calls.
2016-09-09Auto merge of #36331 - petrochenkov:tyadt, r=eddybbors-6/+6
Refactor `TyStruct`/`TyEnum`/`TyUnion` into `TyAdt` r? @eddyb
2016-09-09Auto merge of #36324 - nrc:save-docs, r=eddybbors-19/+139
save-analysis bits and pieces
2016-09-08Refactor `TyStruct`/`TyEnum`/`TyUnion` into `TyAdt`Vadim Petrochenkov-6/+6
2016-09-07save-analysis: strip /// or whatever from doc commentsNick Cameron-1/+2
2016-09-07save-analysis: only emit type in the value for variablesNick Cameron-4/+7
2016-09-07save-analysis: tweak the type value for functionsNick Cameron-2/+2
2016-09-07save-analysis: add a `kind` tag to JSON dumpsNick Cameron-1/+14
2016-09-07save-analysis: add docs dataNick Cameron-13/+116
2016-09-06Auto merge of #36288 - nrc:save-var-value, r=eddybbors-7/+15
save-analysis: some refinement to the value string for variables
2016-09-06save-analysis: some refinement to the value string for variablesNick Cameron-7/+15
2016-09-04Auto merge of #36203 - petrochenkov:uvsdot, r=nrcbors-13/+14
Replace `_, _` with `..` in patterns This is how https://github.com/rust-lang/rust/issues/33627 looks in action. Looks especially nice in leftmost/rightmost positions `(first, ..)`/`(.., last)`. I haven't touched libsyntax intentionally because the feature is still unstable.
2016-09-04Auto merge of #36132 - nrc:save-std, r=@eddybbors-79/+593
Add --Zsave-analysis-api This is a save-analysis variation which can be used with libraries distributed without their source (e.g., libstd). It will allow IDEs and other tools to get info about types and create URLs to docs and source, without the unnecessary clutter of internal-only save-analysis info. I'm sure we'll iterate somewhat on the design, but this is a first draft.
2016-09-04Replace `_, _` with `..`Vadim Petrochenkov-9/+9
2016-09-04Replace `_, _, _` with `..`Vadim Petrochenkov-4/+5
2016-09-03Some better support for unions through the compilerVadim Petrochenkov-2/+3
2016-09-03Add unions to definition mapVadim Petrochenkov-0/+1
2016-09-01save-analysis: add parent info to api dumpsNick Cameron-69/+110
The parent id is used for constructing rustdoc URLs by clients
2016-09-01Thread visibility info through save-analysis and filter save-analysis-api on it.Nick Cameron-122/+235
2016-09-01JsonApiDumperNick Cameron-1/+359
2016-09-01save-analsysis: add save-analysis-api CLI flagNick Cameron-1/+3
2016-08-21Refactor away variant `ast::PathListItemKind::Mod`Jeffrey Seyfried-12/+5
and refactor `ast::PathListItemKind::Ident` -> `ast::PathListItem_`.
2016-08-17rustc: remove SelfSpace from ParamSpace.Eduard Burtescu-1/+1
2016-08-17rustc: reduce Substs and Generics to a simple immutable API.Eduard Burtescu-2/+1
2016-08-13Remove obsolete divergence related stuffAndrew Cann-1/+0
Replace FnOutput with Ty Replace FnConverging(ty) with ty Purge FnDiverging, FunctionRetTy::NoReturn and FunctionRetTy::None
2016-07-25Fixed missing comma in the csv dumper.Andrea Pretto-1/+1
2016-07-12Fix fallout.Jeffrey Seyfried-1/+1
2016-07-06Rollup merge of #34327 - nrc:save-fix-tuple, r=jseyfriedSteve Klabnik-1/+9
save-analysis: fix a bug with tuple sub-expressions
2016-07-03prefer `if let` to match with `None => {}` arm in some placesZack M. Davis-6/+4
This is a spiritual succesor to #34268/8531d581, in which we replaced a number of matches of None to the unit value with `if let` conditionals where it was judged that this made for clearer/simpler code (as would be recommended by Manishearth/rust-clippy's `single_match` lint). The same rationale applies to matches of None to the empty block.
2016-06-26Rollup merge of #34316 - jseyfried:refactor_ast_stmt, r=eddybJeffrey Seyfried-2/+1
Refactor away `ast::Decl`, refactor `ast::Stmt`, and rename `ast::ExprKind::Again` to `ast::ExprKind::Continue`.
2016-06-26Rollup merge of #33943 - jseyfried:libsyntax_cleanup, r=nrcJeffrey Seyfried-2/+2
Miscellaneous low priority cleanup in `libsyntax`.
2016-06-25Rollup merge of #34403 - jonathandturner:move_liberror, r=alexcrichtonJeffrey Seyfried-5/+10
This PR refactors the 'errors' part of libsyntax into its own crate (librustc_errors). This is the first part of a few refactorings to simplify error reporting and potentially support more output formats (like a standardized JSON output and possibly an --explain mode that can work with the user's code), though this PR stands on its own and doesn't assume further changes. As part of separating out the errors crate, I have also refactored the code position portion of codemap into its own crate (libsyntax_pos). While it's helpful to have the common code positions in a separate crate for the new errors crate, this may also enable further simplifications in the future.
2016-06-25Rollup merge of #34368 - petrochenkov:astqpath, r=ManishearthJeffrey Seyfried-2/+1
The AST part of https://github.com/rust-lang/rust/pull/34365 plugin-[breaking-change] cc https://github.com/rust-lang/rust/issues/31645
2016-06-25Rollup merge of #34213 - josephDunne:trait_item_macros, r=jseyfriedJeffrey Seyfried-1/+2
**syntax-[breaking-change]** cc #31645 New `TraitItemKind::Macro` variant This change adds support for macro expansion inside trait items by adding the new `TraitItemKind::Macro` and associated parsing code.
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-5/+10
2016-06-20Merge PatKind::QPath into PatKind::Path in ASTVadim Petrochenkov-2/+1
2016-06-17save-analysis: fix a bug with tuple sub-expressionsNick Cameron-1/+9
2016-06-17Fix falloutJeffrey Seyfried-2/+1
2016-06-17Rollup merge of #34298 - nrc:save-parent, r=eddybManish Goregaokar-35/+127
save-analysis: some tweaks
2016-06-16Add an abs_path member to FileMap, use it when writing debug info.Ted Mielczarek-1/+1
When items are inlined from extern crates, the filename in the debug info is taken from the FileMap that's serialized in the rlib metadata. Currently this is just FileMap.name, which is whatever path is passed to rustc. Since libcore and libstd are built by invoking rustc with relative paths, they wind up with relative paths in the rlib, and when linked into a binary the debug info uses relative paths for the names, but since the compilation directory for the final binary, tools trying to read source filenames will wind up with bad paths. We noticed this in Firefox with source filenames from libcore/libstd having bad paths. This change stores an absolute path in FileMap.abs_path, and uses that if available for writing debug info. This is not going to magically make debuggers able to find the source, but it will at least provide sensible paths.
2016-06-16save-analysis: add a decl_id for methodsNick Cameron-17/+50
This is non-null if the method is in a (non-inherent) impl and in that case will be the id for the method declaration in the implemented trait.
2016-06-14Remove the type parameter from `syntax::visit::Visitor`Jeffrey Seyfried-2/+2
2016-06-13Add support for macro expansion inside trait itemsJoseph Dunne-1/+2
2016-06-11save-analysis: some refinements to JSON dataNick Cameron-18/+77
Split variable and function kinds to give more information. Give children for methods, structs, enums, and traits.
2016-06-10Introduce TyCtxt::expect_def/expect_resolution helpers and use them where ↵Vadim Petrochenkov-38/+12
possible
2016-05-29Auto merge of #33859 - nrc:save-field-sub, r=pnkfelixbors-3/+9
save-analysis: be a bit more defensive with field sub-expressions Prevents an ice with `(...).f` since the sub-expression is in the AST but not the HIR. We could actually do better in this specific case, but it doesn't seem worth it.
2016-05-27Auto merge of #33800 - nrc:save-fn-name, r=eddybbors-3/+2
save-analysis: use a function's short name
2016-05-26Implement `..` in tuple (struct) patternsVadim Petrochenkov-1/+1
2016-05-25save-analysis: be a bit more defensive with field sub-expressionsNick Cameron-3/+9
Prevents an ice with `(...).f` since the sub-expression is in the AST but not the HIR. We could actually do better in this specific case, but it doesn't seem worth it.
2016-05-23save-analysis: use a function's short nameNick Cameron-3/+2