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

Add `crate::` to trait suggestions in Rust 2018. #54603

Merged
merged 3 commits into from Oct 3, 2018

Conversation

Projects
None yet
5 participants
@davidtwco
Member

davidtwco commented Sep 26, 2018

Fixes #54559.

In the 2018 edition, when suggesting traits to import that implement a
given method that is being invoked, suggestions will now include the
crate:: prefix if the suggested trait is local to the current crate.

r? @nikomatsakis

@rust-highfive

This comment was marked as outdated.

Show comment
Hide comment
@rust-highfive

rust-highfive Sep 27, 2018

Collaborator

The job x86_64-gnu-llvm-5.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.
[00:41:38]    Compiling parking_lot_core v0.3.0
[00:41:38]    Compiling tempfile v3.0.3
[00:41:40]    Compiling parking_lot v0.6.4
[00:41:41]    Compiling rustdoc v0.0.0 (file:///checkout/src/librustdoc)
[00:41:44] error[E0277]: `clean::get_path_for_type::AbsolutePathBuffer` doesn't implement `std::fmt::Debug`
[00:41:44]     --> librustdoc/clean/mod.rs:3974:9
[00:41:44]      |
[00:41:44] 3974 |     tcx.push_item_path(&mut apb, def_id);
[00:41:44]      |         ^^^^^^^^^^^^^^ `clean::get_path_for_type::AbsolutePathBuffer` cannot be formatted using `{:?}`
[00:41:44]      |
[00:41:44]      = help: the trait `std::fmt::Debug` is not implemented for `clean::get_path_for_type::AbsolutePathBuffer`
[00:41:44]      = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug`
[00:41:46] error: aborting due to previous error
[00:41:46] 
[00:41:46] For more information about this error, try `rustc --explain E0277`.
[00:41:46] error: Could not compile `rustdoc`.
---
[00:41:46] 
[00:41:46] 
[00:41:46] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:41:46] Build completed unsuccessfully in 0:37:02
[00:41:46] make: *** [all] Error 1
[00:41:46] Makefile:28: recipe for target 'all' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1a9c78a8
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:03c636db:start=1538006626505453435,finish=1538006626509799862,duration=4346427
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:221e2be4
$ 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:03e1a60a
travis_time:start:03e1a60a
$ 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

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)

Collaborator

rust-highfive commented Sep 27, 2018

The job x86_64-gnu-llvm-5.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.
[00:41:38]    Compiling parking_lot_core v0.3.0
[00:41:38]    Compiling tempfile v3.0.3
[00:41:40]    Compiling parking_lot v0.6.4
[00:41:41]    Compiling rustdoc v0.0.0 (file:///checkout/src/librustdoc)
[00:41:44] error[E0277]: `clean::get_path_for_type::AbsolutePathBuffer` doesn't implement `std::fmt::Debug`
[00:41:44]     --> librustdoc/clean/mod.rs:3974:9
[00:41:44]      |
[00:41:44] 3974 |     tcx.push_item_path(&mut apb, def_id);
[00:41:44]      |         ^^^^^^^^^^^^^^ `clean::get_path_for_type::AbsolutePathBuffer` cannot be formatted using `{:?}`
[00:41:44]      |
[00:41:44]      = help: the trait `std::fmt::Debug` is not implemented for `clean::get_path_for_type::AbsolutePathBuffer`
[00:41:44]      = note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug`
[00:41:46] error: aborting due to previous error
[00:41:46] 
[00:41:46] For more information about this error, try `rustc --explain E0277`.
[00:41:46] error: Could not compile `rustdoc`.
---
[00:41:46] 
[00:41:46] 
[00:41:46] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:41:46] Build completed unsuccessfully in 0:37:02
[00:41:46] make: *** [all] Error 1
[00:41:46] Makefile:28: recipe for target 'all' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1a9c78a8
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:03c636db:start=1538006626505453435,finish=1538006626509799862,duration=4346427
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:221e2be4
$ 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:03e1a60a
travis_time:start:03e1a60a
$ 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

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)

