summary refs log tree commit diff
path: root/src/librustc_resolve
AgeCommit message (Collapse)AuthorLines
2017-07-17Change some helps to suggestionsOliver Schneider-10/+15
2017-07-10Store all generic arguments for method calls in ASTVadim Petrochenkov-8/+6
2017-07-08Move public reexports of private extern crates into a separate lintVadim Petrochenkov-3/+5
This is going to be a hard error while all private-in-public errors from rustc_privacy will be reclassified into lints.
2017-07-08Remove more anonymous trait method parametersVadim Petrochenkov-1/+1
2017-07-06remove associated_consts feature gateSean McArthur-3/+2
2017-06-29Make `$crate` a keywordVadim Petrochenkov-5/+7
2017-06-23Rollup merge of #42833 - durka:non-constant-used-with-constant, ↵Mark Simulacrum-1/+1
r=Mark-Simulacrum change span label for E0435 r? @Mark-Simulacrum
2017-06-23Removed as many "```ignore" as possible.kennytm-41/+57
Replaced by adding extra imports, adding hidden code (`# ...`), modifying examples to be runnable (sorry Homura), specifying non-Rust code, and converting to should_panic, no_run, or compile_fail. Remaining "```ignore"s received an explanation why they are being ignored.
2017-06-22change span label for E0435 (fix #41871)Alex Burka-1/+1
2017-06-21Auto merge of #42076 - alex-ozdemir:master, r=nrcbors-23/+39
Clearer Error Message for Duplicate Definition Clearer use of the error message and span labels to communicate duplication definitions/imports. fixes #42061
2017-06-20Rollup merge of #42728 - jseyfried:fix_resolve_perf, r=nrcCorey Farwell-1/+4
resolve: fix perf bug Fixes #42544. r? @nrc
2017-06-19Bump version and stage0 compilerAlex Crichton-4/+0
2017-06-19resolve: fix perf bug.Jeffrey Seyfried-1/+4
2017-06-15Clearer Error Message for Duplicate DefinitionAlex Ozdemir-23/+39
Clearer use of the error message and span labels to communicate duplicaiton defitions/imports. New error format: ``` error[E0428]: the name `Foo` is defined twice --> example.rs:2:1 | 1 | trait Foo { } | ------------- previous definition of the trait `Foo` here 2 | struct Foo { } | ^^^^^^^^^^^^^^ `Foo` redefined here = note: `Foo` must be defined only once in the type namespace of this module error: aborting due to previous error ```
2017-06-13Merge crate `collections` into `alloc`Murarth-9/+9
2017-06-10Only emit one error for `use foo::self;`Tommy Ip-0/+10
Currently `use foo::self;` would emit both E0429 and E0432. This commit silence the latter one (assuming `foo` is a valid module). Fixes #42559
2017-06-09Auto merge of #42507 - ibabushkin:external-span-trans, r=eddybbors-2/+2
Fix translation of external spans Previously, I noticed that spans from external crates don't generate any output. This limitation is problematic if analysis is performed on one or more external crates, as is the case with [rust-semverver](https://github.com/ibabushkin/rust-semverver). This change should address this behaviour, with the potential drawback that a minor performance hit is to be expected, as spans from potentially large crates have to be translated now.
2017-06-07Fix translation of external spans.Inokentiy Babushkin-2/+2
2017-06-07Replace some matches with try.Masaki Hara-4/+1
2017-06-03Auto merge of #42387 - GuillaumeGomez:error-codes-next, r=Susurrusbors-1/+30
Add E0603 error code Part of #42229. cc @Susurrus
2017-06-03Auto merge of #42334 - est31:master, r=jseyfriedbors-1/+5
Extend the unused macro lint to macros 2.0 Extends the unused macro lint (added in PR #41907) to macros 2.0 (added in PR #40847). r? @jseyfried
2017-06-02Add E0603 error codeGuillaume Gomez-1/+30
2017-05-31Fix a test and address review commentest31-1/+1
2017-05-31Extend the unused macro lint to macros 2.0est31-1/+5
2017-05-30Turn public reexporting of private extern crates into a lint againVadim Petrochenkov-2/+10
2017-05-30Turn sufficiently old compatibility lints into hard errorsVadim Petrochenkov-29/+13
2017-05-28Add note regarding parent module containing use statement.Mark Simulacrum-0/+26
2017-05-25Improve `Self`.Jeffrey Seyfried-1/+5
2017-05-25Improve intercrate hygiene.Jeffrey Seyfried-9/+9
2017-05-25Hygienize `librustc_typeck`.Jeffrey Seyfried-4/+12
2017-05-25Hygienize `librustc_resolve`.Jeffrey Seyfried-139/+265
2017-05-25Remove `trait_item_map`, clean up `resolver.with_type_parameter_rib()`.Jeffrey Seyfried-57/+73
2017-05-25Declarative macros 2.0 without hygiene.Jeffrey Seyfried-14/+33
2017-05-16Auto merge of #41907 - est31:macro_unused, r=jseyfriedbors-2/+29
Add lint for unused macros Addresses parts of #34938, to add a lint for unused macros. We now output warnings by default when we encounter a macro that we didn't use for expansion. Issues to be resolved before this PR is ready for merge: - [x] fix the NodeId issue described above - [x] remove all unused macros from rustc and the libraries or set `#[allow(unused_macros)]` next to them if they should be kept for some reason. This is needed for successful boostrap and bors to accept the PR. -> #41934 - [x] ~~implement the full extent of #34938, that means the macro match arm checking as well.~~ *let's not do this for now*
2017-05-15Address review commentsest31-13/+11
2017-05-13rustc_resolve: don't deny outer type parameters in embedded constants.Eduard-Mihai Burtescu-36/+32
2017-05-13Support #[allow] etc logic on a per macro levelest31-8/+5
This commit extends the current unused macro linter to support directives like #[allow(unused_macros)] or #[deny(unused_macros)] directly next to the macro definition, or in one of the modules the macro is inside. Before, we only supported such directives at a per crate level, due to the crate's NodeId being passed to session.add_lint. We also had to implement handling of the macro's NodeId in the lint visitor.
2017-05-13Add lint for unused macrosest31-2/+34
2017-05-13Auto merge of #41965 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-107/+163
Rollup of 15 pull requests - Successful merges: #41820, #41860, #41876, #41896, #41912, #41916, #41918, #41921, #41923, #41934, #41935, #41940, #41942, #41943, #41951 - Failed merges:
2017-05-12Don't use a DUMMY_SP for reporting issues with crate importsOliver Schneider-1/+1
2017-05-12Weave the span of an import through the resolve codeOliver Schneider-64/+101
2017-05-11rustc: Remove #![unstable] annotationAlex Crichton-3/+4
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-05-10Fix tidy issuesOliver Schneider-5/+15
2017-05-10Example usage of multiple suggestionsOliver Schneider-41/+50
2017-05-08Remove need for &format!(...) or &&"" dances in `span_label` callsOliver Schneider-39/+39
2017-04-28refac Move levenchstein before context dependent checkFreyskeyd-7/+11
Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>
2017-04-15feature gate :vis matcherAlex Burka-2/+6
2017-04-12First attempt at global_asm! macroA.J. Gardner-1/+3
2017-04-08Auto merge of #40775 - estebank:variant-as-type, r=petrochenkovbors-0/+32
Suggest using enum when a variant is used as a type Given a file: ```rust enum Fruit { Apple(i64), Orange(i64), } fn should_return_fruit() -> Apple { Apple(5) } ``` Provide the following output: ```rust error[E0412]: cannot find type `Apple` in this scope --> file.rs:16:29 | 16 | fn should_return_fruit() -> Apple { | ^^^^^ not found in this scope | help: there is an enum variant `Fruit::Apple`, did you mean to use `Fruit`? --> file.rs:12:5 | 12 | Apple(i64), | ^^^^^^^^^^ error[E0425]: cannot find function `Apple` in this scope --> file.rs:17:5 | 17 | Apple(5) | ^^^^^ not found in this scope | = help: possible candidate is found in another module, you can import it into scope: `use Fruit::Apple;` ``` Fix #35675.
2017-04-07ICH: Centrally compute and cache DefPath hashes as part of DefPathTable.Michael Woerister-1/+3