Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor out error reporting from `smart_resolve_path_fragment` fn #58065

Merged
merged 5 commits into from Feb 10, 2019

Conversation

Projects
None yet
5 participants
@alexreg
Copy link
Contributor

alexreg commented Feb 2, 2019

This function was ridiculously monolithic before. We now have three rather-less-monolithic-and-horrifying functions.

r? @Centril

@alexreg alexreg force-pushed the alexreg:refactor-smart_resolve_path_fragment branch from 72bdf5b to 9fb908a Feb 2, 2019

@Centril
Copy link
Contributor

Centril left a comment

Some potential places for refactoring... Not sure if the result will be better without looking at all dependencies, but just from the code structure, that's where I'd break into new functions.

Show resolved Hide resolved src/librustc_resolve/lib.rs Outdated
Show resolved Hide resolved src/librustc_resolve/lib.rs Outdated
Show resolved Hide resolved src/librustc_resolve/lib.rs Outdated
Show resolved Hide resolved src/librustc_resolve/lib.rs Outdated
Show resolved Hide resolved src/librustc_resolve/lib.rs Outdated
Show resolved Hide resolved src/librustc_resolve/lib.rs Outdated
Show resolved Hide resolved src/librustc_resolve/lib.rs Outdated
Show resolved Hide resolved src/librustc_resolve/lib.rs Outdated
Show resolved Hide resolved src/librustc_resolve/lib.rs Outdated
@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Feb 2, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:0204a9d2:start=1549069916368124000,finish=1549069917227656369,duration=859532369
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:03:39] tidy error: /checkout/src/librustc_resolve/lib.rs:3139: trailing whitespace
[00:03:40] some tidy checks failed
[00:03:40] 
[00:03:40] 
[00:03:40] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:03:40] 
[00:03:40] 
[00:03:40] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:40] Build completed unsuccessfully in 0:00:45
[00:03:40] Build completed unsuccessfully in 0:00:45
[00:03:40] make: *** [tidy] Error 1
[00:03:40] Makefile:68: recipe for target 'tidy' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0d1966c8
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Feb  2 01:15:48 UTC 2019
---
travis_time:end:173825e0:start=1549070148843095450,finish=1549070148847530381,duration=4434931
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:11380097
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:08c893fe
travis_time:start:08c893fe
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:044f8d38
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Feb 2, 2019

I only looked briefly at the structure... I'll leave the actual review for r? @petrochenkov.

@rust-highfive rust-highfive assigned petrochenkov and unassigned Centril Feb 2, 2019

@alexreg alexreg force-pushed the alexreg:refactor-smart_resolve_path_fragment branch from 9fb908a to 33521ca Feb 2, 2019

@alexreg

This comment has been minimized.

Copy link
Contributor Author

alexreg commented Feb 2, 2019