Show resolved Hide resolved src/librustc/ty/item_path.rs
Show outdated Hide outdated src/librustc/ty/item_path.rs Outdated
Show resolved Hide resolved src/test/ui/rust-2018/trait-import-suggestions.stderr
@rust-highfive

This comment was marked as outdated.

Show comment
Hide comment
@rust-highfive

rust-highfive Sep 27, 2018

Collaborator

The job x86_64-gnu-llvm-5.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.
[00:23:13]    Compiling rustc-rayon-core v0.1.1
[00:23:13]    Compiling libc v0.2.43
[00:23:14] error: linking with `cc` failed: exit code: 1
[00:23:14]   |
[00:23:14]   = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.build_script_build.aq0c5hq9-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.build_script_build.aq0c5hq9-cgu.1.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.1jzcqtcalyz2v6uy.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-68abf883c39f5e5e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-d88ca52f0823481c.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-fd856600a74ec610.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-0a7474373c7b460e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-a00992e63ad2cea8.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-9e29571bd610130b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-aae624166adf9237.rlib" "-Wl,--end-group" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-a70f4a2a2c46367f.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
[00:23:14]   = note: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.3.rcgu.o): In function `std::sys_common::at_exit_imp::push::hcb0e5b87a46b6ea9':
[00:23:14]           std.8tcrkv5i-cgu.3:(.text._ZN3std10sys_common11at_exit_imp4push17hcb0e5b87a46b6ea9E+0x261): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:14]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.4.rcgu.o): In function `std::io::stdio::stdout::stdout_init::he43717ecbc65409a':
[00:23:14]           std.8tcrkv5i-cgu.4:(.text._ZN3std2io5stdio6stdout11stdout_init17he43717ecbc65409aE+0x158): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:14]           std.8tcrkv5i-cgu.4:(.text._ZN3std2io5stdio6stdout11stdout_init17he43717ecbc65409aE+0x170): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:14]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.6.rcgu.o): In function `std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h691e2667111da562':
[00:23:14]           std.8tcrkv5i-cgu.6:(.text._ZN3std3sys4unix9backtrace7tracing3imp16unwind_backtrace17h691e2667111da562E+0x112): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:14]           std.8tcrkv5i-cgu.6:(.text._ZN3std3sys4unix9backtrace7tracing3imp16unwind_backtrace17h691e2667111da562E+0x123): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:14]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.7.rcgu.o):std.8tcrkv5i-cgu.7:(.text._ZN3std3ffi5c_str7CString3new17h3ee05fc805b6eaffE+0x32): more undefined references to `alloc::handle_alloc_error::h3247bee8acd4f146' follow
[00:23:14]           
[00:23:14] 
[00:23:14] error: aborting due to previous error
[00:23:14] 
[00:23:14] 
[00:23:14] error: Could not compile `rustc-rayon-core`.
[00:23:14] warning: build failed, waiting for other jobs to finish...
[00:23:15] Makefile:28: recipe for target 'all' failed
[00:23:15] make: *** [all] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0100ea71
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

Collaborator

rust-highfive commented Sep 27, 2018

