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

Fix #57730 #57981

Merged
merged 3 commits into from
Feb 17, 2019
Merged

Fix #57730 #57981

merged 3 commits into from
Feb 17, 2019

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Jan 30, 2019

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 30, 2019
@Centril Centril added T-lang Relevant to the language team, which will review and decide on the PR/issue. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Jan 30, 2019
use std::borrow::Borrow;
use core::fmt::Debug;

fn test(_: impl Borrow<impl Debug>) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should definitely not be allowed as written here; There's even a comment saying so in https://github.com/rust-lang/rust/pull/57730/files#diff-1b4892578c33275e3b1ff1fe43b7f2f9.

Instead, this should be moved to test/ui/impl-trait/where.rs as an example of what isn't allowed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see there's already tests for that. I just removed this file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well not exactly impl A<impl B>... it would be nice to have such a test.

@Centril Centril added needs-fcp This change is insta-stable, so needs a completed FCP to proceed. I-nominated labels Jan 30, 2019
@rust-highfive
Copy link
Collaborator

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:2c99647f:start=1548806593387522263,finish=1548806594376967118,duration=989444855
$ 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
---
[01:07:49] .................................................................................................... 600/2947
[01:08:01] .................................................................................................... 700/2947
[01:08:10] .................................................................................................... 800/2947
[01:08:18] .................................................................................................... 900/2947
[01:08:34] ...........................................F........................................................ 1000/2947
[01:08:56] .................................................................................................... 1200/2947
[01:09:06] .................................................................................................... 1300/2947
[01:09:19] .................................................................................................... 1400/2947
[01:09:30] .................................................................................................... 1500/2947
---
[01:13:04] failures:
[01:13:04] 
[01:13:04] ---- [run-pass] run-pass/impl-trait/nested.rs stdout ----
[01:13:04] 
[01:13:04] error: test compilation failed although it shouldn't!
[01:13:04] status: exit code: 1
[01:13:04] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-pass/impl-trait/nested.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/impl-trait/nested/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/impl-trait/nested/auxiliary"
[01:13:04] ------------------------------------------
[01:13:04] 
[01:13:04] ------------------------------------------
[01:13:04] stderr:
[01:13:04] stderr:
[01:13:04] ------------------------------------------
[01:13:04] {"message":"nested `impl Trait` is not allowed","code":{"code":"E0666","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/run-pass/impl-trait/nested.rs","byte_start":92,"byte_end":115,"line_start":6,"line_end":6,"column_start":12,"column_end":35,"is_primary":false,"text":[{"text":"fn test(_: impl Borrow<impl Debug>) {}","highlight_start":12,"highlight_end":35}],"label":"outer `impl Trait`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/run-pass/impl-trait/nested.rs","byte_start":104,"byte_end":114,"line_start":6,"line_end":6,"column_start":24,"column_end":34,"is_primary":true,"text":[{"text":"fn test(_: impl Borrow<impl Debug>) {}","highlight_start":24,"highlight_end":34}],"label":"nested `impl Trait` here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0666]: nested `impl Trait` is not allowed\n  --> /checkout/src/test/run-pass/impl-trait/nested.rs:6:24\n   |\nLL | fn test(_: impl Borrow<impl Debug>) {}\n   |            ------------^^^^^^^^^^-\n   |            |           |\n   |            |           nested `impl Trait` here\n   |            outer `impl Trait`\n\n"}
[01:13:04] {"message":"failed to resolve: maybe a missing `extern crate core;`?","code":{"code":"E0433","explanation":"\nAn undeclared type or module was used.\n\nErroneous code example:\n\n```compile_fail,E0433\nlet map = HashMap::new();\n// error: failed to resolve: use of undeclared type or module `HashMap`\n```\n\nPlease verify you didn't misspell the type/module's name or that you didn't\nforget to import it:\n\n\n```\nuse std::collections::HashMap; // HashMap has been imported.\nlet map: HashMap<u32, u32> = HashMap::new(); // So it can be used!\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/run-pass/impl-trait/nested.rs","byte_start":62,"byte_end":66,"line_start":4,"line_end":4,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"use core::fmt::Debug;","highlight_start":5,"highlight_end":9}],"label":"maybe a missing `extern crate core;`?","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0433]: failed to resolve: maybe a missing `extern crate core;`?\n  --> /checkout/src/test/run-pass/impl-trait/nested.rs:4:5\n   |\nLL | use core::fmt::Debug;\n   |     ^^^^ maybe a missing `extern crate core;`?\n\n"}
[01:13:04] {"message":"cannot find trait `Debug` in this scope","code":{"code":"E0405","explanation":"\nThe code refers to a trait that is not in scope.\n\nErroneous code example:\n\n```compile_fail,E0405\nstruct Foo;\n\nimpl SomeTrait for Foo {} // error: trait `SomeTrait` is not in scope\n```\n\nPlease verify that the name of the trait wasn't misspelled and ensure that it\nwas imported. Example:\n\n```\n# #[cfg(for_demonstration_only)]\n// solution 1:\nuse some_file::SomeTrait;\n\n// solution 2:\ntrait SomeTrait {\n    // some functions\n}\n\nstruct Foo;\n\nimpl SomeTrait for Foo { // ok!\n    // implements functions\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/run-pass/impl-trait/nested.rs","byte_start":109,"byte_end":114,"line_start":6,"line_end":6,"column_start":29,"column_end":34,"is_primary":true,"text":[{"text":"fn test(_: impl Borrow<impl Debug>) {}","highlight_start":29,"highlight_end":34}],"label":"not found in this scope","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"possible candidate is found in another module, you can import it into scope","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/run-pass/impl-trait/nested.rs","byte_start":33,"byte_end":33,"line_start":3,"line_end":3,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use std::borrow::Borrow;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"use std::fmt::Debug;\n","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0405]: cannot find trait `Debug` in this scope\n  --> /checkout/src/test/run-pass/impl-trait/nested.rs:6:29\n   |\nLL | fn test(_: impl Borrow<impl Debug>) {}\n   |                             ^^^^^ not found in this scope\nhelp: possible candidate is found in another module, you can import it into scope\n   |\nLL | use std::fmt::Debug;\n   |\n\n"}
[01:13:04] {"message":"unused import: `core::fmt::Debug`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"/checkout/src/test/run-pass/impl-trait/nested.rs","byte_start":62,"byte_end":78,"line_start":4,"line_end":4,"column_start":5,"column_end":21,"is_primary":true,"text":[{"text":"use core::fmt::Debug;","highlight_start":5,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"#[warn(unused_imports)] on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"warning: unused import: `core::fmt::Debug`\n  --> /checkout/src/test/run-pass/impl-trait/nested.rs:4:5\n   |\nLL | use core::fmt::Debug;\n   |     ^^^^^^^^^^^^^^^^\n   |\n   = note: #[warn(unused_imports)] on by default\n\n"}
[01:13:04] {"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
[01:13:04] {"message":"Some errors occurred: E0405, E0433, E0666.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0405, E0433, E0666.\n"}
[01:13:04] 
[01:13:04] ------------------------------------------
[01:13:04] 
[01:13:04] thread '[run-pass] run-pass/impl-trait/nested.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3291:9
---
[01:13:04] 
[01:13:04] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:495:22
[01:13:04] 
[01:13:04] 
[01:13:04] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/run-pass" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-pass" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:13:04] 
[01:13:04] 
[01:13:04] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:13:04] Build completed unsuccessfully in 0:10:33
[01:13:04] Build completed unsuccessfully in 0:10:33
[01:13:04] Makefile:48: recipe for target 'check' failed
[01:13:04] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:06e3da80
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Jan 30 01:16:30 UTC 2019
---
travis_time:end:072901d1:start=1548810992015867087,finish=1548810992021478033,duration=5610946
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0f5500fb
$ 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:0a693c8e
travis_time:start:0a693c8e
$ 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:1819bb67
$ 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)