@petrochenkov I've done a more moderate amount of refactoring than suggested by @Centril, but take a look, and let me know what you think.

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Feb 2, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:1a3a1ee2:start=1549074059680031926,finish=1549074060670582472,duration=990550546
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `path_str` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3140:36
[00:20:03]      |
[00:20:03] 3140 |                     format!("{}!", path_str),
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `span` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3146:32
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3146 |                 err.span_label(span, "type aliases cannot be used as traits");
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `path_str` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3157:43
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3157 |                         format!("{}::{}", path_str, ident),
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `path_str` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3167:43
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3167 |                         format!("{}::{}", path_str, segment.ident),
[00:20:03] 
[00:20:03] error[E0424]: expected value, found module `self`
[00:20:03]     --> src/librustc_resolve/lib.rs:3176:41
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3176 |                 if let Some(variants) = self.collect_enum_variants(def) {
[00:20:03]      |                                         ^^^^ `self` value is a keyword only available in methods with `self` parameter
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `ns` in this scope
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3189 |             (Def::Struct(def_id), _) if ns == ValueNS => {
[00:20:03]      |                                         ^^ not found in this scope
[00:20:03] error[E0424]: expected value, found module `self`
[00:20:03]     --> src/librustc_resolve/lib.rs:3191:27
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3191 |                         = self.struct_constructors.get(&def_id).cloned() {
[00:20:03]      |                           ^^^^ `self` value is a keyword only available in methods with `self` parameter
[00:20:03] error[E0424]: expected value, found module `self`
[00:20:03]     --> src/librustc_resolve/lib.rs:3192:43
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3192 |                     let accessible_ctor = self.is_accessible(ctor_vis);
[00:20:03]      |                                           ^^^^ `self` value is a keyword only available in methods with `self` parameter
[00:20:03] error[E0425]: cannot find function `is_expected` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3193:24
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3193 |                     if is_expected(ctor_def) && !accessible_ctor {
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `span` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3194:40
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3194 |                         err.span_label(span, format!("constructor is not visible \
[00:20:03] 
[00:20:03] error[E0424]: expected value, found module `self`
[00:20:03]     --> src/librustc_resolve/lib.rs:3202:30
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3202 |                     let sm = self.session.source_map();
[00:20:03]      |                              ^^^^ `self` value is a keyword only available in methods with `self` parameter
[00:20:03] error[E0425]: cannot find value `span` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3203:34
[00:20:03]      |
[00:20:03] 3203 |                     let mut sp = span;
[00:20:03] 3203 |                     let mut sp = span;
[00:20:03]      |                                  ^^^^ not found in this scope
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `span` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3228:46
[00:20:03]      |
[00:20:03] 3228 |                                     let sp = span.to(sp);
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `path_str` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3253:49
[00:20:03]      |
---
[00:20:03]      |
[00:20:03] 3290 |                                         path_str),
[00:20:03]      |                                         ^^^^^^^^ not found in this scope
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `ns` in this scope
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3300 |             (Def::VariantCtor(_, CtorKind::Fictive), _) if ns == ValueNS => {
[00:20:03]      |                                                            ^^ not found in this scope
[00:20:03] error[E0425]: cannot find value `span` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3301:32
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3301 |                 err.span_label(span, format!("did you mean `{} {{ /* fields */ }}`?",
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `path_str` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3302:46
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3302 |                                              path_str));
[00:20:03]      |                                              ^^^^^^^^ not found in this scope
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `ns` in this scope
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3305 |             (Def::SelfTy(..), _) if ns == ValueNS => {
[00:20:03]      |                                     ^^ not found in this scope
[00:20:03] error[E0425]: cannot find value `span` in this scope
[00:20:03]     --> src/librustc_resolve/lib.rs:3306:32
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3306 |                 err.span_label(span, fallback_label);
[00:20:03] 
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `fallback_label` in this scope
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3306 |                 err.span_label(span, fallback_label);
[00:20:03] 
[00:20:03] 
[00:20:03] error[E0425]: cannot find value `ns` in this scope
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3311 |             (Def::TyAlias(_), _) | (Def::AssociatedTy(..), _) if ns == ValueNS => {
[00:20:03]      |                                                                  ^^ not found in this scope
[00:20:03] 
[00:20:03] error[E0425]: cannot find function `smart_resolve_context_dep_help` in this scope
[00:20:03]      |
[00:20:03]      |
[00:20:03] 3512 |             if smart_resolve_context_dep_help(&mut err, &mut candidates, source, def) {
[00:20:03] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3136:14
[00:20:04]      |
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] 3136 |             (Def::Macro(..), _) => {
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
[00:20:04] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3145:14
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] ...
[00:20:04] 3145 |             (Def::TyAlias(..), PathSource::Trait(_)) => {
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
[00:20:04] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3152:14
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] ...
[00:20:04] 3152 |             (Def::Mod(..), PathSource::Expr(Some(parent))) => match parent.node {
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
[00:20:04] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3174:14
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] ...
[00:20:04] 3174 |             (Def::Enum(..), PathSource::TupleStruct)
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
[00:20:04] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3175:20
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] ...
[00:20:04] 3175 |                 | (Def::Enum(..), PathSource::Expr(..))  => {
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
[00:20:04] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3189:14
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] ...
[00:20:04] 3189 |             (Def::Struct(def_id), _) if ns == ValueNS => {
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
[00:20:04] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3298:14
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] ...
[00:20:04] 3298 |             (Def::Union(..), _) |
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
[00:20:04] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3299:14
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] ...
[00:20:04] 3299 |             (Def::Variant(..), _) |
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
[00:20:04] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3300:14
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] ...
[00:20:04] 3300 |             (Def::VariantCtor(_, CtorKind::Fictive), _) if ns == ValueNS => {
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
[00:20:04] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3305:14
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] ...
[00:20:04] 3305 |             (Def::SelfTy(..), _) if ns == ValueNS => {
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
[00:20:04] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3311:14
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] ...
[00:20:04] 3311 |             (Def::TyAlias(_), _) | (Def::AssociatedTy(..), _) if ns == ValueNS => {
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
[00:20:04] 
[00:20:04] error[E0308]: mismatched types
[00:20:04]     --> src/librustc_resolve/lib.rs:3311:37
[00:20:04]      |
[00:20:04] 3135 |         match (def, source) {
[00:20:04]      |               ------------- this match expression has type `std::option::Option<rustc::hir::def::Def>`
[00:20:04] ...
[00:20:04] 3311 |             (Def::TyAlias(_), _) | (Def::AssociatedTy(..), _) if ns == ValueNS => {
[00:20:04]      |
[00:20:04]      = note: expected type `std::option::Option<rustc::hir::def::Def>`
[00:20:04]                 found type `rustc::hir::def::Def`
[00:20:04] 
---
travis_time:end:0270ebdd:start=1549075294256160977,finish=1549075294260974784,duration=4813807
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:04155783
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:080132f6
travis_time:start:080132f6
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:085211a6
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexreg alexreg force-pushed the alexreg:refactor-smart_resolve_path_fragment branch from 33521ca to 2e82ea1 Feb 2, 2019

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Feb 3, 2019

LGTM.
I'd prefer not to split the functions further.

Could you also move the factored out functions into librustc_resolve/error_reporting.rs?

@alexreg

This comment has been minimized.

Copy link
Contributor Author

alexreg commented Feb 3, 2019

@petrochenkov Yeah I agree, further splitting is probably not optimal. We can even leave it at the double split (first commit only) if you prefer, but I'm happy with how it is now.

Points of review addressed.

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Feb 4, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:22b71300:start=1549237443662756528,finish=1549237536394094041,duration=92731337513
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:16:54]    Compiling rustc_traits v0.0.0 (/checkout/src/librustc_traits)
[00:18:35]    Compiling rustc_allocator v0.0.0 (/checkout/src/librustc_allocator)
[00:19:33]    Compiling rustc_plugin v0.0.0 (/checkout/src/librustc_plugin)
[00:19:33]    Compiling rustc_resolve v0.0.0 (/checkout/src/librustc_resolve)
[00:19:33] error: incorrect close delimiter: `]`
[00:19:33]     |
[00:19:33] 10  | impl<'a> Resolver<'a> {
[00:19:33]     |                       - un-closed delimiter
[00:19:33] ...
[00:19:33] ...
[00:19:33] 408 | ]
[00:19:33]     | ^ incorrect close delimiter
[00:19:33]    Compiling rustc_privacy v0.0.0 (/checkout/src/librustc_privacy)
[00:19:33]    Compiling rustc_privacy v0.0.0 (/checkout/src/librustc_privacy)
[00:19:33] error[E0432]: unresolved import `error_reporting::smart_resolve_report_errors`
[00:19:33]    |
[00:19:33]    |
[00:19:33] 76 | use error_reporting::{smart_resolve_report_errors};
[00:19:33]    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `smart_resolve_report_errors` in `error_reporting`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]   --> src/librustc_resolve/error_reporting.rs:23:45
[00:19:33]    |
[00:19:33]    |
[00:19:33] 23 |         let is_enum_variant = &|def| if let Def::Variant(..) = def { true } else { false };
[00:19:33]    |                                             ^^^ use of undeclared type or module `Def`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `ModuleOrUniformRoot`
[00:19:33]    |
[00:19:33]    |
[00:19:33] 45 |                     PathResult::Module(ModuleOrUniformRoot::Module(module)) =>
[00:19:33]    |                                        ^^^^^^^^^^^^^^^^^^^ use of undeclared type or module `ModuleOrUniformRoot`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `DiagnosticId`
[00:19:33]   --> src/librustc_resolve/error_reporting.rs:56:20
[00:19:33]    |
[00:19:33]    |
[00:19:33] 56 |         let code = DiagnosticId::Error(code.into());
[00:19:33]    |                    ^^^^^^^^^^^^ use of undeclared type or module `DiagnosticId`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Applicability`
[00:19:33]   --> src/librustc_resolve/error_reporting.rs:66:17
[00:19:33]    |
[00:19:33]    |
[00:19:33] 66 |                 Applicability::MaybeIncorrect,
[00:19:33]    |                 ^^^^^^^^^^^^^ use of undeclared type or module `Applicability`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `DiagnosticId`
[00:19:33]   --> src/librustc_resolve/error_reporting.rs:73:22
[00:19:33]    |
[00:19:33]    |
[00:19:33] 73 |             err.code(DiagnosticId::Error("E0411".into()));
[00:19:33]    |                      ^^^^^^^^^^^^ use of undeclared type or module `DiagnosticId`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `DiagnosticId`
[00:19:33]   --> src/librustc_resolve/error_reporting.rs:82:22
[00:19:33]    |
[00:19:33]    |
[00:19:33] 82 |             err.code(DiagnosticId::Error("E0424".into()));
[00:19:33]    |                      ^^^^^^^^^^^^ use of undeclared type or module `DiagnosticId`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `PathSource`
[00:19:33]    |
[00:19:33]    |
[00:19:33] 84 |                 PathSource::Pat => {
[00:19:33]    |                 ^^^^^^^^^^ use of undeclared type or module `PathSource`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:101:49
[00:19:33]     |
[00:19:33]     |
[00:19:33] 101 |         if candidates.is_empty() && is_expected(Def::Enum(DefId::local(CRATE_DEF_INDEX))) {
[00:19:33]     |                                                 ^^^ use of undeclared type or module `Def`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `DefId`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:101:59
[00:19:33]     |
[00:19:33]     |
[00:19:33] 101 |         if candidates.is_empty() && is_expected(Def::Enum(DefId::local(CRATE_DEF_INDEX))) {
[00:19:33]     |                                                           ^^^^^ use of undeclared type or module `DefId`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Applicability`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:141:21
[00:19:33]     |
[00:19:33] 141 |                     Applicability::MachineApplicable,
[00:19:33] 141 |                     Applicability::MachineApplicable,
[00:19:33]     |                     ^^^^^^^^^^^^^ use of undeclared type or module `Applicability`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `AssocSuggestion`
[00:19:33]     |
[00:19:33]     |
[00:19:33] 149 |                     AssocSuggestion::Field => {
[00:19:33]     |                     ^^^^^^^^^^^^^^^ use of undeclared type or module `AssocSuggestion`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Applicability`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:154:29
[00:19:33]     |
[00:19:33] 154 |                             Applicability::MachineApplicable,
[00:19:33] 154 |                             Applicability::MachineApplicable,
[00:19:33]     |                             ^^^^^^^^^^^^^ use of undeclared type or module `Applicability`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `AssocSuggestion`
[00:19:33]     |
[00:19:33]     |
[00:19:33] 162 |                     AssocSuggestion::MethodWithSelf if self_is_available => {
[00:19:33]     |                     ^^^^^^^^^^^^^^^ use of undeclared type or module `AssocSuggestion`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Applicability`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:167:29
[00:19:33]     |
[00:19:33] 167 |                             Applicability::MachineApplicable,
[00:19:33] 167 |                             Applicability::MachineApplicable,
[00:19:33]     |                             ^^^^^^^^^^^^^ use of undeclared type or module `Applicability`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `AssocSuggestion`
[00:19:33]     |
[00:19:33]     |
[00:19:33] 170 |                     AssocSuggestion::MethodWithSelf | AssocSuggestion::AssocItem => {
[00:19:33]     |                     ^^^^^^^^^^^^^^^ use of undeclared type or module `AssocSuggestion`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `AssocSuggestion`
[00:19:33]     |
[00:19:33]     |
[00:19:33] 170 |                     AssocSuggestion::MethodWithSelf | AssocSuggestion::AssocItem => {
[00:19:33]     |                                                       ^^^^^^^^^^^^^^^ use of undeclared type or module `AssocSuggestion`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Applicability`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:175:29
[00:19:33]     |
[00:19:33] 175 |                             Applicability::MachineApplicable,
[00:19:33] 175 |                             Applicability::MachineApplicable,
[00:19:33]     |                             ^^^^^^^^^^^^^ use of undeclared type or module `Applicability`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Applicability`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:196:17
[00:19:33]     |
[00:19:33] 196 |                 Applicability::MaybeIncorrect,
[00:19:33]     |                 ^^^^^^^^^^^^^ use of undeclared type or module `Applicability`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:238:14
[00:19:33]     |
[00:19:33]     |
[00:19:33] 238 |             (Def::Macro(..), _) => {
[00:19:33]     |              ^^^ use of undeclared type or module `Def`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Applicability`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:243:21
[00:19:33]     |
[00:19:33]     |
[00:19:33] 243 |                     Applicability::MaybeIncorrect,
[00:19:33]     |                     ^^^^^^^^^^^^^ use of undeclared type or module `Applicability`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:246:14
[00:19:33]     |
[00:19:33]     |
[00:19:33] 246 |             (Def::TyAlias(..), PathSource::Trait(_)) => {
[00:19:33]     |              ^^^ use of undeclared type or module `Def`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `PathSource`
[00:19:33]     |
[00:19:33]     |
[00:19:33] 246 |             (Def::TyAlias(..), PathSource::Trait(_)) => {
[00:19:33]     |                                ^^^^^^^^^^ use of undeclared type or module `PathSource`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `nightly_options`
[00:19:33]     |
[00:19:33]     |
[00:19:33] 248 |                 if nightly_options::is_nightly_build() {
[00:19:33]     |                    ^^^^^^^^^^^^^^^ use of undeclared type or module `nightly_options`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:252:14
[00:19:33]     |
[00:19:33]     |
[00:19:33] 252 |             (Def::Mod(..), PathSource::Expr(Some(parent))) => match parent.node {
[00:19:33]     |              ^^^ use of undeclared type or module `Def`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `PathSource`
[00:19:33]     |
[00:19:33]     |
[00:19:33] 252 |             (Def::Mod(..), PathSource::Expr(Some(parent))) => match parent.node {
[00:19:33]     |                            ^^^^^^^^^^ use of undeclared type or module `PathSource`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `ExprKind`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:253:17
[00:19:33]     |
[00:19:33] 253 |                 ExprKind::Field(_, ident) => {
[00:19:33] 253 |                 ExprKind::Field(_, ident) => {
[00:19:33]     |                 ^^^^^^^^ use of undeclared type or module `ExprKind`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Applicability`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:258:25
[00:19:33]     |
[00:19:33] 258 |                         Applicability::MaybeIncorrect,
[00:19:33]     |                         ^^^^^^^^^^^^^ use of undeclared type or module `Applicability`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `ExprKind`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:261:17
[00:19:33]     |
[00:19:33] 261 |                 ExprKind::MethodCall(ref segment, ..) => {
[00:19:33] 261 |                 ExprKind::MethodCall(ref segment, ..) => {
[00:19:33]     |                 ^^^^^^^^ use of undeclared type or module `ExprKind`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Applicability`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:267:25
[00:19:33]     |
[00:19:33] 267 |                         Applicability::MaybeIncorrect,
[00:19:33]     |                         ^^^^^^^^^^^^^ use of undeclared type or module `Applicability`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:272:14
[00:19:33]     |
[00:19:33]     |
[00:19:33] 272 |             (Def::Enum(..), PathSource::TupleStruct)
[00:19:33]     |              ^^^ use of undeclared type or module `Def`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `PathSource`
[00:19:33]     |
[00:19:33]     |
[00:19:33] 272 |             (Def::Enum(..), PathSource::TupleStruct)
[00:19:33]     |                             ^^^^^^^^^^ use of undeclared type or module `PathSource`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:273:20
[00:19:33]     |
[00:19:33]     |
[00:19:33] 273 |                 | (Def::Enum(..), PathSource::Expr(..))  => {
[00:19:33]     |                    ^^^ use of undeclared type or module `Def`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `PathSource`
[00:19:33]     |
[00:19:33]     |
[00:19:33] 273 |                 | (Def::Enum(..), PathSource::Expr(..))  => {
[00:19:33]     |                                   ^^^^^^^^^^ use of undeclared type or module `PathSource`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:286:14
[00:19:33]     |
[00:19:33]     |
[00:19:33] 286 |             (Def::Struct(def_id), _) if ns == ValueNS => {
[00:19:33]     |              ^^^ use of undeclared type or module `Def`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `PathSource`
[00:19:33]     |
[00:19:33]     |
[00:19:33] 342 |                         PathSource::Expr(Some(parent)) => {
[00:19:33]     |                         ^^^^^^^^^^ use of undeclared type or module `PathSource`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `ExprKind`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:344:33
[00:19:33]     |
[00:19:33]     |
[00:19:33] 344 |                                 ExprKind::MethodCall(ref path_assignment, _)  => {
[00:19:33]     |                                 ^^^^^^^^ use of undeclared type or module `ExprKind`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Applicability`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:352:41
[00:19:33]     |
[00:19:33]     |
[00:19:33] 352 |                                         Applicability::MaybeIncorrect
[00:19:33]     |                                         ^^^^^^^^^^^^^ use of undeclared type or module `Applicability`
[00:19:33] 
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `PathSource`
[00:19:33]     |
[00:19:33]     |
[00:19:33] 364 |                         PathSource::Expr(None) if followed_by_brace == true => {
[00:19:33]     |                         ^^^^^^^^^^ use of undeclared type or module `PathSource`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Applicability`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:370:37
[00:19:33]     |
[00:19:33]     |
[00:19:33] 370 |                                     Applicability::MaybeIncorrect,
[00:19:33]     |                                     ^^^^^^^^^^^^^ use of undeclared type or module `Applicability`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:390:14
[00:19:33]     |
[00:19:33]     |
[00:19:33] 390 |             (Def::Union(..), _) |
[00:19:33]     |              ^^^ use of undeclared type or module `Def`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:391:14
[00:19:33]     |
[00:19:33]     |
[00:19:33] 391 |             (Def::Variant(..), _) |
[00:19:33]     |              ^^^ use of undeclared type or module `Def`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:392:14
[00:19:33]     |
[00:19:33]     |
[00:19:33] 392 |             (Def::VariantCtor(_, CtorKind::Fictive), _) if ns == ValueNS => {
[00:19:33]     |              ^^^ use of undeclared type or module `Def`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `CtorKind`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:392:34
[00:19:33]     |
[00:19:33]     |
[00:19:33] 392 |             (Def::VariantCtor(_, CtorKind::Fictive), _) if ns == ValueNS => {
[00:19:33]     |                                  ^^^^^^^^ use of undeclared type or module `CtorKind`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:396:14
[00:19:33]     |
[00:19:33]     |
[00:19:33] 396 |             (Def::SelfTy(..), _) if ns == ValueNS => {
[00:19:33]     |              ^^^ use of undeclared type or module `Def`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:401:14
[00:19:33]     |
[00:19:33]     |
[00:19:33] 401 |             (Def::TyAlias(_), _) | (Def::AssociatedTy(..), _) if ns == ValueNS => {
[00:19:33]     |              ^^^ use of undeclared type or module `Def`
[00:19:33] error[E0433]: failed to resolve: use of undeclared type or module `Def`
[00:19:33]    --> src/librustc_resolve/error_reporting.rs:401:37
[00:19:33]     |
[00:19:33]     |
[00:19:33] 401 |             (Def::TyAlias(_), _) | (Def::AssociatedTy(..), _) if ns == ValueNS => {
[00:19:33]     |                                     ^^^ use of undeclared type or module `Def`
[00:19:34] error[E0412]: cannot find type `Resolver` in this scope
[00:19:34]   --> src/librustc_resolve/error_reporting.rs:10:10
[00:19:34]    |
[00:19:34] 10 | impl<'a> Resolver<'a> {
---
[00:19:34]    |
[00:19:34] 1  | use syntax::ext::base::Resolver;
[00:19:34]    |
[00:19:34] 
[00:19:34] error[E0412]: cannot find type `PathSource` in this scope
[00:19:34]    |
[00:19:34] 17 |         source: PathSource,
[00:19:34]    |                 ^^^^^^^^^^ not found in this scope
[00:19:34] help: possible candidate is found in another module, you can import it into scope
---
[00:19:34]    |
[00:19:34] 1  | use rustc::hir::def::Def;
[00:19:34]    |
[00:19:34] 
[00:19:34] error[E0412]: cannot find type `DiagnosticBuilder` in this scope
[00:19:34]    |
[00:19:34]    |
[00:19:34] 19 |     ) -> (DiagnosticBuilder<'a>, Vec<ImportSuggestion>) {
[00:19:34] help: possible candidates are found in other modules, you can import them into scope
[00:19:34]    |
[00:19:34] 1  | use errors::DiagnosticBuilder;
[00:19:34]    |
[00:19:34]    |
[00:19:34] 1  | use syntax::diagnostics::plugin::DiagnosticBuilder;
[00:19:34]    |
[00:19:34] 
[00:19:34] error[E0412]: cannot find type `ImportSuggestion` in this scope
[00:19:34]    |
[00:19:34]    |
[00:19:34] 19 |     ) -> (DiagnosticBuilder<'a>, Vec<ImportSuggestion>) {
[00:19:34] help: possible candidate is found in another module, you can import it into scope
[00:19:34]    |
[00:19:34] 1  | use ImportSuggestion;
[00:19:34]    |
[00:19:34]    |
[00:19:34] 
[00:19:34] error[E0425]: cannot find value `TypeNS` in this scope
[00:19:34]   --> src/librustc_resolve/error_reporting.rs:43:36
[00:19:34]    |
[00:19:34] 43 |                     mod_path, Some(TypeNS), false, span, CrateLint::No
[00:19:34] help: possible candidate is found in another module, you can import it into scope
[00:19:34]    |
[00:19:34] 1  | use rustc::hir::def::Namespace::TypeNS;
[00:19:34]    |
[00:19:34]    |
[00:19:34] 
[00:19:34] error[E0425]: cannot find function `is_self_type` in this scope
[00:19:34]   --> src/librustc_resolve/error_reporting.rs:71:12
[00:19:34]    |
[00:19:34] 71 |         if is_self_type(path, ns) {
[00:19:34] help: possible candidate is found in another module, you can import it into scope
[00:19:34]    |
[00:19:34] 1  | use is_self_type;
[00:19:34]    |
[00:19:34]    |
[00:19:34] 
[00:19:34] error[E0425]: cannot find function `is_self_value` in this scope
[00:19:34]   --> src/librustc_resolve/error_reporting.rs:78:12
[00:19:34]    |
[00:19:34] 78 |         if is_self_value(path, ns) {
[00:19:34] help: possible candidate is found in another module, you can import it into scope
[00:19:34]    |
[00:19:34] 1  | use is_self_value;
[00:19:34]    |
[00:19:34]    |
[00:19:34] 
[00:19:34] error[E0425]: cannot find value `CRATE_DEF_INDEX` in this scope
[00:19:34]     |
[00:19:34]     |
[00:19:34] 101 |         if candidates.is_empty() && is_expected(Def::Enum(DefId::local(CRATE_DEF_INDEX))) {
[00:19:34] help: possible candidate is found in another module, you can import it into scope
[00:19:34]     |
[00:19:34] 1   | use rustc::hir::def_id::CRATE_DEF_INDEX;
[00:19:34]     |
[00:19:34]     |
[00:19:34] 
[00:19:34] error[E0425]: cannot find function `import_candidate_to_enum_paths` in this scope
[00:19:34]     |
[00:19:34]     |
[00:19:34] 106 |                     import_candidate_to_enum_paths(&suggestion)
[00:19:34] help: possible candidate is found in another module, you can import it into scope
[00:19:34]     |
[00:19:34] 1   | use import_candidate_to_enum_paths;
[00:19:34]     |
[00:19:34]     |
[00:19:34] 
[00:19:34] error[E0412]: cannot find type `DiagnosticBuilder` in this scope
[00:19:34]     |
[00:19:34] 227 |         err: &mut DiagnosticBuilder<'a>,
[00:19:34]     |                   ^^^^^^^^^^^^^^^^^ not found in this scope
[00:19:34] help: possible candidates are found in other modules, you can import them into scope
[00:19:34] help: possible candidates are found in other modules, you can import them into scope
[00:19:34]     |
[00:19:34] 1   | use errors::DiagnosticBuilder;
[00:19:34]     |
[00:19:34] 1   | use syntax::diagnostics::plugin::DiagnosticBuilder;
[00:19:34]     |
[00:19:34] 
[00:19:34] error[E0412]: cannot find type `PathSource` in this scope
[00:19:34]     |
[00:19:34] 229 |         source: PathSource,
[00:19:34]     |                 ^^^^^^^^^^ not found in this scope
[00:19:34] help: possible candidate is found in another module, you can import it into scope
---
[00:19:34] 
[00:19:34] error[E0425]: cannot find function `path_names_to_string` in this scope
[00:19:34]    --> src/librustc_resolve/error_reporting.rs:278:47
[00:19:34]     |
[00:19:34] 278 |                             .map(|suggestion| path_names_to_string(suggestion))
[00:19:34] help: possible candidate is found in another module, you can import it into scope
[00:19:34]     |
[00:19:34] 1   | use path_names_to_string;
[00:19:34]     |
[00:19:34]     |
[00:19:34] 
[00:19:34] error[E0425]: cannot find value `ValueNS` in this scope
[00:19:34]     |
[00:19:34]     |
[00:19:34] 286 |             (Def::Struct(def_id), _) if ns == ValueNS => {
[00:19:34] help: possible candidate is found in another module, you can import it into scope
[00:19:34]     |
[00:19:34] 1   | use rustc::hir::def::Namespace::ValueNS;
[00:19:34]     |
[00:19:34]     |
[00:19:34] 
[00:19:34] error[E0425]: cannot find value `ValueNS` in this scope
[00:19:34]     |
[00:19:34]     |
[00:19:34] 392 |             (Def::VariantCtor(_, CtorKind::Fictive), _) if ns == ValueNS => {
[00:19:34] help: possible candidate is found in another module, you can import it into scope
[00:19:34]     |
[00:19:34] 1   | use rustc::hir::def::Namespace::ValueNS;
[00:19:34]     |
[00:19:34]     |
[00:19:34] 
[00:19:34] error[E0425]: cannot find value `ValueNS` in this scope
[00:19:34]     |
[00:19:34]     |
[00:19:34] 396 |             (Def::SelfTy(..), _) if ns == ValueNS => {
[00:19:34] help: possible candidate is found in another module, you can import it into scope
[00:19:34]     |
[00:19:34] 1   | use rustc::hir::def::Namespace::ValueNS;
[00:19:34]     |
[00:19:34]     |
[00:19:34] 
[00:19:34] error[E0425]: cannot find value `ValueNS` in this scope
[00:19:34]     |
[00:19:34]     |
[00:19:34] 401 |             (Def::TyAlias(_), _) | (Def::AssociatedTy(..), _) if ns == ValueNS => {
[00:19:34] help: possible candidate is found in another module, you can import it into scope
[00:19:34]     |
[00:19:34] 1   | use rustc::hir::def::Namespace::ValueNS;
[00:19:34]     |
---
[00:19:34] 
[00:19:34] error: unused import: `smart_resolve_report_errors`
[00:19:34]   --> src/librustc_resolve/lib.rs:76:23
[00:19:34]    |
[00:19:34] 76 | use error_reporting::{smart_resolve_report_errors};
[00:19:34] 
[00:19:34] 
[00:19:34] error[E0599]: no method named `smart_resolve_report_errors` found for type `&mut Resolver<'a>` in the current scope
[00:19:34]      |
[00:19:34]      |
[00:19:34] 3139 |             let (err, candidates) = this.smart_resolve_report_errors(path, span, source, def);
[00:19:34] 
[00:19:35] error: aborting due to 69 previous errors
[00:19:35] 
[00:19:35] Some errors occurred: E0412, E0425, E0432, E0433, E0599.
---
[00:20:02] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:20:02] expected success, got: exit code: 101
[00:20:02] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:20:02] Build completed unsuccessfully in 0:15:59
[00:20:02] make: *** [all] Error 1
[00:20:02] Makefile:18: recipe for target 'all' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1faec50f
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Feb  4 00:05:49 UTC 2019
---
travis_time:end:07771f60:start=1549238750644650734,finish=1549238750649485946,duration=4835212
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:03409ad4
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:04772d00
travis_time:start:04772d00
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0cf8d860
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexreg alexreg force-pushed the alexreg:refactor-smart_resolve_path_fragment branch from a8f15c3 to 29ff3d4 Feb 4, 2019

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Feb 4, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:0517ebe8:start=1549276030004706574,finish=1549276134317371181,duration=104312664607
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:18:10]    Compiling rustc_traits v0.0.0 (/checkout/src/librustc_traits)
[00:18:10]    Compiling rustc_lint v0.0.0 (/checkout/src/librustc_lint)
[00:18:12]    Compiling rustc_allocator v0.0.0 (/checkout/src/librustc_allocator)
[00:18:45]    Compiling rustc_resolve v0.0.0 (/checkout/src/librustc_resolve)
[00:18:46] error: expected `;`, found keyword `use`
[00:18:46]    |
[00:18:46]    |
[00:18:46] 10 | use errors::{Applicability, DiagnosticBuilder, DiagnosticId}
[00:18:46]    |                                                             - expected `;`
[00:18:46] 11 | use macros::ParentScope;
[00:18:46]    | ^^^ unexpected token
[00:18:46] error: aborting due to previous error
[00:18:46] 
[00:18:46] error: Could not compile `rustc_resolve`.
[00:18:46] warning: build failed, waiting for other jobs to finish...
[00:18:46] warning: build failed, waiting for other jobs to finish...
[00:19:10] error: build failed
[00:19:10] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:19:10] expected success, got: exit code: 101
[00:19:10] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:19:10] Build completed unsuccessfully in 0:15:26
[00:19:10] make: *** [all] Error 1
[00:19:10] Makefile:18: recipe for target 'all' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:228b3880
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Feb  4 10:48:14 UTC 2019
---
travis_time:end:15d3d406:start=1549277295111268708,finish=1549277295115679905,duration=4411197
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:1133df51
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:19800dc8
travis_time:start:19800dc8
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:1277b6ce
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexreg alexreg force-pushed the alexreg:refactor-smart_resolve_path_fragment branch from 29ff3d4 to 92f1e9b Feb 4, 2019

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Feb 4, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:1f636d93:start=1549287106667753967,finish=1549287108750351301,duration=2082597334
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:17:11]    Compiling rustc_allocator v0.0.0 (/checkout/src/librustc_allocator)
[00:17:18]    Compiling rustc_lint v0.0.0 (/checkout/src/librustc_lint)
[00:17:18]    Compiling rustc_traits v0.0.0 (/checkout/src/librustc_traits)
[00:17:18]    Compiling rustc_resolve v0.0.0 (/checkout/src/librustc_resolve)
[00:17:19] error[E0432]: unresolved import `error_reporting::smart_resolve_report_errors`
[00:17:19]    |
[00:17:19]    |
[00:17:19] 76 | use error_reporting::{smart_resolve_report_errors};
[00:17:19]    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `smart_resolve_report_errors` in `error_reporting`
[00:17:19] error[E0425]: cannot find value `TypeNS` in this scope
[00:17:19]   --> src/librustc_resolve/error_reporting.rs:50:36
[00:17:19]    |
[00:17:19]    |
[00:17:19] 50 |                     mod_path, Some(TypeNS), false, span, CrateLint::No
[00:17:19] help: possible candidate is found in another module, you can import it into scope
[00:17:19]    |
[00:17:19] 1  | use rustc::hir::def::Namespace::TypeNS;
[00:17:19]    |
[00:17:19]    |
[00:17:19] 
[00:17:19] error[E0425]: cannot find value `ValueNS` in this scope
[00:17:19]     |
[00:17:19]     |
[00:17:19] 293 |             (Def::Struct(def_id), _) if ns == ValueNS => {
[00:17:19] help: possible candidate is found in another module, you can import it into scope
[00:17:19]     |
[00:17:19] 1   | use rustc::hir::def::Namespace::ValueNS;
[00:17:19]     |
[00:17:19]     |
[00:17:19] 
[00:17:19] error[E0425]: cannot find value `ValueNS` in this scope
[00:17:19]     |
[00:17:19]     |
[00:17:19] 399 |             (Def::VariantCtor(_, CtorKind::Fictive), _) if ns == ValueNS => {
[00:17:19] help: possible candidate is found in another module, you can import it into scope
[00:17:19]     |
[00:17:19] 1   | use rustc::hir::def::Namespace::ValueNS;
[00:17:19]     |
[00:17:19]     |
[00:17:19] 
[00:17:19] error[E0425]: cannot find value `ValueNS` in this scope
[00:17:19]     |
[00:17:19]     |
[00:17:19] 403 |             (Def::SelfTy(..), _) if ns == ValueNS => {
[00:17:19] help: possible candidate is found in another module, you can import it into scope
[00:17:19]     |
[00:17:19] 1   | use rustc::hir::def::Namespace::ValueNS;
[00:17:19]     |
[00:17:19]     |
[00:17:19] 
[00:17:19] error[E0425]: cannot find value `ValueNS` in this scope
[00:17:19]     |
[00:17:19]     |
[00:17:19] 408 |             (Def::TyAlias(_), _) | (Def::AssociatedTy(..), _) if ns == ValueNS => {
[00:17:19] help: possible candidate is found in another module, you can import it into scope
[00:17:19]     |
[00:17:19] 1   | use rustc::hir::def::Namespace::ValueNS;
[00:17:19]     |
---
[00:17:19] 
[00:17:19] error: unused import: `smart_resolve_report_errors`
[00:17:19]   --> src/librustc_resolve/lib.rs:76:23
[00:17:19]    |
[00:17:19] 76 | use error_reporting::{smart_resolve_report_errors};
[00:17:19] 
[00:17:20] error[E0277]: the size for values of type `str` cannot be known at compilation time
[00:17:20]   --> src/librustc_resolve/error_reporting.rs:37:14
[00:17:20]    |
[00:17:20]    |
[00:17:20] 37 |         let (base_msg, fallback_label, base_span) = if let Some(def) = def {
[00:17:20]    |
[00:17:20]    = help: the trait `std::marker::Sized` is not implemented for `str`
[00:17:20]    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
[00:17:20]    = note: all local variables must have a statically known size
[00:17:20]    = note: all local variables must have a statically known size
[00:17:20]    = help: unsized locals are gated as an unstable feature
[00:17:20] 
[00:17:20] error[E0277]: the size for values of type `str` cannot be known at compilation time
[00:17:20]   --> src/librustc_resolve/error_reporting.rs:37:24
[00:17:20]    |
[00:17:20] 37 |         let (base_msg, fallback_label, base_span) = if let Some(def) = def {
[00:17:20]    |
[00:17:20]    = help: the trait `std::marker::Sized` is not implemented for `str`
[00:17:20]    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
[00:17:20]    = note: all local variables must have a statically known size
[00:17:20]    = note: all local variables must have a statically known size
[00:17:20]    = help: unsized locals are gated as an unstable feature
[00:17:20] 
[00:17:20] error[E0277]: the size for values of type `str` cannot be known at compilation time
[00:17:20]    --> src/librustc_resolve/error_reporting.rs:223:17
[00:17:20]     |
[00:17:20] 223 |             err.span_label(base_span, fallback_label);
[00:17:20]     |
[00:17:20]     = help: the trait `std::marker::Sized` is not implemented for `str`
[00:17:20]     = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
[00:17:20] 
[00:17:20] 
[00:17:20] error[E0277]: the trait bound `std::string::String: std::convert::From<str>` is not satisfied
[00:17:20]    --> src/librustc_resolve/error_reporting.rs:223:17
[00:17:20]     |
[00:17:20] 223 |             err.span_label(base_span, fallback_label);
[00:17:20]     |                 ^^^^^^^^^^ the trait `std::convert::From<str>` is not implemented for `std::string::String`
[00:17:20]     = help: the following implementations were found:
[00:17:20]     = help: the following implementations were found:
[00:17:20]               <std::string::String as std::convert::From<&'a str>>
[00:17:20]               <std::string::String as std::convert::From<std::borrow::Cow<'a, str>>>
[00:17:20]               <std::string::String as std::convert::From<std::boxed::Box<str>>>
[00:17:20]               <std::string::String as std::convert::From<syntax::symbol::InternedString>>
[00:17:20]     = note: required because of the requirements on the impl of `std::convert::Into<std::string::String>` for `str`
[00:17:21] error: aborting due to 12 previous errors
[00:17:21] 
[00:17:21] Some errors occurred: E0277, E0425, E0432.
[00:17:21] For more information about an error, try `rustc --explain E0277`.
[00:17:21] For more information about an error, try `rustc --explain E0277`.
[00:17:21] error: Could not compile `rustc_resolve`.
[00:17:21] warning: build failed, waiting for other jobs to finish...
[00:18:11] error: build failed
[00:18:11] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:18:11] expected success, got: exit code: 101
[00:18:11] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:18:11] Build completed unsuccessfully in 0:14:24
[00:18:11] make: *** [all] Error 1
[00:18:11] Makefile:18: recipe for target 'all' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:07813af6
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Feb  4 13:50:09 UTC 2019

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexreg alexreg force-pushed the alexreg:refactor-smart_resolve_path_fragment branch from 92f1e9b to ea08c19 Feb 4, 2019

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Feb 5, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 5, 2019

📌 Commit ea08c19 has been approved by petrochenkov

@alexreg

This comment has been minimized.

Copy link
Contributor Author

alexreg commented Feb 6, 2019

@Centril Definitely in need of one of your roll-up specials soon! ;-)

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 7, 2019

☔️ The latest upstream changes (presumably #58254) made this pull request unmergeable. Please resolve the merge conflicts.

@alexreg alexreg force-pushed the alexreg:refactor-smart_resolve_path_fragment branch from ea08c19 to d5b514d Feb 7, 2019

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Feb 7, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:08e6fd58:start=1549559635153498027,finish=1549559636187964442,duration=1034466415
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:18:12]    |
[00:18:12] note: lint level defined here
[00:18:12]   --> src/librustc_resolve/lib.rs:12:9
[00:18:12]    |
[00:18:12] 12 | #![deny(rust_2018_idioms)]
[00:18:12]    |         ^^^^^^^^^^^^^^^^
[00:18:12]    = note: #[deny(elided_lifetimes_in_paths)] implied by #[deny(rust_2018_idioms)]
[00:18:12] error: hidden lifetime parameters in types are deprecated
[00:18:12]    --> src/librustc_resolve/error_reporting.rs:238:17
[00:18:12]     |
[00:18:12] 238 |         source: PathSource,
---
[00:18:53] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:18:53] expected success, got: exit code: 101
[00:18:53] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:18:53] Build completed unsuccessfully in 0:15:22
[00:18:53] make: *** [all] Error 1
[00:18:53] Makefile:18: recipe for target 'all' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:30c4d084
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Thu Feb  7 17:33:00 UTC 2019
---
travis_time:end:0f838aec:start=1549560781162139126,finish=1549560781170366755,duration=8227629
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0d93a960
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:28270fb9
travis_time:start:28270fb9
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:004a3d78
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexreg alexreg force-pushed the alexreg:refactor-smart_resolve_path_fragment branch from d5b514d to fd70e8e Feb 7, 2019

@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Feb 9, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 9, 2019

📌 Commit fd70e8e has been approved by petrochenkov

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 9, 2019

⌛️ Testing commit fd70e8e with merge abcfc3b...

bors added a commit that referenced this pull request Feb 9, 2019

Auto merge of #58065 - alexreg:refactor-smart_resolve_path_fragment, …
…r=petrochenkov

Factor out error reporting from `smart_resolve_path_fragment` fn

This function was ridiculously monolithic before. We now have three rather-less-monolithic-and-horrifying functions.

r? @Centril
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 10, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: petrochenkov
Pushing abcfc3b to master...

@bors bors added the merged-by-bors label Feb 10, 2019

@bors bors merged commit fd70e8e into rust-lang:master Feb 10, 2019

1 check passed

homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.