summary refs log tree commit diff
path: root/src/librustc_resolve
AgeCommit message (Collapse)AuthorLines
2018-11-29resolve: Fix false-positives from lint `absolute_paths_not_starting_with_crate`Vadim Petrochenkov-1/+1
2018-11-29resolve: Extern prelude is for type namespace onlyVadim Petrochenkov-1/+3
2018-11-25resolve: Suggest `crate::` for resolving ambiguities when appropriateVadim Petrochenkov-16/+31
More precise spans for ambiguities from macros
2018-11-25resolve: Fallback to extern prelude in 2015 imports used from global 2018 ↵Vadim Petrochenkov-10/+47
edition
2018-11-25resolve: Generalize `early_resolve_ident_in_lexical_scope` slightlyVadim Petrochenkov-82/+77
Flatten `ModuleOrUniformRoot` variants
2018-11-25resolve: Fallback to uniform paths in 2015 imports used from global 2018 editionVadim Petrochenkov-35/+98
2018-11-25resolve: Implement edition hygiene for imports and absolute pathsVadim Petrochenkov-48/+50
Use per-span hygiene in a few other places in resolve Prefer `rust_2015`/`rust_2018` helpers to comparing editions
2018-11-25resolve: Fix some more asserts in import validationVadim Petrochenkov-1/+2
2018-11-25resolve: Fix bad span arithmetics in import conflict diagnosticsVadim Petrochenkov-5/+5
2018-11-22resolve: Make "empty import canaries" invisible from other cratesVadim Petrochenkov-1/+4
2018-11-22resolve: Fix some asserts in import validationVadim Petrochenkov-2/+4
2018-11-20Stabilize `extern_crate_item_prelude`Vadim Petrochenkov-14/+5
2018-11-20save-analysis: make sure we save the def for the last segment of a pathNick Cameron-9/+13
2018-11-20squashed form of #54145Nick Cameron-140/+227
Give each PathSegment a NodeId Store a resolved def on hir::PathSegment save-analysis: remove hacky, unnecessary code now that we have spans for every ident dump data for prefix path segments dump refs for path segments in save-analysis Requires adding path segments to the hir map Fix tests and rustdoc save-analysis: handle missing field names FIxes https://github.com/rust-lang-nursery/rls/issues/1031 rebasing and reviewer changes Primarily refactoring `(Ident, Option<NodeId>)` to `Segment` Fix tests and assertions; add some comments more reviewer changes
2018-11-17Add a couple more tests + address review commentsVadim Petrochenkov-1/+7
2018-11-17resolve: Refactor away `DeterminacyExt`Vadim Petrochenkov-40/+27
2018-11-17resolve: Future-proof against imports referring to local variables and ↵Vadim Petrochenkov-1/+35
generic parameters
2018-11-17resolve: Avoid sentence breaks in diagnosticsVadim Petrochenkov-13/+13
2018-11-17resolve: Support resolving macros without leaving tracesVadim Petrochenkov-8/+14
2018-11-17resolve: Avoid marking `extern crate` items as used in certain casesVadim Petrochenkov-7/+20
2018-11-17resolve: Reintroduce feature gate for uniform paths in importsVadim Petrochenkov-26/+56
2018-11-17Fix ICEs from imports of items not defined in modulesVadim Petrochenkov-5/+16
2018-11-17resolve: Tweak some articles in ambiguity diagnosticsVadim Petrochenkov-5/+5
2018-11-17resolve: Recover "did you mean" suggestions in importsVadim Petrochenkov-40/+30
2018-11-17resolve: Check resolution consistency for import paths and multi-segment ↵Vadim Petrochenkov-137/+202
macro paths
2018-11-17resolve: Resolve single-segment imports using in-scope resolution on 2018 ↵Vadim Petrochenkov-121/+133
edition
2018-11-17resolve: More precise determinacy tracking during import/macro resolutionVadim Petrochenkov-127/+160
2018-11-17resolve: Improve diagnostics for resolution ambiguitiesVadim Petrochenkov-133/+290
2018-11-17resolve: Simplify ambiguity checking for built-in attributesVadim Petrochenkov-11/+2
2018-11-17resolve: Resolve multi-segment imports using in-scope resolution on 2018 editionVadim Petrochenkov-65/+46
2018-11-17resolve: Stop generating uniform path canariesVadim Petrochenkov-266/+13
2018-11-17resolve: Prohibit relative paths in visibilities on 2018 editionVadim Petrochenkov-1/+12
2018-11-15resolve: Filter away macro prelude in modules with `#[no_implicit_prelude]` ↵Vadim Petrochenkov-4/+8
on 2018 edition
2018-11-07remove unused result in resolveAlex Burka-8/+4
2018-10-29fix errors caused by cherry pickingPietro Albini-28/+20
2018-10-29Add note linking to Rust 2018 path semantics docs.David Wood-31/+63
This commit extends existing path suggestions to link to documentation on the changed semantics of `use` in Rust 2018.
2018-10-29resolve: Desugar empty import groups into synthetic dummy importsVadim Petrochenkov-69/+36
so that they are correctly resolved on 2018 edition
2018-10-29resolve: Make sure macros and imports are resolved in full parent scopeVadim Petrochenkov-65/+74
Slightly simplify `fn build_reduced_graph_for_use_tree`
2018-10-29resolve: More precise spans for privacy errorsVadim Petrochenkov-5/+7
2018-10-29resolve: 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-29resolve: Refactor away `legacy_macro_imports`/`LegacyMacroImports`Vadim Petrochenkov-37/+31
2018-10-29resolve: Record full parent scope data for importsVadim Petrochenkov-45/+52
2018-10-29Remove redundant cloneShotaro Yamada-1/+1
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).