The job x86_64-gnu-llvm-5.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.
[00:23:13]    Compiling rustc-rayon-core v0.1.1
[00:23:13]    Compiling libc v0.2.43
[00:23:14] error: linking with `cc` failed: exit code: 1
[00:23:14]   |
[00:23:14]   = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.build_script_build.aq0c5hq9-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.build_script_build.aq0c5hq9-cgu.1.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.1jzcqtcalyz2v6uy.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-68abf883c39f5e5e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-d88ca52f0823481c.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-fd856600a74ec610.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-0a7474373c7b460e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-a00992e63ad2cea8.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-9e29571bd610130b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-aae624166adf9237.rlib" "-Wl,--end-group" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-a70f4a2a2c46367f.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
[00:23:14]   = note: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.3.rcgu.o): In function `std::sys_common::at_exit_imp::push::hcb0e5b87a46b6ea9':
[00:23:14]           std.8tcrkv5i-cgu.3:(.text._ZN3std10sys_common11at_exit_imp4push17hcb0e5b87a46b6ea9E+0x261): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:14]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.4.rcgu.o): In function `std::io::stdio::stdout::stdout_init::he43717ecbc65409a':
[00:23:14]           std.8tcrkv5i-cgu.4:(.text._ZN3std2io5stdio6stdout11stdout_init17he43717ecbc65409aE+0x158): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:14]           std.8tcrkv5i-cgu.4:(.text._ZN3std2io5stdio6stdout11stdout_init17he43717ecbc65409aE+0x170): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:14]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.6.rcgu.o): In function `std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h691e2667111da562':
[00:23:14]           std.8tcrkv5i-cgu.6:(.text._ZN3std3sys4unix9backtrace7tracing3imp16unwind_backtrace17h691e2667111da562E+0x112): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:14]           std.8tcrkv5i-cgu.6:(.text._ZN3std3sys4unix9backtrace7tracing3imp16unwind_backtrace17h691e2667111da562E+0x123): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:14]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.7.rcgu.o):std.8tcrkv5i-cgu.7:(.text._ZN3std3ffi5c_str7CString3new17h3ee05fc805b6eaffE+0x32): more undefined references to `alloc::handle_alloc_error::h3247bee8acd4f146' follow
[00:23:14]           
[00:23:14] 
[00:23:14] error: aborting due to previous error
[00:23:14] 
[00:23:14] 
[00:23:14] error: Could not compile `rustc-rayon-core`.
[00:23:14] warning: build failed, waiting for other jobs to finish...
[00:23:15] Makefile:28: recipe for target 'all' failed
[00:23:15] make: *** [all] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0100ea71
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@rust-highfive

This comment was marked as outdated.

Show comment
Hide comment
@rust-highfive

rust-highfive Sep 27, 2018

Collaborator

The job x86_64-gnu-llvm-5.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.
[00:23:19]    Compiling libc v0.2.43
[00:23:19]    Compiling rand_core v0.2.1
[00:23:20] error: linking with `cc` failed: exit code: 1
[00:23:20]   |
[00:23:20]   = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.build_script_build.aq0c5hq9-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.build_script_build.aq0c5hq9-cgu.1.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.1jzcqtcalyz2v6uy.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-68abf883c39f5e5e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-d88ca52f0823481c.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-fd856600a74ec610.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-0a7474373c7b460e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-a00992e63ad2cea8.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-9e29571bd610130b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-aae624166adf9237.rlib" "-Wl,--end-group" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-a70f4a2a2c46367f.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
[00:23:20]   = note: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.3.rcgu.o): In function `std::sys_common::at_exit_imp::push::hcb0e5b87a46b6ea9':
[00:23:20]           std.8tcrkv5i-cgu.3:(.text._ZN3std10sys_common11at_exit_imp4push17hcb0e5b87a46b6ea9E+0x261): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:20]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.4.rcgu.o): In function `std::io::stdio::stdout::stdout_init::he43717ecbc65409a':
[00:23:20]           std.8tcrkv5i-cgu.4:(.text._ZN3std2io5stdio6stdout11stdout_init17he43717ecbc65409aE+0x158): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:20]           std.8tcrkv5i-cgu.4:(.text._ZN3std2io5stdio6stdout11stdout_init17he43717ecbc65409aE+0x170): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:20]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.6.rcgu.o): In function `std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h691e2667111da562':
[00:23:20]           std.8tcrkv5i-cgu.6:(.text._ZN3std3sys4unix9backtrace7tracing3imp16unwind_backtrace17h691e2667111da562E+0x112): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:20]           std.8tcrkv5i-cgu.6:(.text._ZN3std3sys4unix9backtrace7tracing3imp16unwind_backtrace17h691e2667111da562E+0x123): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:20]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.7.rcgu.o):std.8tcrkv5i-cgu.7:(.text._ZN3std3ffi5c_str7CString3new17h3ee05fc805b6eaffE+0x32): more undefined references to `alloc::handle_alloc_error::h3247bee8acd4f146' follow
[00:23:20]           
[00:23:20] 
[00:23:20] error: aborting due to previous error
[00:23:20] 

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)

Collaborator

rust-highfive commented Sep 27, 2018

