Skip to content

Commit

Permalink
More debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Feb 11, 2018
1 parent 3337d51 commit b292325
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ matrix:
include:
# Images used in testing PR and try-build should be run first.
- env: IMAGE=x86_64-gnu-llvm-3.9 RUST_BACKTRACE=1
if: type = pull_request OR branch = auto
if: branch = auto

- env: IMAGE=dist-x86_64-linux DEPLOY=1
if: branch = try OR branch = auto
if: branch = auto

# "alternate" deployments, these are "nightlies" but have LLVM assertions
# turned on, they're deployed to a different location primarily for
Expand Down Expand Up @@ -57,7 +57,7 @@ matrix:
NO_DEBUG_ASSERTIONS=1
os: osx
osx_image: xcode8.3
if: branch = auto
#if: branch = auto
- env: >
RUST_CHECK_TARGET=check
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/mk/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ book:
standalone-docs:
$(Q)$(BOOTSTRAP) doc src/doc $(BOOTSTRAP_ARGS)
check:
$(Q)$(BOOTSTRAP) test $(BOOTSTRAP_ARGS)
$(Q)$(BOOTSTRAP) test $(BOOTSTRAP_ARGS) src/test/compile-fail --test-args single-segment
check-aux:
$(Q)$(BOOTSTRAP) test \
src/tools/cargo \
Expand Down
4 changes: 2 additions & 2 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ else
return $retval
}

do_make tidy
do_make all
#do_make tidy
#do_make all
do_make "$RUST_CHECK_TARGET"
fi
18 changes: 16 additions & 2 deletions src/librustc_resolve/resolve_imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,11 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
// resolution for it so that later resolve stages won't complain.
self.import_dummy_binding(import);
if !seen_spans.contains(&span) {
info!(
"preparing to import_path_to_string(import={:?}, span={:?})",
import,
span
);
let path = import_path_to_string(&import.module_path[..],
&import.subclass,
span);
Expand Down Expand Up @@ -1015,6 +1020,14 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
fn import_path_to_string(names: &[SpannedIdent],
subclass: &ImportDirectiveSubclass,
span: Span) -> String {
info!(
"import_path_to_string(names={:?} ({:p}/{}), subclass={:?}, span={:?})",
names,
names.as_ptr(),
names.len(),
subclass,
span,
);
let pos = names.iter()
.position(|p| span == p.span && p.node.name != keywords::CrateRoot.name());
let global = !names.is_empty() && names[0].node.name == keywords::CrateRoot.name();
Expand All @@ -1039,11 +1052,12 @@ fn import_path_to_string(names: &[SpannedIdent],
if names.is_empty() || x.starts_with("::") {
span_bug!(
span,
"invalid name `{}` at {:?}; global = {}, names = {:?}, subclass = {:?}",
"invalid name `{}` at {:?}; global = {}, names = {:p}/{}, subclass = {:?}",
x,
span,
global,
names,
names.as_ptr(),
names.len(),
subclass
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

// aux-build:xcrate.rs
// rustc-env:RUST_LOG=info

#![feature(extern_in_paths)]

Expand All @@ -20,4 +21,4 @@ use extern::*; //~ ERROR unresolved import `extern::*`
fn main() {
let s = extern::xcrate; //~ ERROR expected value, found module `extern::xcrate`
//~^ NOTE not a value
}
} //~ ERROR must fail kthxbye

0 comments on commit b292325

Please sign in to comment.