about summary refs log tree commit diff
path: root/src/librustc_resolve
AgeCommit message (Collapse)AuthorLines
2018-11-18resolve: Check resolution consistency for import paths and multi-segment ↵Vadim Petrochenkov-137/+199
macro paths
2018-11-18resolve: Resolve single-segment imports using in-scope resolution on 2018 ↵Vadim Petrochenkov-121/+133
edition
2018-11-18resolve: More precise determinacy tracking during import/macro resolutionVadim Petrochenkov-127/+160
2018-11-18resolve: Improve diagnostics for resolution ambiguitiesVadim Petrochenkov-134/+291
2018-11-18resolve: Simplify ambiguity checking for built-in attributesVadim Petrochenkov-11/+2
2018-11-18resolve: Resolve multi-segment imports using in-scope resolution on 2018 editionVadim Petrochenkov-66/+47
2018-11-18resolve: Stop generating uniform path canariesVadim Petrochenkov-269/+13
2018-11-12Make `NodeId` a `newtype_index` to enable niche optimizationsOliver Scherer-1/+1
2018-11-11Rollup merge of #55630 - petrochenkov:noprelude, r=Centrilkennytm-4/+8
resolve: Filter away macro prelude in modules with `#[no_implicit_prelude]` on 2018 edition This is a tiny thing. For historical reasons macro prelude (macros from `#[macro_use] extern crate ...`, including `extern crate std`) is still available in modules with `#[no_implicit_prelude]`. This PR provides proper isolation and removes those names from scope. `#[no_implicit_prelude]` modules still have built-in types (`u8`), built-in attributes (`#[inline]`) and built-in macros (`env!("PATH")`) in scope. We can introduce some `#[no_implicit_prelude_at_all]` to remove those as well, but that's a separate issue. The change is done only on 2018 edition for backward compatibility. I'm pretty sure this can be done on 2015 as well because `#[no_implicit_prelude]` is rarely used, but I don't want to go through the crater/deprecation process right now, maybe later. cc https://github.com/rust-lang/rust/issues/53977 r? @ghost
2018-11-07Rollup merge of #55734 - teresy:shorthand-fields, r=davidtwcokennytm-2/+2
refactor: use shorthand fields refactor: use shorthand for single fields everywhere (excluding tests).
2018-11-06refactor: use shorthand fieldsteresy-2/+2
2018-11-06Rollup merge of #55490 - petrochenkov:resolveice, r=eddybkennytm-0/+3
resolve: Fix ICE in macro import error recovery Fixes https://github.com/rust-lang/rust/issues/55457
2018-11-04Auto merge of #55569 - durka:must-use-external-macro, r=alexcrichtonbors-8/+4
enforce unused-must-use lint in macros Fixes #55516 by turning on the UNUSED_MUST_USE lint within macros.
2018-11-03Added support for trait aliases as object types.Alexander Regueiro-4/+7
2018-11-03Added support for trait aliases as bounds.Alexander Regueiro-2/+2
2018-11-03resolve: Filter away macro prelude in modules with `#[no_implicit_prelude]` ↵Vadim Petrochenkov-4/+8
on 2018 edition
2018-11-02remove unused result in resolveAlex Burka-8/+4
2018-11-01Rollup merge of #55536 - ljedrz:don't_collect_suggestions, r=davidtwcoPietro Albini-1/+1
Pass suggestions as impl Iterator instead of Vec This avoids some allocations when throwing errors, making failing faster ^^.
2018-10-31Pass suggestions as impl Iterator instead of Vecljedrz-1/+1
2018-10-31save-analysis: make sure we save the def for the last segment of a pathNick Cameron-9/+13
2018-10-30resolve: Fix ICE in macro import error recoveryVadim Petrochenkov-0/+3
2018-10-28Add note linking to Rust 2018 path semantics docs.David Wood-29/+61
This commit extends existing path suggestions to link to documentation on the changed semantics of `use` in Rust 2018.
2018-10-28resolve: Desugar empty import groups into synthetic dummy importsVadim Petrochenkov-69/+36
so that they are correctly resolved on 2018 edition
2018-10-28resolve: Make sure macros and imports are resolved in full parent scopeVadim Petrochenkov-86/+83
Slightly simplify `fn build_reduced_graph_for_use_tree`
2018-10-28resolve: More precise spans for privacy errorsVadim Petrochenkov-5/+7
2018-10-28resolve: Absolute paths may be undetermined on 2018 editionVadim Petrochenkov-0/+3
due to macro-expanded `extern crate` items adding names to extern prelude.
2018-10-28resolve: Refactor away `legacy_macro_imports`/`LegacyMacroImports`Vadim Petrochenkov-37/+31
2018-10-28resolve: Record full parent scope data for importsVadim Petrochenkov-46/+52
2018-10-26Remove redundant cloneShotaro Yamada-1/+1
2018-10-26more reviewer changesNick Cameron-8/+4
2018-10-26Fix tests and assertions; add some commentsNick Cameron-5/+6
2018-10-26rebasing and reviewer changesNick Cameron-131/+156
Primarily refactoring `(Ident, Option<NodeId>)` to `Segment`
2018-10-26dump refs for path segments in save-analysisNick Cameron-14/+17
Requires adding path segments to the hir map
2018-10-26Store a resolved def on hir::PathSegmentNick Cameron-106/+165
2018-10-24Prohibit macro-expanded `extern crate` items shadowing crates passed with ↵Vadim Petrochenkov-2/+15
`--extern`
2018-10-24Feature gate extern prelude additions from `extern crate` itemsVadim Petrochenkov-5/+21
Fix rustdoc and fulldeps tests
2018-10-24Add `extern crate` items to extern preludeVadim Petrochenkov-67/+81
2018-10-23Auto merge of #55113 - mockersf:master, r=estebankbors-25/+46
#45829 when a renamed import conflict with a previous import Fix the suggestion when a renamed import conflict. It check if the snipped contains `" as "`, and if so uses everything before for the suggestion.
2018-10-22better dummy span detection and remove redundant branchFrançois Mockers-14/+13
2018-10-21manage cases with tabs or other whitespacesFrançois Mockers-25/+44
2018-10-20Auto merge of #55014 - ljedrz:lazyboye_unwraps, r=matthewjasperbors-1/+1
Prefer unwrap_or_else to unwrap_or in case of function calls/allocations The contents of `unwrap_or` are evaluated eagerly, so it's not a good pick in case of function calls and allocations. This PR also changes a few `unwrap_or`s with `unwrap_or_default`. An added bonus is that in some cases this change also reveals if the object it's called on is an `Option` or a `Result` (based on whether the closure takes an argument).
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-13/+7
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-37/+37
2018-10-19Rollup merge of #55144 - ljedrz:cleanup_resolve, r=petrochenkovkennytm-143/+116
Cleanup resolve - improve/remove allocations - `truncate` instead of `pop`ping in a loop - improve common patterns
2018-10-19Prefer unwrap_or_else to unwrap_or in case of function calls/allocationsljedrz-1/+1
2018-10-17resolve: improve/remove allocationsljedrz-19/+8
2018-10-17resolve: improve common patternsljedrz-124/+108
2018-10-17resolve: Do not skip extern prelude during speculative resolutionVadim Petrochenkov-3/+9
2018-10-17and style fixFrançois Mockers-2/+5
2018-10-17apply reviewFrançois Mockers-23/+15