about summary refs log tree commit diff
path: root/src/librustc_resolve/lib.rs
AgeCommit message (Collapse)AuthorLines
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: fix special-case for one-segment import paths.Eduard-Mihai Burtescu-74/+146
2018-08-12Prohibit using macro-expanded `macro_export` macros through module-relative ↵Vadim Petrochenkov-4/+12
paths
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-06Support custom attributes when macro modularization is enabledVadim Petrochenkov-2/+5
2018-08-06Discern between various kinds of non-macro attributesVadim Petrochenkov-1/+2
2018-08-03Store concrete crate stores where possibleMark Rousskov-13/+17
2018-08-01resolve: Implement prelude search for macro pathsVadim Petrochenkov-12/+18
resolve/expansion: Implement tool attributes
2018-07-31Auto merge of #52234 - petrochenkov:macuse2, r=Mark-Simulacrumbors-7/+11
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 #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-29Replace push loops with collect() and extend() where possibleljedrz-3/+3
2018-07-29resolve: Modularize crate-local `#[macro_export] macro_rules`Vadim Petrochenkov-7/+11
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-27Remove unnecessary `.collect()`Shotaro Yamada-2/+2
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0
2018-07-23Auto merge of #52589 - petrochenkov:derlint, r=alexcrichtonbors-17/+33
Attach deprecation lint `proc_macro_derive_resolution_fallback` to a specific node id So it can be `allow`-ed from inside the derive. cc https://github.com/rust-lang/rust/pull/51952
2018-07-23Auto merge of #52568 - oli-obk:span_bug_error, r=varkorbors-0/+2
Fix loop label resolution around constants And make `delay_span_bug` a little more helpful r? @varkor fixes #52442 fixes #52443
2018-07-21Attach deprecation lint `proc_macro_derive_resolution_fallback` to a ↵Vadim Petrochenkov-17/+33
specific node id
2018-07-20Properly scope label resolutionOliver Schneider-0/+2
2018-07-20resolve: Rename `global_macros` to `macro_prelude`Vadim Petrochenkov-3/+3
Rename `shadows_glob` to `shadowed_glob`
2018-07-20resolve: Remove unused parameter from `resolve_ident_in_module`Vadim Petrochenkov-6/+5
2018-07-19Auto merge of #52024 - oli-obk:existential_parse, r=nikomatsakisbors-1/+15
Implement existential types (not for associated types yet) r? @nikomatsakis cc @Centril @varkor @alexreg
2018-07-18Implement existential typesOliver Schneider-1/+15
2018-07-17rustc: Fix a suggestion for the `proc_macro` featureAlex Crichton-1/+1
This feature is stable, we shouldn't suggest it any more! Instead suggest the real feature, `use_extern_macros`.
2018-07-16rustc: Stabilize much of the `proc_macro` featureAlex Crichton-6/+2
This commit stabilizes some of the `proc_macro` language feature as well as a number of APIs in the `proc_macro` crate as [previously discussed][1]. This means that on stable Rust you can now define custom procedural macros which operate as attributes attached to items or `macro_rules!`-like bang-style invocations. This extends the suite of currently stable procedural macros, custom derives, with custom attributes and custom bang macros. Note though that despite the stabilization in this commit procedural macros are still not usable on stable Rust. To stabilize that we'll need to stabilize at least part of the `use_extern_macros` feature. Currently you can define a procedural macro attribute but you can't import it to call it! A summary of the changes made in this PR (as well as the various consequences) is: * The `proc_macro` language and library features are now stable. * Other APIs not stabilized in the `proc_macro` crate are now named under a different feature, such as `proc_macro_diagnostic` or `proc_macro_span`. * A few checks in resolution for `proc_macro` being enabled have switched over to `use_extern_macros` being enabled. This means that code using `#![feature(proc_macro)]` today will likely need to move to `#![feature(use_extern_macros)]`. It's intended that this PR, once landed, will be followed up with an attempt to stabilize a small slice of `use_extern_macros` just for procedural macros to make this feature 100% usable on stable. [1]: https://internals.rust-lang.org/t/help-stabilize-a-subset-of-macros-2-0/7252
2018-07-14Remove most of `PartialEq` impls from AST and HIR structuresVadim Petrochenkov-1/+1
2018-07-12Deny bare trait objects in src/librustc_resolveljedrz-4/+6
2018-07-11Rollup merge of #51952 - petrochenkov:transmark, r=alexcrichtonMark Rousskov-30/+61
hygiene: Decouple transparencies from expansion IDs And remove fallback to parent modules during resolution of names in scope. This is a breaking change for users of unstable macros 2.0 (both procedural and declarative), code like this: ```rust #![feature(decl_macro)] macro m($S: ident) { struct $S; mod m { type A = $S; } } fn main() { m!(S); } ``` or equivalent ```rust #![feature(decl_macro)] macro m($S: ident) { mod m { type A = $S; } } fn main() { struct S; m!(S); } ``` stops working due to module boundaries being properly enforced. For proc macro derives this is still reported as a compatibility warning to give `actix_derive`, `diesel_derives` and `palette_derive` time to fix their issues. Fixes https://github.com/rust-lang/rust/issues/50504 in accordance with [this comment](https://github.com/rust-lang/rust/issues/50504#issuecomment-399764767).
2018-07-09in which `use` suggestions meet edition 2018Zack M. Davis-1/+12
The intent here is to resolve #52202.
2018-07-08Remove fallback to parent modules from lexical resolutionVadim Petrochenkov-26/+57
2018-07-08hygiene: Decouple transparencies from expansion IDsVadim Petrochenkov-4/+4
2018-07-01absoluate -> absoluteTakanori Ishibashi-1/+1
2018-06-30Auto merge of #51762 - petrochenkov:oh-hi-mark, r=oli-obkbors-15/+43
hygiene: Implement transparent marks and use them for call-site hygiene in proc-macros Fixes https://github.com/rust-lang/rust/issues/50050
2018-06-30Auto merge of #51806 - oli-obk:lowering_cleanups1, r=cramertjbors-4/+5
Lowering cleanups [1/N]
2018-06-30Address commentsVadim Petrochenkov-2/+1
2018-06-30Restore the old behavior of `$crate` in nested `macro_rules`Vadim Petrochenkov-1/+25
`$crate` is not resolved at def-site of a macro, but rather at "transitive def-site"
2018-06-30Fortify dummy span checkingVadim Petrochenkov-4/+4
2018-06-30hygiene: Implement transparent marksVadim Petrochenkov-3/+10
2018-06-30resolve: Cleanup `resolve_crate_root`Vadim Petrochenkov-8/+6
2018-06-28Fix rebaseVadim Petrochenkov-5/+5
2018-06-28Use `Ident`s for associated item definitions in HIRVadim Petrochenkov-1/+1
Remove emulation of hygiene with gensyms