about summary refs log tree commit diff
path: root/src/librustc_resolve
AgeCommit message (Collapse)AuthorLines
2018-08-16limit to 2018 editionDouglas Campos-0/+1
2018-08-16to be OR and not to AND, that's the questionDouglas Campos-1/+1
2018-08-16avoid looking twice into external prelude cratesDouglas Campos-1/+8
2018-08-16make tidy happyDouglas Campos-1/+1
2018-08-16we can borrow the closure hereDouglas Campos-2/+2
2018-08-16pass down a IdentDouglas Campos-6/+5
2018-08-16look into extern prelude to provide sugestionsDouglas Campos-3/+23
2018-08-16use name instead of booleanDouglas Campos-2/+2
2018-08-16fix formattingDouglas Campos-4/+4
2018-08-16extract helper fnDouglas Campos-3/+8
2018-08-16tidyDouglas Campos-2/+6
2018-08-16prepend crate:: when crate_in_path feature is enabledDouglas Campos-10/+8
2018-08-16extract helper fnDouglas Campos-9/+20
2018-08-16revert back to master stateDouglas Campos-10/+3
2018-08-16fix lintDouglas Campos-1/+2
2018-08-16resolve suggestions should use `create::` when enabledDouglas Campos-3/+9
fixes #51212
2018-08-14rustc_resolve: crates only exist in the type namespace.Eduard-Mihai Burtescu-2/+3
2018-08-14rustc_resolve: also inject canaries to detect block scopes shadowing ↵Eduard-Mihai Burtescu-34/+82
`uniform_paths` imports.
2018-08-14rustc_resolve: inject ambiguity "canaries" when #![feature(uniform_paths)] ↵Eduard-Mihai Burtescu-15/+171
is enabled.
2018-08-14#[feature(uniform_paths)]: allow `use x::y;` to resolve through `self::x`, ↵Taylor Cramer-7/+66
not just `::x`.
2018-08-14rustc_resolve: fix special-case for one-segment import paths.Eduard-Mihai Burtescu-197/+310
2018-08-12Prohibit using macro-expanded `macro_export` macros through module-relative ↵Vadim Petrochenkov-10/+29
paths
2018-08-11Do not consider built-in attributes as candidates when resolving ↵Vadim Petrochenkov-1/+4
non-attribute macro invocations This is needed to avoid regressions on stable channel
2018-08-11Feature gate arbitrary tokens in non-macro attributes with a separate gateVadim Petrochenkov-7/+26
Feature gate `rustc_` and `derive_` with their own gates again instead of `custom_attribute`
2018-08-10Rollup merge of #53214 - memoryruins:nll_bootstrap_2, r=nikomatsakiskennytm-0/+1
[nll] enable feature(nll) on various crates for bootstrap: part 2 #53172
2018-08-09Rollup merge of #52773 - ljedrz:unncecessary_patterns, r=nikomatsakiskennytm-2/+2
Avoid unnecessary pattern matching against Option and Result
2018-08-09[nll] librustc_resolve: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-08-07Avoid unnecessary pattern matching against Option and Resultljedrz-2/+2
2018-08-06Address review commentsVadim Petrochenkov-2/+8
Adjust a few fulldeps and pretty-printing tests Fix rebase
2018-08-06Support custom attributes when macro modularization is enabledVadim Petrochenkov-36/+65
2018-08-06Avoid modifying invocations in place for derive helper attributesVadim Petrochenkov-38/+24
2018-08-06Discern between various kinds of non-macro attributesVadim Petrochenkov-15/+18
2018-08-03Move unused trait functions to inherent functionsMark Rousskov-2/+1
2018-08-03Store concrete crate stores where possibleMark Rousskov-42/+52
2018-08-02Auto merge of #52841 - petrochenkov:premacro, r=alexcrichtonbors-64/+248
resolve: Implement prelude search for macro paths, implement tool attributes When identifier is macro path is resolved in scopes (i.e. the first path segment - `foo` in `foo::mac!()` or `foo!()`), scopes are searched in the same order as for non-macro paths - items in modules, extern prelude, tool prelude (see later), standard library prelude, language prelude, but with some extra shadowing restrictions (names from globs and macro expansions cannot shadow names from outer scopes). See the comment in `fn resolve_lexical_macro_path_segment` for more details. "Tool prelude" currently contains two "tool modules" `rustfmt` and `clippy`, and is searched immediately after extern prelude. This makes the [possible long-term solution](https://github.com/rust-lang/rfcs/blob/master/text/2103-tool-attributes.md#long-term-solution) for tool attributes exactly equivalent to the existing extern prelude scheme, except that `--extern=my_crate` making crate names available in scope is replaced with something like `--tool=my_tool` making tool names available in scope. The `tool_attributes` feature is still unstable and `#![feature(tool_attributes)]` now implicitly enables `#![feature(use_extern_macros)]`. `use_extern_macros` is a prerequisite for `tool_attributes`, so their stabilization will happen in the same order. If `use_extern_macros` is not enabled, then tool attributes are treated as custom attributes (this is temporary, anyway). Fixes https://github.com/rust-lang/rust/issues/52576 Fixes https://github.com/rust-lang/rust/issues/52512 Fixes https://github.com/rust-lang/rust/issues/51277 cc https://github.com/rust-lang/rust/issues/52269
2018-08-01Rollup merge of #52930 - eddyb:issue-52489, r=cramertjPietro Albini-0/+2
rustc_resolve: record single-segment extern crate import resolutions. Fixes #52489 by recording special-cased single-segment imports for later (e.g. stability) checks. cc @alexcrichton @Mark-Simulacrum @petrochenkov Does this need to be backported?
2018-08-01resolve: Implement prelude search for macro pathsVadim Petrochenkov-64/+248
resolve/expansion: Implement tool attributes
2018-08-01rustc_resolve: record single-segment extern crate import resolutions.Eduard-Mihai Burtescu-0/+2
2018-07-31Auto merge of #52234 - petrochenkov:macuse2, r=Mark-Simulacrumbors-24/+68
resolve: Modularize crate-local `#[macro_export] macro_rules` Based on https://github.com/rust-lang/rust/pull/50911, cc https://github.com/rust-lang/rust/pull/50911#issuecomment-401151270 `#[macro_export] macro_rules` items are collected from the whole crate and are planted into the root module as items, so the external view of the crate is symmetric with its internal view and something like `$crate::my_macro` where `my_macro` is `#[macro_export] macro_rules` works both locally and from other crates. Closes https://github.com/rust-lang/rust/issues/52726
2018-07-30Auto merge of #52830 - matthewjasper:bootstrap-prep, r=matthewjasperbors-1/+1
[NLL] Fix some things for bootstrap Some changes that are required when bootstrapping rustc with NLL enabled. * Remove a bunch of unused `mut`s that aren't needed, but the existing lint doesn't catch. * Rewrite a function call to satisfy NLL borrowck. Note that the borrow is two-phase, but gets activated immediately by an unsizing coercion. cc #51823
2018-07-30Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkovbors-5/+6
Don't format!() string literals Prefer `to_string()` to `format!()` take 2, this time targetting string literals. In some cases (`&format!("...")` -> `"..."`) also removes allocations. Occurences of `format!("")` are changed to `String::new()`.
2018-07-29Remove unused `mut`sMatthew Jasper-1/+1
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-3/+3
2018-07-29resolve: Modularize crate-local `#[macro_export] macro_rules`Vadim Petrochenkov-24/+68
2018-07-29Auto merge of #52764 - sinkuu:cleanup, r=nikomatsakisbors-2/+2
Misc cleanups
2018-07-28Don't format!() string literalsljedrz-5/+6
2018-07-28Rollup merge of #52781 - ljedrz:avoid_vec_arguments, r=nikomatsakiskennytm-1/+1
Use a slice where a vector is not necessary
2018-07-27Use slices where a vector is not necessaryljedrz-1/+1
2018-07-27Remove unnecessary `.collect()`Shotaro Yamada-2/+2
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0