summary refs log tree commit diff
path: root/src/librustc_resolve
AgeCommit message (Collapse)AuthorLines
2016-02-26Auto merge of #31857 - jseyfried:fix_scoping, r=nikomatsakisbors-19/+27
This fixes a bug (#31845) introduced in #31105 in which lexical scopes contain items from all anonymous module ancestors, even if the path to the anonymous module includes a normal module: ```rust fn f() { fn g() {} mod foo { fn h() { g(); // This erroneously resolves on nightly } } } ``` This is a [breaking-change] on nightly but not on stable or beta. r? @nikomatsakis
2016-02-24Improve unused import detectionJeffrey Seyfried-4/+6
2016-02-24Uncapitalize note messagesJeffrey Seyfried-2/+2
2016-02-24Resolve: include normal modules in the ribsJeffrey Seyfried-15/+21
2016-02-24Warn when reexporting a private extern crateJeffrey Seyfried-8/+17
2016-02-24Fix the visibility of extern crate declarations and stop warning on pub ↵Jeffrey Seyfried-16/+53
extern crate
2016-02-22Auto merge of #31811 - alexcrichton:clean-deps, r=sanxiynbors-0/+1
The standard library doesn't depend on rustc_bitflags, so move it to explicit dependencies on all other crates. Additionally, the arena/fmt_macros deps could be dropped from libsyntax.
2016-02-21rustbuild: Sync some Cargo.toml/lib.rs dependenciesAlex Crichton-0/+1
The standard library doesn't depend on rustc_bitflags, so move it to explicit dependencies on all other crates. Additionally, the arena/fmt_macros deps could be dropped from libsyntax.
2016-02-20Auto merge of #31747 - jseyfried:stop_resolve_after_fail, r=nrcbors-70/+35
Now that #31461 is merged, a failing resolution can never become indeterminate or succeed, so we no longer have to keep trying to resolve failing import directives. r? @nrc
2016-02-20Auto merge of #31674 - VladUreche:issue/21221, r=nikomatsakisbors-32/+237
This commit adds functionality that allows the name resolution pass to search for entities (traits/types/enums/structs) by name, in order to show recommendations along with the errors. For now, only E0405 and E0412 have suggestions attached, as per the request in bug #21221, but it's likely other errors can also benefit from the ability to generate suggestions.
2016-02-19Auto merge of #31742 - frewsxcv:needless-lifetimes, r=pnkfelixbors-3/+3
These explicit lifetimes can be ommitted because of lifetime elision rules. Instances were found using rust-clippy.
2016-02-19Auto merge of #31716 - jseyfried:fix_privacy_for_def_err, r=nrcbors-0/+3
Fixes #31714
2016-02-19Improve dummy bindings for unresolved importsJeffrey Seyfried-0/+2
2016-02-19Show candidates for names not in scopeVlad Ureche-32/+237
This commit adds functionality that allows the name resolution pass to search for entities (traits/types/enums/structs) by name, in order to show recommendations along with the errors. For now, only E0405 and E0412 have suggestions attached, as per the request in bug #21221, but it's likely other errors can also benefit from the ability to generate suggestions.
2016-02-18Remove unnecessary explicit lifetime bounds.Corey Farwell-3/+3
These explicit lifetimes can be ommitted because of lifetime elision rules. Instances were found using rust-clippy.
2016-02-18Replace the field `imports` in Module with `unresolved_imports` and refactor ↵Jeffrey Seyfried-56/+16
away `resolved_import_count`
2016-02-17Stop trying to resolve an import directive after the resolution failsJeffrey Seyfried-16/+21
2016-02-17Rollup merge of #31679 - GuillaumeGomez:long_error_explanation, r=ManishearthSteve Klabnik-40/+42
r? @Manishearth
2016-02-17Auto merge of #31685 - petrochenkov:patrefact2, r=eddybbors-16/+12
And split `PatKind::Enum` into `PatKind::TupleStruct` and `PatKind::Path`. This is the HIR part of https://github.com/rust-lang/rust/pull/31581. This is also kind of a preparation for https://github.com/rust-lang/rfcs/pull/1492. r? @eddyb
2016-02-16Don't compute LastPrivate data for Def::Err.Jeffrey Seyfried-0/+1
2016-02-16Split PatKind::Enum into PatKind::TupleStruct and PatKind::PathVadim Petrochenkov-8/+5
2016-02-15Global error explanations improvementsggomez-40/+42
2016-02-15Auto merge of #31648 - jseyfried:fix_diagnostics, r=nrcbors-88/+38
This PR fixes two unrelated diagnostics bugs in resolve. First, it reports privacy errors for an import only after the import resolution is determined, fixing #31402. Second, it expands the per-module map from block ids to anonymous modules so that it also maps module declarations ids to modules, and it uses this map to in `with_scope` to fix #31644. r? @nrc
2016-02-15Auto merge of #31566 - jseyfried:fix_regression, r=nrcbors-0/+1
This fixes a regression caused by #31461 allowing extern crates to be glob imported, and it fixes the test that was supposed to catch it. r? @nrc
2016-02-14Rename hir::Pat_ and its variantsVadim Petrochenkov-11/+10
2016-02-14Rename Module field anonymous_children to module_children, expand it to ↵Jeffrey Seyfried-64/+14
include both named an anonymous modules, and fix #31644
2016-02-14Rename Module field children to resolutionsJeffrey Seyfried-8/+8
2016-02-13Report privacy errors at most once per import (fixes #31402)Jeffrey Seyfried-17/+17
2016-02-13Auto merge of #31524 - jonas-schievink:autoderef, r=steveklabnikbors-40/+40
2016-02-12Autoderef in librustc_resolveJonas Schievink-40/+40
2016-02-12Auto merge of #30726 - GuillaumeGomez:compile-fail, r=brsonbors-67/+94
r? @brson cc @alexcrichton I still need to add error code explanation test with this, but I can't figure out a way to generate the `.md` files in order to test example source codes. Will fix #27328.
2016-02-11bootstrap: Add a bunch of Cargo.toml filesAlex Crichton-0/+16
These describe the structure of all our crate dependencies.
2016-02-11[breaking-change] don't glob export ast::{UintTy, IntTy} variantsOliver Schneider-12/+11
2016-02-11[breaking-change] don't glob export ast::FloatTy variantsOliver Schneider-4/+4
2016-02-11Fix regression from #31461 and fix the test that was supposed to catch it.Jeffrey Seyfried-0/+1
2016-02-09Allow prelude imports to shadow eachother (needed for the [pretty] tests)Jeffrey Seyfried-9/+3
Derive the Default impl for NameResolution
2016-02-08Reallow methods from traits that are shadowed by non-import itemsJeffrey Seyfried-2/+26
2016-02-08Refactor away add_export and cleanup the end of resolve_single_importJeffrey Seyfried-52/+25
2016-02-08Replace children and import_resolutions with a single NameResolution-valued map.Jeffrey Seyfried-499/+221
Refactor away resolve_name_in_module in resolve_imports.rs Rewrite and improve the core name resolution procedure in NameResolution::result and Module::resolve_name Refactor the duplicate checking code into NameResolution::try_define
2016-02-08Change try_define_child to return a Result instead of an OptionJeffrey Seyfried-6/+6
2016-02-08Write and use increment_outstanding_references_for and ↵Jeffrey Seyfried-19/+27
decrement_outstanding_references_for
2016-02-08Refactor away the fields id and is_public of ImportResolution and rename ↵Jeffrey Seyfried-65/+49
ImportResolution to NameResolution
2016-02-08Refactor away separate tracking of used_public and used_reexport.Jeffrey Seyfried-48/+37
NameBinding now encodes these directly with binding.is_public() and (binding.is_public() && binding.is_import()) (respectively)
2016-02-08Expand NameBinding to better represent bindings from importsJeffrey Seyfried-21/+45
2016-02-08Add and use an arena for `NameBinding`sJeffrey Seyfried-40/+48
2016-02-08Refactor away TargetJeffrey Seyfried-95/+75
2016-02-08Make resolve_name_in_module solely responsible for tracking used crates in ↵Jeffrey Seyfried-12/+6
lib.rs
2016-02-07Update long error explanationsGuillaume Gomez-67/+94
2016-02-05Instrument a bunch of tasks that employ the HIR map in one way orNiko Matsakis-0/+10
another and were not previously instrumented.
2016-02-03Remove unneeded borrows and slicesJeffrey Seyfried-15/+15