@Zoxc Zoxc removed the needs-fcp This change is insta-stable, so needs a completed FCP to proceed. label Jan 30, 2019
@Zoxc Zoxc changed the title Fix #57979 Fix #57730 Jan 30, 2019
@Centril
Copy link
Contributor

Centril commented Jan 31, 2019

@Zoxc This is now fixing a PR, not an issue...

@Zoxc
Copy link
Contributor Author

Zoxc commented Jan 31, 2019

It fixes a bug introduced in the PR. Technically it fixes #57979 too, but we may want to keep that open until we actually error on the example there.

@Zoxc Zoxc removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Jan 31, 2019
@nikomatsakis
Copy link
Contributor

r? @nikomatsakis

@nikomatsakis
Copy link
Contributor

Per my comment here, this could was never actually meant to be accepted. I haven't read the details of this PR yet, so I'm not sure precisely what we should do make it start erroring again -- or maybe we want a future compatibility warning.

@Zoxc
Copy link
Contributor Author

Zoxc commented Jan 31, 2019

This PR just fixed a bug which causes part of AST validation to be skipped. We definitely want to merge this.

@Centril
Copy link
Contributor

Centril commented Jan 31, 2019

@Zoxc Ok; Can you add tests ensuring that #57979 (comment) (in return position also) doesn't compile?

