summary refs log tree commit diff
path: root/src/librustc_resolve
AgeCommit message (Collapse)AuthorLines
2016-08-14Rollup merge of #35596 - crypto-universe:E0254_style_and_tests, ↵Eduard-Mihai Burtescu-2/+5
r=jonathandturner Add label to E0254 This issue #35513 is a part of #35233. r? @jonathandturner
2016-08-14Rollup merge of #35558 - lukehinds:master, r=nikomatsakisEduard-Mihai Burtescu-1/+3
Update error message for E0253 #35512 Fixes #35512. Part of #35233.
2016-08-11Auto merge of #35592 - jonathandturner:rollup, r=jonathandturnerbors-1/+4
Rollup of 23 pull requests - Successful merges: #35279, #35331, #35358, #35375, #35445, #35448, #35482, #35486, #35505, #35528, #35530, #35532, #35536, #35537, #35541, #35552, #35554, #35555, #35557, #35562, #35565, #35569, #35576 - Failed merges: #35395, #35415, #35563
2016-08-11Add label to E0254crypto-universe-2/+5
This issue #35513 is a part of #35233. r? @jonathandturner
2016-08-11Fix tidy warningJonathan Turner-1/+2
2016-08-11Rollup merge of #35536 - hank-der-hafenarbeiter:E0433, r=jonathandturnerJonathan Turner-1/+3
Updated E0433 to new error message. (no bonus) Part of #35345 r? @jonathandturner
2016-08-11Substitute private type aliases in rustdocpetrochenkov-0/+1
2016-08-09remove field that need not be publicNiko Matsakis-1/+1
2016-08-09Update error message for E0253 #35512Luke Hinds-1/+3
Fixes #35512. Part of #35233.
2016-08-09Updated E0433 to new error message. (no bonus)hank-der-hafenarbeiter-1/+3
2016-08-07Auto merge of #35362 - medzin:E0252, r=GuillaumeGomezbors-1/+5
Updated error message E0252 Fixes #35306 as part of #35233. r? @GuillaumeGomez
2016-08-06Rollup merge of #35363 - GuillaumeGomez:err_codes, r=jonathandturnerEduard-Mihai Burtescu-1/+40
Err codes r? @jonathandturner
2016-08-06Updated error message E0252Adam Medziński-1/+5
2016-08-05Auto merge of #35116 - jseyfried:groundwork_for_new_import_semantics, r=nrcbors-215/+213
resolve: diagnostics improvement and groundwork for RFC 1560 Fixes #35115, fixes #35135, and lays groundwork for #32213 (cc #35120). r? @nrc
2016-08-05Add new error code testsGuillaume Gomez-0/+1
2016-08-05Update E0404 to new format.Ryan Scott-1/+7
2016-08-05Add E0254 error explanationGuillaume Gomez-1/+39
2016-08-01Refactor `directive.import(binding)` -> `resolver.import(binding, directive)`.Jeffrey Seyfried-19/+23
2016-08-01nit: rename `module_` -> `module`Jeffrey Seyfried-24/+22
2016-08-01Improve diagnostics for pattern bindings that illegally shadow items.Jeffrey Seyfried-15/+19
Improve unused import detection.
2016-08-01Clean up `resolver.record_use()`.Jeffrey Seyfried-21/+11
2016-08-01Refactor `module.try_define_child(..)` -> `resolver.try_define(module, ..)`.Jeffrey Seyfried-69/+75
2016-08-01Refactor away `resolution.try_define()`.Jeffrey Seyfried-18/+15
2016-08-01Refactor away `resolution.report_conflicts()`.Jeffrey Seyfried-22/+12
2016-08-01Implement `Deref` for `ImportResolver` to `Resolver`.Jeffrey Seyfried-53/+62
2016-07-31Make "type aliases cannot be used for traits" a note instead of a span_label.Jeffrey Seyfried-16/+1
2016-07-31Clean up `resolve_trait_reference`.Jeffrey Seyfried-32/+31
2016-07-31Avoid emitting a unhelpful cascading resolution error.Jeffrey Seyfried-0/+2
2016-07-30Rollup merge of #35063 - jseyfried:avoid_importing_inaccessible_names, r=nrcManish Goregaokar-50/+35
resolve: Exclude inaccessible names from single imports If a single import resolves to an inaccessible name in some but not all namespaces, avoid importing the name in the inaccessible namespaces. Currently, the inaccessible namespaces are imported but cause a privacy error when used. r? @nrc
2016-07-27If a single import resolves to an inaccessible name in some but not all ↵Jeffrey Seyfried-50/+35
namespaces, avoid importing the name in the inaccessible namespaces. Currently, the inaccessible namespaces are imported but cause a privacy error when used.
2016-07-21Fix ICE happening when unresolved imports are used in patternsVadim Petrochenkov-2/+2
2016-07-17Rename `mtwt` to `hygiene`Jeffrey Seyfried-2/+2
2016-07-17Clean up and encapsulate `syntax::ext::mtwt`Jeffrey Seyfried-14/+12
2016-07-15Auto merge of #34570 - jseyfried:no_rename, r=nrcbors-29/+164
Simplify the macro hygiene algorithm This PR removes renaming from the hygiene algorithm and treats differently marked identifiers as unequal. This change makes the scope of identifiers in `macro_rules!` items empty. That is, identifiers in `macro_rules!` definitions do not inherit any semantics from the `macro_rules!`'s scope. Since `macro_rules!` macros are items, the scope of their identifiers "should" be the same as that of other items; in particular, the scope should contain only items. Since all items are unhygienic today, this would mean the scope should be empty. However, the scope of an identifier in a `macro_rules!` statement today is the scope that the identifier would have if it replaced the `macro_rules!` (excluding anything unhygienic, i.e. locals only). To continue to support this, this PR tracks the scope of each `macro_rules!` and uses it in `resolve` to ensure that an identifier expanded from a `macro_rules!` gets a chance to resolve to the locals in the `macro_rules!`'s scope. This PR is a pure refactoring. After this PR, - `syntax::ext::expand` is much simpler. - We can expand macros in any order without causing problems for hygiene (needed for macro modularization). - We can deprecate or remove today's `macro_rules!` scope easily. - Expansion performance improves by 25%, post-expansion memory usage decreases by ~5%. - Expanding a block is no longer quadratic in the number of `let` statements (fixes #10607). r? @nrc
2016-07-15Include the `MacroDefinition` rib in the label ribs.Jeffrey Seyfried-4/+16
2016-07-14Implement `macro_rules!` placeholders and the macro scope mapJeffrey Seyfried-17/+81
2016-07-14Instead of renaming, treat differently marked identifiers as unequalJeffrey Seyfried-27/+26
2016-07-14Move node id assigning into `resolve`Jeffrey Seyfried-0/+60
2016-07-13Fixed issue where importing a trait method directly and then calling the ↵Michael Rosenberg-10/+18
method causes a compiler panic
2016-07-08Stabilize `FnOnce::Output` + Fix rebasepetrochenkov-3/+2
2016-07-08Do not generate Def::Err in bindingsVadim Petrochenkov-19/+13
Instead of Def::Err erroneous bindings can get usual definitions that doesn't require special cases later on and have less chances to generate ICE.
2016-07-08Don't generate Def::Err if it's not stored in def_map immediatelyVadim Petrochenkov-5/+5
2016-07-06Auto merge of #34655 - jseyfried:improve_resolver_api, r=nrcbors-1/+29
Add to `resolve`'s public API This adds a public method `with_module_lexical_scope` to `Resolver` to allow users to resolve a path in the lexical scope of an arbitrary module. r? @nrc
2016-07-06Rollup merge of #34636 - tshepang:shorten, r=GuillaumeGomezSteve Klabnik-2/+1
doc: fix and shorten comment
2016-07-05Add FIXME commentJeffrey Seyfried-0/+1
2016-07-05Add method `with_module_lexical_scope` to `Resolver`.Jeffrey Seyfried-1/+28
2016-07-03doc: fix and shorten commentTshepang Lekhonkhobe-2/+1
2016-07-01Add the `after_expand` entry point between import resolution and the rest of ↵Jeffrey Seyfried-17/+6
name resolution
2016-06-29Rollup merge of #34542 - jseyfried:fix_recursive_modules, r=nrcManish Goregaokar-1/+3
Fix non-termination on recursive module re-exports in extern crates Fixes #33776. r? @nrc
2016-06-29Rollup merge of #34467 - GuillaumeGomez:err-codes, r=brsonManish Goregaokar-82/+207
Add new error codes and improve some explanations r? @brson cc @steveklabnik cc @jonathandturner