about summary refs log tree commit diff
path: root/src/librustc_resolve/build_reduced_graph.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-1440/+0
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-2/+2
2020-08-15replaced log with tracingGurpreet Singh-1/+1
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-13/+14
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
2020-07-26Hygiene serialization implementationAaron Hill-4/+4
2020-07-16unwrap() -> expect()Joshua Nelson-6/+11
2020-07-14Suggest struct pat on incorrect unit or tuple patEsteban Küber-3/+3
When encountering a unit or tuple pattern for a struct-like item, suggest using the correct pattern. Use `insert_field_names_local` when evaluating variants and store field names even when the list is empty in order to produce accurate structured suggestions.
2020-07-01Remove `token::FlattenGroup`Vadim Petrochenkov-1/+1
2020-06-27Rename two `Resolver` traitsVadim Petrochenkov-1/+1
2020-06-26proc_macro: Stop flattening groups with dummy spansVadim Petrochenkov-1/+1
2020-06-21Move remaining `NodeId` APIs from `Definitions` to `Resolver`marmeladema-39/+28
2020-06-18Rollup merge of #73320 - estebank:type-param-sugg-more, r=davidtwcoManish Goregaokar-0/+1
Make new type param suggestion more targetted Do not suggest new type param when encountering a missing type in an ADT field with generic parameters. Fix #72640.
2020-06-17review commentsEsteban Küber-1/+1
2020-06-13Make new type param suggestion more targettedEsteban Küber-0/+1
Do not suggest new type param when encountering a missing type in an ADT field with generic parameters. Fix #72640.
2020-06-11Remove associated opaque typesMatthew Jasper-2/+1
They're unused now.
2020-06-11Stop special casing top level TAITMatthew Jasper-6/+5
2020-06-06Add comments to `Resolve::get_module`Joshua Nelson-0/+6
2020-05-29Remove remaining calls to `as_local_node_id`marmeladema-7/+13
2020-05-27Store `LocalDefId` directly in `rustc_resolve::Resolver` where possiblemarmeladema-6/+7
This commit also include the following changes: * Remove unused `hir::Map::as_local_node_id` method * Remove outdated comment about `hir::Map::local_def_id` method * Remove confusing `GlobMap` type alias * Use `LocalDefId` instead of `DefId` in `extern_crate_map` * Use `LocalDefId` instead of `DefId` in `maybe_unused_extern_crates` * Modify `extern_mod_stmt_cnum` query to accept a `LocalDefId` instead of a `DefId`
2020-05-22Remove `macro_defs` mapAaron Hill-2/+2
We store store the `DefId` directly in `ExpnData`. This will allow us to serialize `ExpnData` in PR #72121 without needing to manage a side table.
2020-05-19Add error recovery for `use foo::self`mibac138-1/+9
2020-05-19Suggest fixes for `use foo::self`mibac138-2/+17
2020-05-08Remove ast::{Ident, Name} reexports.Camille GILLOT-4/+3
2020-04-24Remove `Option` from the return type of `def_kind`.Eduard-Mihai Burtescu-1/+2
2020-04-24add a few more DefKindsmark-1/+14
make Map::def_kind take LocalDefId Co-Authored-By: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> crates are DefKind::Mod
2020-04-19Dogfood more or_patterns in the compilerJosh Stone-23/+24
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-1/+1
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-08librustc_resolve: fixup nit in previous commitmarmeladema-3/+3
2020-04-08librustc_hir: return LocalDefId instead of DefId in local_def_idmarmeladema-26/+41
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-4/+4
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-4/+4
2020-03-24Rollup merge of #70077 - Aaron1011:feature/new-def-path-ident, r=petrochenkovMazdak Farrokhzad-1/+4
Store idents for `DefPathData` into crate metadata Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in a side table, which gets encoded into the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for #68686, since throwing away a `Span` means that we lose hygiene information.
2020-03-23resolve: Do not resolve visibilities on proc macro definitions twiceVadim Petrochenkov-1/+8
2020-03-22Store idents for `DefPathData` into crate metadataAaron Hill-1/+4
Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for #68686, since throwing away a `Span` means that we lose hygiene information.
2020-03-21make some let-if-bindings more idiomatic (clippy::useless_let_if_seq)Matthias Krüger-5/+7
2020-03-16hygiene: `modern` -> `normalize_to_macros_2_0`Vadim Petrochenkov-6/+9
`modern_and_legacy` -> `normalize_to_macro_rules`
2020-03-16Other `legacy` -> `macro_rules`Vadim Petrochenkov-5/+5
2020-03-16resolve: `Legacy(Scope,Binding)` -> `MacroRules(Scope,Binding)`Vadim Petrochenkov-17/+17
2020-03-16ast/hir: `MacroDef::legacy` -> `MacroDef::macro_rules`Vadim Petrochenkov-3/+3
2020-03-15Rollup merge of #69589 - petrochenkov:maccall, r=CentrilMazdak Farrokhzad-12/+12
ast: `Mac`/`Macro` -> `MacCall` It's now obvious that these refer to macro calls rather than to macro definitions. It's also a single name instead of two different names in different places. `rustc_expand` usually calls macro calls in a wide sense (including attributes and derives) "macro invocations", but structures and variants renamed in this PR are only relevant to fn-like macros, so it's simpler and clearer to just call them calls. cc https://github.com/rust-lang/rust/pull/63586#discussion_r314232513 r? @eddyb
2020-03-12ast: `Mac`/`Macro` -> `MacCall`Vadim Petrochenkov-12/+12
2020-03-12Rollup merge of #69674 - mark-i-m:assoc-fn, r=matthewjasperMazdak Farrokhzad-3/+3
Rename DefKind::Method and TraitItemKind::Method r? @eddyb, @Centril, or @matthewjasper cc #69498 #60163
2020-03-07resolve: `directive` -> `import`Vadim Petrochenkov-30/+21
2020-03-07resolve: `ImportDirective` -> `Import`Vadim Petrochenkov-21/+17
`ImportDirectiveSubclass` -> `ImportKind` `ImportKind::SingleImport` -> `ImportKind::Single` `ImportKind::GlobImport` -> `ImportKind::Glob`
2020-03-03DefKind::Method -> DefKind::AssocFnMark Mansi-3/+3
2020-03-01ast: Unmerge structures for associated items and foreign itemsVadim Petrochenkov-3/+2
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-5/+5
2020-02-27use char instead of &str for single char patternsMatthias Krüger-1/+1
2020-02-24parse/ast: move `Defaultness` into variants.Mazdak Farrokhzad-2/+2
2020-02-22parse: allow `type Foo: Ord` syntactically.Mazdak Farrokhzad-2/+2