about summary refs log tree commit diff
path: root/src/librustc_resolve
AgeCommit message (Collapse)AuthorLines
2019-07-01Auto merge of #61682 - Centril:stabilize-type_alias_enum_variants, ↵bors-1/+1
r=petrochenkov Stabilize `type_alias_enum_variants` in Rust 1.37.0 Stabilize `#![feature(type_alias_enum_variants)]` which allows type-relative resolution with highest priority to `enum` variants in both expression and pattern contexts. For example, you may now write: ```rust enum Option<T> { None, Some(T), } type OptAlias<T> = Option<T>; fn work_on_alias(x: Option<u8>) -> u8 { match x { OptAlias::Some(y) => y + 1, OptAlias::None => 0, } } ``` Closes https://github.com/rust-lang/rfcs/issues/2218 Closes https://github.com/rust-lang/rust/issues/52118 r? @petrochenkov
2019-06-30Feature gate `rustc` attributes harderVadim Petrochenkov-4/+15
2019-06-30Make sure `#[rustc_doc_only_macro]` and other rustc attributes are registeredVadim Petrochenkov-10/+2
2019-06-25Rollup merge of #62078 - petrochenkov:nosendync2, r=varkorMazdak Farrokhzad-0/+6
Remove built-in derive macros `Send` and `Sync` Closes https://github.com/rust-lang/rust/issues/62050
2019-06-25rustc: produce AST instead of HIR from `hir::lowering::Resolver` methods.Eduard-Mihai Burtescu-27/+15
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-24Auto merge of #62075 - Centril:guardless-match-arms, r=petrochenkovbors-1/+1
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 built-in derive macros `Send` and `Sync`Vadim Petrochenkov-0/+6
2019-06-23Remove redundant syntax::ast::Guard.Mazdak Farrokhzad-1/+1
2019-06-23let_chains: Fuse PatternSource::Let & ::LetExpr.Mazdak Farrokhzad-5/+3
2019-06-23let_chains: Handle in resolve.Mazdak Farrokhzad-38/+24
2019-06-19Rollup merge of #61898 - petrochenkov:sekind, r=eddybMazdak Farrokhzad-27/+47
syntax: Factor out common fields from `SyntaxExtension` variants And some other related cleanups. Continuation of https://github.com/rust-lang/rust/pull/61606. This will also help to unblock https://github.com/rust-lang/rust/pull/61877.
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-10/+10
2019-06-18resolve/expand: Move expansion info setting to a single earlier pointVadim Petrochenkov-5/+26
2019-06-18syntax: Move `default_transparency` into `ExpnInfo`Vadim Petrochenkov-1/+0
2019-06-18resolve: Avoid creating fresh syntax extensions for all non-macro attributesVadim Petrochenkov-11/+16
2019-06-18syntax: Factor out common fields from `SyntaxExtension` variantsVadim Petrochenkov-24/+19
2019-06-15Stabilize type_alias_enum_variants.Mazdak Farrokhzad-1/+1
2019-06-15Rollup merge of #61813 - matthewjasper:remove-unnecessary-symbol-ops, ↵Mazdak Farrokhzad-27/+22
r=petrochenkov Remove some unnecessary symbol interner ops * Don't gensym symbols that don't need to worry about colliding with other symbols * Use symbol constants instead of interning string literals in a few places. * Don't generate a module in `__register_diagnostic` r? @petrochenkov
2019-06-14Use `sym` constansts for `PrimitiveTypeTable` keysMatthew Jasper-25/+20
2019-06-14Avoid some unnecessary symbol interner operationsMatthew Jasper-2/+2
2019-06-11Auto merge of #61741 - Centril:rollup-fgro5kz, r=Centrilbors-3/+2
Rollup of 11 pull requests Successful merges: - #61518 (Add loops to doc list of things not stable in const fn) - #61526 (move some tests into subfolders) - #61550 (Windows 10 SDK is also required now.) - #61606 (Remove some legacy proc macro flavors) - #61652 (Mention slice patterns in array) - #61686 (librustc_errors: Add some more documentation) - #61698 (typeck: Fix const generic in repeat param ICE.) - #61707 (Azure: retry failed awscli installs) - #61715 (make sure make_ascii_lowercase actually leaves upper-case non-ASCII characters alone) - #61724 (core: use memcmp optimization for 128 bit integer slices) - #61726 (Use `for_each` in `Iterator::partition`) Failed merges: r? @ghost
2019-06-11Add deny(unused_lifetimes) to all the crates that have deny(internal).Eduard-Mihai Burtescu-0/+1
2019-06-10syntax: Rename variants of `SyntaxExtension` for consistencyVadim Petrochenkov-2/+2
2019-06-10syntax: Remove `SyntaxExtension::DeclMacro`Vadim Petrochenkov-2/+1
It's a less powerful duplicate of `SyntaxExtension::NormalTT`
2019-06-06syntax: Use `Token` in visitors and fix a mut visitor testVadim Petrochenkov-3/+3
2019-06-06syntax: Rename `Token` into `TokenKind`Vadim Petrochenkov-2/+2
2019-06-06Always use token kinds through `token` module rather than `Token` typeVadim Petrochenkov-1/+1
2019-06-05Addressed points raised in review.Alexander Regueiro-1/+1
2019-06-05Enabled `Self` in type aliases.Alexander Regueiro-1/+11
2019-06-05Aggregation of drive-by cosmetic changes.Alexander Regueiro-7/+9
2019-06-05Add `modernize_and_adjust` methods.Nicholas Nethercote-4/+2
These combine two `HygieneData::with` calls into one.
2019-06-05Move `modern` calls inside `glob_adjust` and `reverse_glob_adjust`.Nicholas Nethercote-6/+4
2019-06-03syntax: revert `ast::AsyncArgument` and associated changes.Eduard-Mihai Burtescu-52/+20
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: collect upvars from HIR, instead of during name resolution.Eduard-Mihai Burtescu-56/+13
2019-06-01rustc_resolve: never push `ClosureRibKind` to `label_ribs`.Eduard-Mihai Burtescu-10/+13
2019-06-01rustc: remove Res::Upvar.Eduard-Mihai Burtescu-21/+14
2019-06-01rustc: remove `has_parent` from `hir::Upvar`.Eduard-Mihai Burtescu-9/+1
2019-06-01rustc: remove closure ID from Res::Upvar.Eduard-Mihai Burtescu-1/+1
2019-06-01rustc: use indexmap instead of a plain vector for upvars.Eduard-Mihai Burtescu-20/+11
2019-06-01rustc: remove the closure ID from hir::Upvar's parent field.Eduard-Mihai Burtescu-4/+4
2019-06-01rustc: remove the index field from Res::Upvar.Eduard-Mihai Burtescu-7/+6
2019-06-01rustc: replace Res in hir::Upvar with only Local/Upvar data.Eduard-Mihai Burtescu-7/+11
2019-05-30Auto merge of #61253 - nnethercote:avoid-hygiene_data-lookups, r=petrochenkovbors-5/+5
Avoid `hygiene_data` lookups These commits mostly introduce compound operations that allow two close adjacent `hygiene_data` lookups to be combined. r? @petrochenkov
2019-05-29Introduce and use `SyntaxContext::outer_expn_info()`.Nicholas Nethercote-3/+3
It reduces two `hygiene_data` accesses to one on some hot paths.
2019-05-29Introduce and use `Mark::outer_is_descendant_of()`.Nicholas Nethercote-2/+2
It reduces two `hygiene_data` accesses to one on some hot paths.
2019-05-29Rename `TraitOrImpl` to `Assoc` and `trait_or_impl` to `assoc`.Eduard-Mihai Burtescu-6/+6
2019-05-26Rename "Associated*" to "Assoc*"Andrew Xu-12/+12
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-22Restore the old behavior of the rustdoc keyword check + Fix rebaseVadim Petrochenkov-1/+1
2019-05-22Eliminate unnecessary `Ident::with_empty_ctxt`sVadim Petrochenkov-4/+4