The job x86_64-gnu-llvm-5.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.
[00:23:19]    Compiling libc v0.2.43
[00:23:19]    Compiling rand_core v0.2.1
[00:23:20] error: linking with `cc` failed: exit code: 1
[00:23:20]   |
[00:23:20]   = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.build_script_build.aq0c5hq9-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.build_script_build.aq0c5hq9-cgu.1.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/build/rustc-rayon-core-0b41451cbfe510bc/build_script_build-0b41451cbfe510bc.1jzcqtcalyz2v6uy.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-68abf883c39f5e5e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-d88ca52f0823481c.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-fd856600a74ec610.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-0a7474373c7b460e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-a00992e63ad2cea8.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-9e29571bd610130b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-aae624166adf9237.rlib" "-Wl,--end-group" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-a70f4a2a2c46367f.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
[00:23:20]   = note: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.3.rcgu.o): In function `std::sys_common::at_exit_imp::push::hcb0e5b87a46b6ea9':
[00:23:20]           std.8tcrkv5i-cgu.3:(.text._ZN3std10sys_common11at_exit_imp4push17hcb0e5b87a46b6ea9E+0x261): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:20]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.4.rcgu.o): In function `std::io::stdio::stdout::stdout_init::he43717ecbc65409a':
[00:23:20]           std.8tcrkv5i-cgu.4:(.text._ZN3std2io5stdio6stdout11stdout_init17he43717ecbc65409aE+0x158): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:20]           std.8tcrkv5i-cgu.4:(.text._ZN3std2io5stdio6stdout11stdout_init17he43717ecbc65409aE+0x170): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:20]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.6.rcgu.o): In function `std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h691e2667111da562':
[00:23:20]           std.8tcrkv5i-cgu.6:(.text._ZN3std3sys4unix9backtrace7tracing3imp16unwind_backtrace17h691e2667111da562E+0x112): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:20]           std.8tcrkv5i-cgu.6:(.text._ZN3std3sys4unix9backtrace7tracing3imp16unwind_backtrace17h691e2667111da562E+0x123): undefined reference to `alloc::handle_alloc_error::h3247bee8acd4f146'
[00:23:20]           /checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-5dbb56afb46dab3a.rlib(std-5dbb56afb46dab3a.std.8tcrkv5i-cgu.7.rcgu.o):std.8tcrkv5i-cgu.7:(.text._ZN3std3ffi5c_str7CString3new17h3ee05fc805b6eaffE+0x32): more undefined references to `alloc::handle_alloc_error::h3247bee8acd4f146' follow
[00:23:20]           
[00:23:20] 
[00:23:20] error: aborting due to previous error
[00:23:20] 

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)

@rust-highfive

This comment was marked as outdated.

Show comment
Hide comment
@rust-highfive

rust-highfive Sep 27, 2018

Collaborator

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.

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)

Collaborator

rust-highfive commented Sep 27, 2018

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.

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)

Show resolved Hide resolved src/librustc/session/mod.rs Outdated
Show resolved Hide resolved src/librustc/ty/item_path.rs
Show outdated Hide outdated src/librustc/session/mod.rs Outdated

@davidtwco davidtwco changed the title from Add `crate::` to trait suggestions in Rust 2018. to WIP: Add `crate::` to trait suggestions in Rust 2018. Sep 29, 2018

@davidtwco

This comment has been minimized.

Show comment
Hide comment
@davidtwco

davidtwco Sep 29, 2018

Member

I've rebased this atop @eddyb's #54650 and marked it as WIP so that it isn't merged until after that.

Member

davidtwco commented Sep 29, 2018

I've rebased this atop @eddyb's #54650 and marked it as WIP so that it isn't merged until after that.

davidtwco added some commits Sep 26, 2018

Add `crate::` to trait suggestions in Rust 2018.
In the 2018 edition, when suggesting traits to import that implement a
given method that is being invoked, suggestions will now include the
`crate::` prefix if the suggested trait is local to the current crate.
Move prelude crate names into `Session`.
Avoid hardcoding and special-casing the `std` crate name in the item
path logic by moving the prelude crate name logic into the `Session`
type so it can be reused in the item path logic and resolve module.
Attempt to resolve linking issues.
This commit takes a different approach to add the `crate::` prefix to
item paths than previous commits. Previously, recursion was stopped
after a prelude crate name was pushed to the path. It is theorized that
this was the cause of the linking issues since the same path logic is
used for symbol names and that not recursing meant that details were
being missed that affect symbol names. As of this commit, instead of
ceasing recursion, a flag is passed through to any subsequent recursive
calls so that the same effect can be achieved by checking that flag.

@davidtwco davidtwco changed the title from WIP: Add `crate::` to trait suggestions in Rust 2018. to Add `crate::` to trait suggestions in Rust 2018. Oct 1, 2018

@davidtwco

This comment has been minimized.

Show comment
Hide comment
@davidtwco

davidtwco Oct 1, 2018

Member

I've rebased this atop master now that @eddyb's #54650 has landed.

Member

davidtwco commented Oct 1, 2018

I've rebased this atop master now that @eddyb's #54650 has landed.

@nikomatsakis

This comment has been minimized.

Show comment
Hide comment
@nikomatsakis

nikomatsakis Oct 2, 2018

Contributor

@bors r+

Contributor

nikomatsakis commented Oct 2, 2018

@bors r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 2, 2018

Contributor

📌 Commit 02357e4 has been approved by nikomatsakis

Contributor

bors commented Oct 2, 2018

📌 Commit 02357e4 has been approved by nikomatsakis

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Oct 2, 2018

Rollup merge of rust-lang#54603 - davidtwco:issue-54559, r=nikomatsakis
Add `crate::` to trait suggestions in Rust 2018.

Fixes rust-lang#54559.

In the 2018 edition, when suggesting traits to import that implement a
given method that is being invoked, suggestions will now include the
`crate::` prefix if the suggested trait is local to the current crate.

r? @nikomatsakis

bors added a commit that referenced this pull request Oct 2, 2018

Auto merge of #54763 - pietroalbini:rollup, r=pietroalbini
Rollup of 10 pull requests

Successful merges:

 - #54269 (#53840: Consolidate pattern check errors)
 - #54391 (suggest `crate::...` for "local" paths in 2018)
 - #54603 (Add `crate::` to trait suggestions in Rust 2018.)
 - #54648 (Update Cargo's submodule)
 - #54680 (make run-pass tests with empty main just compile-pass tests)
 - #54687 (Use impl_header_lifetime_elision in libcore)
 - #54699 (Re-export `getopts` so custom drivers can reference it.)
 - #54702 (do not promote comparing function pointers)
 - #54728 (Renumber `proc_macro` tracking issues)
 - #54745 (make `CStr::from_bytes_with_nul_unchecked()` a const fn)

Failed merges:

r? @ghost

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Oct 2, 2018

Rollup merge of rust-lang#54603 - davidtwco:issue-54559, r=nikomatsakis
Add `crate::` to trait suggestions in Rust 2018.

Fixes rust-lang#54559.

In the 2018 edition, when suggesting traits to import that implement a
given method that is being invoked, suggestions will now include the
`crate::` prefix if the suggested trait is local to the current crate.

r? @nikomatsakis

bors added a commit that referenced this pull request Oct 2, 2018

Auto merge of #54767 - pietroalbini:rollup, r=pietroalbini
Rollup of 10 pull requests

Successful merges:

 - #54269 (#53840: Consolidate pattern check errors)
 - #54458 (Allow both explicit and elided lifetimes in the same impl header)
 - #54603 (Add `crate::` to trait suggestions in Rust 2018.)
 - #54648 (Update Cargo's submodule)
 - #54680 (make run-pass tests with empty main just compile-pass tests)
 - #54687 (Use impl_header_lifetime_elision in libcore)
 - #54699 (Re-export `getopts` so custom drivers can reference it.)
 - #54702 (do not promote comparing function pointers)
 - #54728 (Renumber `proc_macro` tracking issues)
 - #54745 (make `CStr::from_bytes_with_nul_unchecked()` a const fn)

Failed merges:

r? @ghost

@bors bors merged commit 02357e4 into rust-lang:master Oct 3, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@davidtwco davidtwco deleted the davidtwco:issue-54559 branch Oct 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment