about summary refs log tree commit diff
path: root/src/librustc_resolve
AgeCommit message (Collapse)AuthorLines
2016-12-25Auto merge of #38539 - jseyfried:fix_resolve_hang, r=eddybbors-1/+2
resolve: fix non-termination Fixes #34324. r? @eddyb
2016-12-25Auto merge of #38566 - jseyfried:fix_import_resolution_bug, r=eddybbors-2/+1
Fix bug in import resolution Fixes #38535 and fixes #38556. r? @nrc
2016-12-24Use `DefId`s instead of `NodeId`s for `pub(restricted)` visibilities.Jeffrey Seyfried-76/+70
2016-12-23Auto merge of #38533 - jseyfried:legacy_custom_derive_deprecation, r=nrcbors-0/+6
Allow legacy custom derive authors to disable warnings in downstream crates This PR allows legacy custom derive authors to use a pre-deprecated method `registry.register_custom_derive()` instead of `registry.register_syntax_extension()` to avoid downstream deprecation warnings. r? @nrc
2016-12-23Allow legacy custom derive authors to disable warnings in downstream crates.Jeffrey Seyfried-0/+6
2016-12-23Fix import resolution bug and fold all idents in the AST.Jeffrey Seyfried-2/+1
2016-12-22Fix non-termination in `resolve`.Jeffrey Seyfried-1/+2
2016-12-22Refactor how global paths are represented (for both ast and hir).Jeffrey Seyfried-92/+84
2016-12-20Fix compile errors and suchAlex Crichton-1/+1
2016-12-20Merge branch 'rfc_1560_warning_cycle' of https://github.com/jseyfried/rust ↵Alex Crichton-28/+70
into rollup Conflicts: src/librustc_resolve/lib.rs src/librustc_resolve/resolve_imports.rs
2016-12-19Clean up `get_traits_containing_item`.Jeffrey Seyfried-50/+42
2016-12-19Minor bugfix for macro invocation path resolution.Jeffrey Seyfried-1/+4
2016-12-19resolve: clean up diagnostics for name conflicts.Jeffrey Seyfried-29/+8
2016-12-19Optimize `ast::PathSegment`.Jeffrey Seyfried-13/+5
2016-12-18Give extern crates' root modules a better name.Jeffrey Seyfried-1/+2
2016-12-18Remove scope placeholders, remove method `add_macro` of `ext::base::Resolver`.Jeffrey Seyfried-33/+52
2016-12-18Remove `MacroDef`'s fields `imported_from` and `allow_internal_unstable`,Jeffrey Seyfried-2/+3
remove `export` argument of `resolver.add_macro()`.
2016-12-18Canonicalize lifetime names.Jeffrey Seyfried-9/+9
2016-12-18Rename `ModuleS` -> `ModuleData`.Jeffrey Seyfried-18/+18
2016-12-18De-genericize `try_define`.Jeffrey Seyfried-28/+30
2016-12-18Add `ident.unhygienize()` and use `Ident` more instead of `Name` in `resolve`.Jeffrey Seyfried-146/+148
2016-12-18Fix the path resolutions of glob imports.Jeffrey Seyfried-4/+1
2016-12-16Address falloutAaron Turon-6/+3
2016-12-15Demote most backwards incompatible ambiguity errors from RFC 1560 to warnings.Jeffrey Seyfried-28/+70
2016-12-15Fix regression in resolution of primitive typesVadim Petrochenkov-2/+4
2016-12-07Auto merge of #38191 - oli-obk:clippy_is_sad, r=eddybbors-22/+24
annotate stricter lifetimes on LateLintPass methods to allow them to forward to a Visitor this unblocks clippy (rustup blocked after #37918) clippy has lots of lints that internally call an `intravisit::Visitor`, but the current lifetimes on `LateLintPass` methods conflicted with the required lifetimes (there was no connection between the HIR elements and the `TyCtxt`) r? @Manishearth
2016-12-06annotate stricter lifetimes on LateLintPass methods to allow them to forward ↵Oliver Schneider-22/+24
to a Visitor
2016-12-05Warn when an import list is emptyEsteban Küber-0/+6
For a given file ```rust use std::*; use std::{}; ``` output the following warnings ``` warning: unused import: `use std::{};`, #[warn(unused_imports)] on by default --> file.rs:2:1 | 2 | use std::{}; | ^^^^^^^^^^^^ warning: unused import: `std::*;`, #[warn(unused_imports)] on by default --> file.rs:1:5 | 1 | use std::*; | ^^^^^^^ ```
2016-12-04Auto merge of #38082 - jseyfried:macro_invocation_paths, r=nrcbors-50/+124
macros: support invocation paths (e.g. `foo::bar!()`) behind `#![feature(use_extern_macros)]` r? @nrc
2016-11-30Support paths in macro invocations.Jeffrey Seyfried-47/+115
2016-11-30Minor cleanup.Jeffrey Seyfried-11/+17
2016-11-30Auto merge of #37800 - alexcrichton:new-bootstrap, r=eddybbors-1/+0
Update the bootstrap compiler Now that we've got a beta build, let's use it!
2016-11-30Update the bootstrap compilerAlex Crichton-1/+0
Now that we've got a beta build, let's use it!
2016-11-29Remove `resolver.record_resolution()`.Jeffrey Seyfried-5/+1
2016-11-29Simplify `binding.module()`.Jeffrey Seyfried-10/+8
2016-11-29Clean up formatting.Jeffrey Seyfried-134/+103
2016-11-29Refactor away `ResolveResult`.Jeffrey Seyfried-86/+45
2016-11-29Refactor path resoloution.Jeffrey Seyfried-543/+284
2016-11-28Use `Def::Err` to signal that an error has already been reported where possible.Jeffrey Seyfried-63/+48
2016-11-28Auto merge of #38024 - jseyfried:avoid_needless_proc_macro_deps, r=nrcbors-4/+10
Avoid loading needless proc-macro dependencies Fixes #37958 when no proc-macros are exported; in particular, without `pub extern crate proc_macros;`, `#![feature(macro_reexport)]`, or `#![feature(use_extern_macros)]`. I opened https://github.com/rust-lang/cargo/issues/3334 for exported proc macros. r? @alexcrichton
2016-11-28Avoid loading needless proc-macro dependencies.Jeffrey Seyfried-4/+10
2016-11-28rustc: embed path resolutions into the HIR instead of keeping DefMap.Eduard-Mihai Burtescu-4/+3
2016-11-24Auto merge of #37951 - jseyfried:improve_macro_resolution_perf, r=nrcbors-34/+21
macros: improve resolution performance Avoid quadratic legacy macro name resolution in more cases. r? @nrc
2016-11-23macros: improve performance of legacy name resolution.Jeffrey Seyfried-34/+21
2016-11-21Implement the `loop_break_value` feature.Geoffry Song-4/+7
This implements RFC 1624, tracking issue #37339. - `FnCtxt` (in typeck) gets a stack of `LoopCtxt`s, which store the currently deduced type of that loop, the desired type, and a list of break expressions currently seen. `loop` loops get a fresh type variable as their initial type (this logic is stolen from that for arrays). `while` loops get `()`. - `break {expr}` looks up the broken loop, and unifies the type of `expr` with the type of the loop. - `break` with no expr unifies the loop's type with `()`. - When building MIR, `loop` loops no longer construct a `()` value at termination of the loop; rather, the `break` expression assigns the result of the loop. `while` loops are unchanged. - `break` respects contexts in which expressions may not end with braced blocks. That is, `while break { break-value } { while-body }` is illegal; this preserves backwards compatibility. - The RFC did not make it clear, but I chose to make `break ()` inside of a `while` loop illegal, just in case we wanted to do anything with that design space in the future. This is my first time dealing with this part of rustc so I'm sure there's plenty of problems to pick on here ^_^
2016-11-21Auto merge of #37824 - jseyfried:symbols, r=eddybbors-25/+20
Clean up `ast::Attribute`, `ast::CrateConfig`, and string interning This PR - removes `ast::Attribute_` (changing `Attribute` from `Spanned<Attribute_>` to a struct), - moves a `MetaItem`'s name from the `MetaItemKind` variants to a field of `MetaItem`, - avoids needlessly wrapping `ast::MetaItem` with `P`, - moves string interning into `syntax::symbol` (`ast::Name` is a reexport of `symbol::Symbol` for now), - replaces `InternedString` with `Symbol` in the AST, HIR, and various other places, and - refactors `ast::CrateConfig` from a `Vec` to a `HashSet`. r? @eddyb
2016-11-21Cleanup.Jeffrey Seyfried-60/+22
2016-11-21Stabilize RFC 1560.Jeffrey Seyfried-2/+2
2016-11-21Cleanup `InternedString`.Jeffrey Seyfried-12/+10
2016-11-21Use `Symbol` instead of `InternedString` in the AST, HIR, and various other ↵Jeffrey Seyfried-3/+3
places.