summary refs log tree commit diff
path: root/src/librustc_save_analysis
AgeCommit message (Collapse)AuthorLines
2016-11-08Auto merge of #36843 - petrochenkov:dotstab, r=nikomatsakisbors-1/+1
Stabilize `..` in tuple (struct) patterns I'd like to nominate `..` in tuple and tuple struct patterns for stabilization. This feature is a relatively small extension to existing stable functionality and doesn't have known blockers. The feature first appeared in Rust 1.10 6 months ago. An example of use: https://github.com/rust-lang/rust/pull/36203 Closes https://github.com/rust-lang/rust/issues/33627 r? @nikomatsakis
2016-11-03Stabilize `..` in tuple (struct) patternsVadim Petrochenkov-1/+1
2016-11-02rustc: record the target type of every adjustment.Eduard Burtescu-4/+4
2016-11-02rustc: make all read access to tcx.tables go through a method.Eduard Burtescu-8/+7
2016-10-31Changed most vec! invocations to use square bracesiirelu-6/+6
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-10-29save-analysis: change imports to carry a ref id rather than their own node idNick Cameron-4/+4
2016-10-28Rollup merge of #37436 - nrc:save-span-errs, r=petrochenkovGuillaume Gomez-0/+1
Give variant spans used in derives the correct expansion id This fixes a problem in save-analysis where it mistakes a path to a variant as the variant itself. r? @petrochenkov
2016-10-28Give variant spans used in derives the correct expansion idNick Cameron-0/+1
This fixes a problem in save-analysis where it mistakes a path to a variant as the variant itself.
2016-10-27Preparations and cleanupVadim Petrochenkov-1/+2
Diagnostics for struct path resolution errors in resolve and typeck are unified. Self type is treated as a type alias in few places (not reachable yet). Unsafe cell is seen in constants even through type aliases. All checks for struct paths in typeck work on type level.
2016-10-26Rollup merge of #37144 - eulerdisk:fix_37126, r=nrcGuillaume Gomez-3/+1
save_analysis: Dump data only if get_path_data doesn't fail to resolve a path. Solves #37126 Dump data only if `get_path_data` doesn't fail to resolve a path. `get_path_data` returns `None` when it have to deals with `Def::Err`, which is used as placeholder for a failed resolution. Tell me if this is good enough, maybe I have to add some tests ? r? @nrc
2016-10-17Auto merge of #36969 - nnethercote:rename-Parser-fields, r=eddybbors-5/+5
Clarify the positions of the lexer and parser The lexer and parser use unclear names to indicate their positions in the source code. I propose the following renamings. Lexer: ``` pos -> next_pos # it's actually the next pos! last_pos -> pos # it's actually the current pos! curr -> ch # the current char curr_is -> ch_is # tests the current char col (unchanged) # the current column ``` parser ``` - last_span -> prev_span # the previous token's span - last_token_kind -> prev_token_kind # the previous token's kind - LastTokenKind -> PrevTokenKind # ditto (but the type) - token (unchanged) # the current token - span (unchanged) # the current span ``` Things to note: - This proposal removes all uses of "last", which is an unclear word because it could mean (a) previous, (b) final, or (c) most recent, i.e. current. - The "current" things (ch, col, token, span) consistently lack a prefix. The "previous" and "next" things consistently have a prefix.
2016-10-14save-analysis: dump data only if get_path_data doesn't fail to resolve a path.Andrea Pretto-3/+1
Fixes #37126.
2016-10-05Rename Parser::last_span as prev_span.Nicholas Nethercote-5/+5
This is a [breaking-change] for libsyntax.
2016-10-04Turn some impossible definitions into ICEsVadim Petrochenkov-31/+35
2016-10-04Separate Def::StructCtor/Def::VariantCtor from Def::Struct/Def::VariantVadim Petrochenkov-3/+9
2016-10-03std: Stabilize and deprecate APIs for 1.13Alex Crichton-1/+2
This commit is intended to be backported to the 1.13 branch, and works with the following APIs: Stabilized * `i32::checked_abs` * `i32::wrapping_abs` * `i32::overflowing_abs` * `RefCell::try_borrow` * `RefCell::try_borrow_mut` * `DefaultHasher` * `DefaultHasher::new` * `DefaultHasher::default` Deprecated * `BinaryHeap::push_pop` * `BinaryHeap::replace` * `SipHash13` * `SipHash24` * `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map` module Closes #28147 Closes #34767 Closes #35057 Closes #35070
2016-09-20rustc_metadata: group information into less tags.Eduard Burtescu-2/+1
2016-09-20rustc: remove ImplOrTraitItemId and TraitDef's associated_type_names.Eduard Burtescu-10/+4
2016-09-20rustc_metadata: move more RBML tags to auto-serialization.Eduard Burtescu-4/+2
2016-09-20rustc: replace uses of NodeId in Def, other than closures and labels.Eduard Burtescu-1/+2
2016-09-20rustc_metadata: go only through rustc_serialize in astencode.Eduard Burtescu-19/+22
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.