@Zoxc
Copy link
Contributor Author

Zoxc commented Jan 31, 2019

@Centril I'm not sure what you mean. That does compile.

@Centril
Copy link
Contributor

Centril commented Jan 31, 2019

@Zoxc On nightly, @KodrAus's snippet doesn't compile. This is intended behavior.
IOW, I think you inadvertently fixed a bug in the nested impl trait checking.
It should be an error to write impl A<B = impl C<impl D>> whether in argument or return position.

@nikomatsakis
Copy link
Contributor

@Zoxc ok, I agree that we ought to land this PR, which looks "clearly correct". We'll want to "fix" #57979 too but we can handle that separately I suppose.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 1, 2019

📌 Commit e6d5f25 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 1, 2019
@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 1, 2019
@nikomatsakis
Copy link
Contributor

Hmm, according to my local testing, we still see the expected error here, even with this patch applied. I'm pushing a test case, let's see what travis thinks.

@rust-highfive
Copy link
Collaborator

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:1176d3fe:start=1549042244360760462,finish=1549042386939791067,duration=142579030605
$ 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:59:27] .................................................................................................... 2600/5359
[00:59:30] .................................................................................................... 2700/5359
[00:59:35] .................................................................................................... 2800/5359
[00:59:39] .................................................................................................... 2900/5359
[00:59:42] ........F........................................................................................... 3000/5359
[00:59:49] .................................................................................................... 3200/5359
[00:59:52] ...................i................................................................................ 3300/5359
[00:59:56] ....................................................................................ii...i..ii...... 3400/5359
[00:59:59] .................................................................................................... 3500/5359
---
[01:01:07] failures:
[01:01:07] 
[01:01:07] ---- [ui] ui/issues/issue-57979.rs stdout ----
[01:01:07] normalized stderr:
[01:01:07] error[E0666]: nested `impl Trait` is not allowed
[01:01:07]    |
[01:01:07]    |
[01:01:07] LL | pub fn collect(_: impl IntoIterator<Item = impl Borrow<Data<impl AsRef<[u8]>>>>) {
[01:01:07]    |                                            |                |
[01:01:07]    |                                            |                |
[01:01:07]    |                                            |                nested `impl Trait` here
[01:01:07]    |                                            outer `impl Trait`
[01:01:07] 
[01:01:07] error[E0601]: `main` function not found in crate `issue_57979`
[01:01:07]    |
[01:01:07]    = note: consider adding a `main` function to `$DIR/issue-57979.rs`
[01:01:07] error: aborting due to 2 previous errors
[01:01:07] 
[01:01:07] Some errors occurred: E0601, E0666.
[01:01:07] For more information about an error, try `rustc --explain E0601`.
[01:01:07] For more information about an error, try `rustc --explain E0601`.
[01:01:07] 
[01:01:07] 
[01:01:07] 
[01:01:07] The actual stderr differed from the expected stderr.
[01:01:07] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-57979/issue-57979.stderr
[01:01:07] To update references, rerun the tests and pass the `--bless` flag
[01:01:07] To only update this specific test, also pass `--test-args issues/issue-57979.rs`
[01:01:07] error: 1 errors occurred comparing output.
[01:01:07] status: exit code: 1
[01:01:07] status: exit code: 1
[01:01:07] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-57979.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-57979/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-57979/auxiliary" "-A" "unused"
[01:01:07] ------------------------------------------
[01:01:07] 
[01:01:07] ------------------------------------------
[01:01:07] stderr:
[01:01:07] stderr:
[01:01:07] ------------------------------------------
[01:01:07] {"message":"nested `impl Trait` is not allowed","code":{"code":"E0666","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-57979.rs","byte_start":1209,"byte_end":1244,"line_start":39,"line_end":39,"column_start":44,"column_end":79,"is_primary":false,"text":[{"text":"pub fn collect(_: impl IntoIterator<Item = impl Borrow<Data<impl AsRef<[u8]>>>>) {","highlight_start":44,"highlight_end":79}],"label":"outer `impl Trait`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-57979.rs","byte_start":1226,"byte_end":1242,"line_start":39,"line_end":39,"column_start":61,"column_end":77,"is_primary":true,"text":[{"text":"pub fn collect(_: impl IntoIterator<Item = impl Borrow<Data<impl AsRef<[u8]>>>>) {","highlight_start":61,"highlight_end":77}],"label":"nested `impl Trait` here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0666]: nested `impl Trait` is not allowed\n  --> /checkout/src/test/ui/issues/issue-57979.rs:39:61\n   |\nLL | pub fn collect(_: impl IntoIterator<Item = impl Borrow<Data<impl AsRef<[u8]>>>>) {\n   |                                            -----------------^^^^^^^^^^^^^^^^--\n   |                                            |                |\n   |                                            |                nested `impl Trait` here\n   |                                            outer `impl Trait`\n\n"}
[01:01:07] {"message":"`main` function not found in crate `issue_57979`","code":{"code":"E0601","explanation":"\nNo `main` function was found in a binary crate. To fix this error, add a\n`main` function. For example:\n\n```\nfn main() {\n    // Your program will start here.\n    println!(\"Hello world!\");\n}\n```\n\nIf you don't know the basics of Rust, you can go look to the Rust Book to get\nstarted: https://doc.rust-lang.org/book/\n"},"level":"error","spans":[],"children":[{"message":"consider adding a `main` function to `/checkout/src/test/ui/issues/issue-57979.rs`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0601]: `main` function not found in crate `issue_57979`\n   |\n   = note: consider adding a `main` function to `/checkout/src/test/ui/issues/issue-57979.rs`\n\n"}
[01:01:07] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[01:01:07] {"message":"Some errors occurred: E0601, E0666.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0601, E0666.\n"}
[01:01:07] 
[01:01:07] ------------------------------------------
[01:01:07] 
[01:01:07] thread '[ui] ui/issues/issue-57979.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3295:9
---
[01:01:07] 
[01:01:07] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:502:22
[01:01:07] 
[01:01:07] 
[01:01:07] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:01:07] 
[01:01:07] 
[01:01:07] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:01:07] Build completed unsuccessfully in 0:04:05
[01:01:07] Build completed unsuccessfully in 0:04:05
[01:01:07] make: *** [check] Error 1
[01:01:07] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:16973fae
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Fri Feb  1 18:34:26 UTC 2019
---
travis_time:end:257adab8:start=1549046067773508098,finish=1549046067778527594,duration=5019496
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0e7cff50
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!chec

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)

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Feb 14, 2019

r=me if travis is happy. As discussed in the compiler meeting, this PR seems to fix an obvious bug, but I don't think that it actually affects the behavior of #57979 at all. I added a regression test for the moment that documents the behavior in that case, since apparently it was untested. Locally, that test passes for me.

@cramertj
Copy link
Member

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Feb 14, 2019

📌 Commit cce2c89 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 14, 2019
bors added a commit that referenced this pull request Feb 16, 2019
Rollup of 19 pull requests

Successful merges:

 - #57929 (Rustdoc remove old style files)
 - #57981 (Fix #57730)
 - #58074 (Stabilize slice_sort_by_cached_key)
 - #58196 (Add specific feature gate error for const-unstable features)
 - #58293 (Remove code for updating copyright years in generate-deriving-span-tests)
 - #58306 (Don't default on std crate when manipulating browser history)
 - #58359 (librustc_mir: use ? in impl_snapshot_for! macro)
 - #58395 (Instant::checked_duration_since)
 - #58429 (fix Box::into_unique effecitvely transmuting to a raw ptr)
 - #58433 (Update which libcore/liballoc tests Miri ignores, and document why)
 - #58438 (Use posix_spawn_file_actions_addchdir_np when possible)
 - #58440 (Whitelist the ARM v6 target-feature)
 - #58448 (rustdoc: mask `compiler_builtins` docs)
 - #58468 (split MaybeUninit into several features, expand docs a bit)
 - #58477 (Fix the syntax error in publish_toolstate.py)
 - #58479 (compile-pass test for #53606)
 - #58489 (Fix runtime error in generate-keyword-tests)
 - #58496 (Fix documentation for std::path::PathBuf::pop)
 - #58509 (Notify myself when Clippy toolstate changes)
bors added a commit that referenced this pull request Feb 17, 2019
Rollup of 19 pull requests

Successful merges:

 - #57929 (Rustdoc remove old style files)
 - #57981 (Fix #57730)
 - #58074 (Stabilize slice_sort_by_cached_key)
 - #58196 (Add specific feature gate error for const-unstable features)
 - #58293 (Remove code for updating copyright years in generate-deriving-span-tests)
 - #58306 (Don't default on std crate when manipulating browser history)
 - #58359 (librustc_mir: use ? in impl_snapshot_for! macro)
 - #58395 (Instant::checked_duration_since)
 - #58429 (fix Box::into_unique effecitvely transmuting to a raw ptr)
 - #58433 (Update which libcore/liballoc tests Miri ignores, and document why)
 - #58438 (Use posix_spawn_file_actions_addchdir_np when possible)
 - #58440 (Whitelist the ARM v6 target-feature)
 - #58448 (rustdoc: mask `compiler_builtins` docs)
 - #58468 (split MaybeUninit into several features, expand docs a bit)
 - #58479 (compile-pass test for #53606)
 - #58489 (Fix runtime error in generate-keyword-tests)
 - #58496 (Fix documentation for std::path::PathBuf::pop)
 - #58509 (Notify myself when Clippy toolstate changes)
 - #58521 (Fix tracking issue for error iterators)
@bors bors merged commit cce2c89 into rust-lang:master Feb 17, 2019
@Zoxc Zoxc deleted the fix-57979 branch February 17, 2019 11:59
bors added a commit that referenced this pull request Mar 12, 2019
…mpl-trait, r=zoxc

Warning period for detecting nested impl trait

Here is some proposed code for making a warning period for the new checking of nested impl trait.

It undoes some of the corrective effects of PR #57730, by using boolean flags to track parts of the analysis that were previously skipped prior to PRs #57730 and #57981 landing.

Cc #57979
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants