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

Improve query cycle error message #49950

Merged
merged 3 commits into from
Apr 18, 2018
Merged

Improve query cycle error message #49950

merged 3 commits into from
Apr 18, 2018

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Apr 13, 2018

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 13, 2018
@@ -312,7 +312,7 @@ impl<'a> Builder<'a> {
tool::RustInstaller, tool::Cargo, tool::Rls, tool::Rustdoc, tool::Clippy,
native::Llvm, tool::Rustfmt, tool::Miri, native::Lld),
Kind::Check => describe!(check::Std, check::Test, check::Rustc),
Kind::Test => describe!(test::Tidy, test::Bootstrap, test::Ui, test::RunPass,
Kind::Test => describe!(test::Tidy,/* test::Bootstrap,*/ test::Ui, test::RunPass,
Copy link
Member

Choose a reason for hiding this comment

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

Spurious change. I should investigate...

Copy link
Member

Choose a reason for hiding this comment

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

What's this about?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bootstrap tests look for cc, which do not exist on Windows and I need to run tests locally to update them.

@rust-highfive
Copy link
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.
[00:01:02] configure: rust.quiet-tests     := True
---
[00:39:46] ...............................................................................i....................
[00:39:51] ......................i.............................................................................
[00:39:55] ....................................................................................................
[00:39:59] ....................................................................................................
[00:40:02] ....................................................................................................
[00:40:06] ....................................................................................................
[00:40:12] .............F.....................................................................................F
[00:40:18] .F..........................................F.......................................................
[00:40:24] ....................................................................................................
[00:40:30] ..................i...........................................................................i.....
[00:40:36] ....................................................................................................
[00:40:42] ........ii..........................................................................................
---
[00:40:53] 34 LL | fn cycle1() -> impl Clone {
[00:40:53] -    | ^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference
[00:40:53] +    |                ^^^^^^^^^^ cyclic reference
[00:40:53] 36    |
[00:40:53] 37 note: the cycle begins when processing `cycle1`...
---
[00:40:53] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'impl-trait/auto-trait-leak.rs'
[00:40:53]
[00:40:53] error: 1 errors occurred comparing output.
[00:40:53] status: exit code: 101
[00:40:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/impl-trait/auto-trait-leak.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/impl-trait/auto-trait-leak.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/impl-trait/auto-trait-leak.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:40:53] {"message":"the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":721,"byte_end":725,"line_start":25,"line_end":25,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    send(before());","highlight_start":5,"highlight_end":9}],"label":"`std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely","suggested_replacement":null,"expansion":null}],"children":[{"message":"within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:19:5: 19:22 p:std::rc::Rc<std::cell::Cell<i32>>]`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `impl std::ops::Fn<(i32,)>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `send`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":678,"byte_end":700,"line_start":22,"line_end":22,"column_start":1,"column_end":23,"is_primary":true,"text":[{"text":"fn send<T: Send>(_: T) {}","highlight_start":1,"highlight_end":23}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:25:5\n   |\nLL |     send(before());\n   |     ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely\n   |\n   = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`\n   = note: required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:19:5: 19:22 p:std::rc::Rc<std::cell::Cell<i32>>]`\n   = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`\nnote: required by `send`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:22:1\n   |\nLL | fn send<T: Send>(_: T) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:40:53] {"message":"the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":845,"byte_end":849,"line_start":28,"line_end":28,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    send(after());","highlight_start":5,"highlight_end":9}],"label":"`std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely","suggested_replacement":null,"expansion":null}],"children":[{"message":"within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:36:5: 36:22 p:std::rc::Rc<std::cell::Cell<i32>>]`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `impl std::ops::Fn<(i32,)>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `send`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":678,"byte_end":700,"line_start":22,"line_end":22,"column_start":1,"column_end":23,"is_primary":true,"text":[{"text":"fn send<T: Send>(_: T) {}","highlight_start":1,"highlight_end":23}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:28:5\n   |\nLL |     send(after());\n   |     ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely\n   |\n   = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`\n   = note: required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:36:5: 36:22 p:std::rc::Rc<std::cell::Cell<i32>>]`\n   = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`\nnote: required by `send`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:22:1\n   |\nLL | fn send<T: Send>(_: T) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:40:53] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:486:22
[00:40:53] {"message":"cyclic dependency detected","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1341,"byte_end":1351,"line_start":42,"line_end":42,"column_start":16,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle1() -> impl Clone {","highlight_start":16,"highlight_end":26}],"label":"cyclic reference","suggested_replacement":null,"expansion":null}],"children":[{"message":"the cycle begins when processing `cycle1`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1326,"byte_end":1351,"line_start":42,"line_end":42,"column_start":1,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle1() -> impl Clone {","highlight_start":1,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then requires processing `cycle2::{{impl-Trait}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1495,"byte_end":1505,"line_start":50,"line_end":50,"column_start":16,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle2() -> impl Clone {","highlight_start":16,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then requires processing `cycle2`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1480,"byte_end":1505,"line_start":50,"line_end":50,"column_start":1,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle2() -> impl Clone {","highlight_start":1,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then requires processing `cycle1::{{impl-Trait}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1341,"byte_end":1351,"line_start":42,"line_end":42,"column_start":16,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle1() -> impl Clone {","highlight_start":16,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then again requires processing `cycle1`, completing the cycle.","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0391]: cyclic dependency detected\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:42:16\n   |\nLL | fn cycle1() -> impl Clone {\n   |                ^^^^^^^^^^ cyclic reference\n   |\nnote: the cycle begins when processing `cycle1`...\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:42:1\n   |\nLL | fn cycle1() -> impl Clone {\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^\nnote: ...which then requires processing `cycle2::{{impl-Trait}}`...\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:50:16\n   |\nLL | fn cycle2() -> impl Clone {\n   |                ^^^^^^^^^^\nnote: ...which then requires processing `cycle2`...\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:50:1\n   |\nLL | fn cycle2() -> impl Clone {\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^\nnote: ...which then requires processing `cycle1::{{impl-Trait}}`...\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:42:16\n   |\nLL | fn cycle1() -> impl Clone {\n   |                ^^^^^^^^^^\n   = note: ...which then again requires processing `cycle1`, completing the cycle.\n\n"}
[00:40:53] {"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
[00:40:53] {"message":"Some errors occurred: E0277, E0391.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0277, E0391.\n"}
[00:40:53] {"message":"For more information about an error, try `rustc --explain E0277`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0277`.\n"}
---
[00:40:53] - LL |     A = X::A as isize, //~ ERROR E0391
[00:40:53] -    |         ^^^^^^^^^^^^^ cyclic reference
[00:40:53] 6    |
[00:40:53] 7 note: the cycle begins when const-evaluating `X::A::{{initializer}}`...
[00:40:53] 8   --> $DIR/issue-23302-1.rs:14:9
[00:40:53]
[00:40:53]
[00:40:53] The actual stderr differed from the expected stderr.
[00:40:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issue-23302-1.stderr
[00:40:53] To update references, run this command from build directory:
[00:40:53] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'issue-23302-1.rs'
[00:40:53]
[00:40:53] error: 1 errors occurred comparing output.
[00:40:53] status: exit code: 101
[00:40:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-23302-1.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-23302-1.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/issue-23302-1.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:40:53] {"message":"cyclic dependency detected","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-1.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"// Copyright 2015 The Rust Project Developers. See the COPYRIGHT","highlight_start":1,"highlight_end":1}],"label":"cyclic reference","suggested_replacement":null,"expansion":null}],"children":[{"message":"the cycle begins when const-evaluating `X::A::{{initializer}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-1.rs","byte_start":612,"byte_end":625,"line_start":14,"line_end":14,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"    A = X::A as isize, //~ ERROR E0391","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then requires computing layout of `X`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-1.rs","byte_start":612,"byte_end":616,"line_start":14,"line_end":14,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":"    A = X::A as isize, //~ ERROR E0391","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then again requires const-evaluating `X::A::{{initializer}}`, completing the cycle.","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0391]: cyclic dependency detected\n   |\nnote: the cycle begins when const-evaluating `X::A::{{initializer}}`...\n  --> /checkout/src/test/ui/issue-23302-1.rs:14:9\n   |\nLL |     A = X::A as isize, //~ ERROR E0391\n   |         ^^^^^^^^^^^^^\nnote: ...which then requires computing layout of `X`...\n  --> /checkout/src/test/ui/issue-23302-1.rs:14:9\n   |\nLL |     A = X::A as isize, //~ ERROR E0391\n   |         ^^^^\n   = note: ...which then again requires const-evaluating `X::A::{{initializer}}`, completing the cycle.\n\n"}
[00:40:53] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:40:53] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:40:53] - LL |     A = Y::B as isize, //~ ERROR E0391
[00:40:53] -    |         ^^^^^^^^^^^^^ cyclic reference
[00:40:53] 6    |
[00:40:53] 7 note: the cycle begins when const-evaluating `Y::A::{{initializer}}`...
[00:40:53] 8   --> $DIR/issue-23302-2.rs:14:9
[00:40:53]
[00:40:53]
[00:40:53] The actual stderr differed from the expected stderr.
[00:40:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issue-23302-2.stderr
[00:40:53] To update references, run this command from build directory:
[00:40:53] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'issue-23302-2.rs'
[00:40:53]
[00:40:53] error: 1 errors occurred comparing output.
[00:40:53] status: exit code: 101
[00:40:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-23302-2.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-23302-2.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/issue-23302-2.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:40:53] {"message":"cyclic dependency detected","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-2.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"// Copyright 2015 The Rust Project Developers. See the COPYRIGHT","highlight_start":1,"highlight_end":1}],"label":"cyclic reference","suggested_replacement":null,"expansion":null}],"children":[{"message":"the cycle begins when const-evaluating `Y::A::{{initializer}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-2.rs","byte_start":567,"byte_end":580,"line_start":14,"line_end":14,"column_start":9,"column_end":22,"is_primary":true,"text":[{"text":"    A = Y::B as isize, //~ ERROR E0391","highlight_start":9,"highlight_end":22}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then requires computing layout of `Y`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-2.rs","byte_start":567,"byte_end":571,"line_start":14,"line_end":14,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":"    A = Y::B as isize, //~ ERROR E0391","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle.","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0391]: cyclic dependency detected\n   |\nnote: the cycle begins when const-evaluating `Y::A::{{initializer}}`...\n  --> /checkout/src/test/ui/issue-23302-2.rs:14:9\n   |\nLL |     A = Y::B as isize, //~ ERROR E0391\n   |         ^^^^^^^^^^^^^\nnote: ...which then requires computing layout of `Y`...\n  --> /checkout/src/test/ui/issue-23302-2.rs:14:9\n   |\nLL |     A = Y::B as isize, //~ ERROR E0391\n   |         ^^^^\n   = note: ...which then again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle.\n\n"}
[00:40:53] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:40:53] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:40:53] - LL |     B = A, //~ ERROR E0391
[00:40:53] -    |         ^ cyclic reference
[00:40:53] 6    |
[00:40:53] 7 note: the cycle begins when const-evaluating `Foo::B::{{initializer}}`...
[00:40:53] 8   --> $DIR/issue-36163.rs:14:9
[00:40:53]
[00:40:53]
[00:40:53] The actual stderr differed from the expected stderr.
[00:40:53] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issue-36163.stderr
[00:40:53] To update references, run this command from build directory:
[00:40:53] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'issue-36163.rs'
[00:40:53]
[00:40:53] error: 1 errors occurred comparing output.
[00:40:53] status: exit code: 101
[00:40:53] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-36163.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-36163.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/issue-36163.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:40:53] {"message":"cyclic dependency detected","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"// Copyright 2012 The Rust Project Developers. See the COPYRIGHT","highlight_start":1,"highlight_end":1}],"label":"cyclic reference","suggested_replacement":null,"expansion":null}],"children":[{"message":"the cycle begins when const-evaluating `Foo::B::{{initializer}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":521,"byte_end":522,"line_start":14,"line_end":14,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"    B = A, //~ ERROR E0391","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then requires processing `Foo::B::{{initializer}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":521,"byte_end":522,"line_start":14,"line_end":14,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"    B = A, //~ ERROR E0391","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then requires const-evaluating `A`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":467,"byte_end":500,"line_start":11,"line_end":11,"column_start":1,"column_end":34,"is_primary":true,"text":[{"text":"const A: isize = Foo::B as isize;","highlight_start":1,"highlight_end":34}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then requires computing layout of `Foo`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":484,"byte_end":490,"line_start":11,"line_end":11,"column_start":18,"column_end":24,"is_primary":true,"text":[{"text":"const A: isize = Foo::B as isize;","highlight_start":18,"highlight_end":24}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which then again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle.","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0391]: cyclic dependency detected\n   |\nnote: the cycle begins when const-evaluating `Foo::B::{{initializer}}`...\n  --> /checkout/src/test/ui/issue-36163.rs:14:9\n   |\nLL |     B = A, //~ ERROR E0391\n   |         ^\nnote: ...which then requires processing `Foo::B::{{initializer}}`...\n  --> /checkout/src/test/ui/issue-36163.rs:14:9\n   |\nLL |     B = A, //~ ERROR E0391\n   |         ^\nnote: ...which then requires const-evaluating `A`...\n  --> /checkout/src/test/ui/issue-36163.rs:11:1\n   |\nLL | const A: isize = Foo::B as isize;\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nnote: ...which then requires computing layout of `Foo`...\n  --> /checkout/src/test/ui/issue-36163.rs:11:18\n   |\nLL | const A: isize = Foo::B as isize;\n   |                  ^^^^^^\n   = note: ...which then again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle.\n\n"}
[00:40:53] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:40:53] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:40:53] 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-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zmiri -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zmiri -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" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:40:53] expected success, got: exit code: 101
[00:40:53]
[00:40:53]
[00:40:53] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:40:53] Build completed unsuccessfully in 0:01:42
[00:40:53] make: *** [check] Error 1
[00:40:53] Makefile:58: recipe for target 'check' failed
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:021b3be9:start=1523643112757680693,finish=1523643112764024147,duration=6343454
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:0ebffe27
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:0ebffe27:start=1523643112769610858,finish=1523643112775245414,duration=5634556
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:173cd2b8
$ dmesg | grep -i kill
[   10.180488] init: failsafe main process (1093) killed by TERM signal

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 changed the title [WIP] Call default_span lazily when query cycles occur instead of in the hot path for queries [WIP] Improve query cycle error message Apr 13, 2018
@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 13, 2018

This now changes query cycle error messages. For the following file:

trait A: B {}

trait B: C {}

trait C: B {}

fn main() {}

It will output:

error[E0391]: cycle detected when computing the supertraits of `B`
  |
note: ...which requires computing the supertraits of `C`...
 --> e.rs:3:1
  |
3 | trait B: C {}
  | ^^^^^^^^^^
note: ...which again requires computing the supertraits of `B`, completing the cycle
 --> e.rs:5:1
  |
5 | trait C: B {}
  | ^^^^^^^^^^
note: cycle used when computing the supertraits of `A`
 --> e.rs:1:1
  |
1 | trait A: B {}
  | ^^^^^^^^^^

It was previously:

error[E0391]: cyclic dependency detected
 --> e.rs:5:1
  |
5 | trait C: B {}
  | ^^^^^^^^^^ cyclic reference
  |
note: the cycle begins when computing the supertraits of `B`...
 --> e.rs:1:1
  |
1 | trait A: B {}
  | ^^^^^^^^^^
note: ...which then requires computing the supertraits of `C`...
 --> e.rs:3:1
  |
3 | trait B: C {}
  | ^^^^^^^^^^
  = note: ...which then again requires computing the supertraits of `B`, completing the cycle.

cc @estebank @nikomatsakis

@rust-highfive
Copy link
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.
Resolving deltas: 100% (615406/615406), completed with 4898 local objects.
---
[00:00:46] configure: rust.quiet-tests     := True
---
[00:43:57] ...............................................................................i....................
[00:44:03] ......................i..F..........................................................................
[00:44:07] ....................................................................................................
[00:44:11] ....................................................................................................
[00:44:16] ....................................................................................................
[00:44:20] ....................................................................................................
[00:44:26] .............F...........................................................F........................F.
[00:44:33] .F.F.........................................F......................................................
[00:44:39] ....................................................................................................
[00:44:47] ...................i...........................................................................i....
[00:44:54] ........................................................................F...........................
[00:45:00] .........ii.........................................................................................
---
[00:45:12] - error[E0391]: cyclic dependency detected
[00:45:12] + error[E0391]: cycle detected when computing the supertraits of `B`
[00:45:12] +    |
[00:45:12] + note: ...which requires computing the supertraits of `C`...
[00:45:12] +   --> $DIR/cycle-trait-supertrait-indirect.rs:17:1
[00:45:12] +    |
[00:45:12] + LL | trait B: C {
[00:45:12] +    | ^^^^^^^^^^
[00:45:12] + note: ...which again requires computing the supertraits of `B`, completing the cycle
[00:45:12] 2   --> $DIR/cycle-trait-supertrait-indirect.rs:20:1
[00:45:12] 3    |
[00:45:12] 4 LL | trait C: B { }
[00:45:12]
[00:45:12] -    | ^^^^^^^^^^ cyclic reference
[00:45:12] -    |
[00:45:12] - note: the cycle begins when computing the supertraits of `B`...
[00:45:12] +    | ^^^^^^^^^^
[00:45:12] + note: cycle used when computing the supertraits of `A`
[00:45:12] 8   --> $DIR/cycle-trait-supertrait-indirect.rs:14:1
[00:45:12] 9    |
[00:45:12] 10 LL | trait A: B {
[00:45:12]
[00:45:12] 11    | ^^^^^^^^^^
[00:45:12] - note: ...which then requires computing the supertraits of `C`...
[00:45:12] -   --> $DIR/cycle-trait-supertrait-indirect.rs:17:1
[00:45:12] -    |
[00:45:12] - LL | trait B: C {
[00:45:12] -    | ^^^^^^^^^^
[00:45:12] -    = note: ...which then again requires computing the supertraits of `B`, completing the cycle.
---
[00:45:12] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'cycle-trait-supertrait-indirect.rs'
[00:45:12]
[00:45:12] error: 1 errors occurred comparing output.
[00:45:12] status: exit code: 101
[00:45:12] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/cycle-trait-supertrait-indirect.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/cycle-trait-supertrait-indirect.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/cycle-trait-supertrait-indirect.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:45:12] {"message":"cycle detected when computing the supertraits of `B`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[],"children":[{"message":"...which requires computing the supertraits of `C`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/cycle-trait-supertrait-indirect.rs","byte_start":592,"byte_end":602,"line_start":17,"line_end":17,"column_start":1,"column_end":11,"is_primary":true,"text":[{"text":"trait B: C {","highlight_start":1,"highlight_end":11}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires computing the supertraits of `B`, completing the cycle","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/cycle-trait-supertrait-indirect.rs","byte_start":608,"byte_end":618,"line_start":20,"line_end":20,"column_start":1,"column_end":11,"is_primary":true,"text":[{"text":"trait C: B { }","highlight_start":1,"highlight_end":11}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"cycle used when computing the supertraits of `A`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/cycle-trait-supertrait-indirect.rs","byte_start":576,"byte_end":586,"line_start":14,"line_end":14,"column_start":1,"column_end":11,"is_primary":true,"text":[{"text":"trait A: B {","highlight_start":1,"highlight_end":11}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when computing the supertraits of `B`\n   |\nnote: ...which requires computing the supertraits of `C`...\n  --> /checkout/src/test/ui/cycle-trait-supertrait-indirect.rs:17:1\n   |\nLL | trait B: C {\n   | ^^^^^^^^^^\nnote: ...which again requires computing the supertraits of `B`, completing the cycle\n  --> /checkout/src/test/ui/cycle-trait-supertrait-indirect.rs:20:1\n   |\nLL | trait C: B { }\n   | ^^^^^^^^^^\nnote: cycle used when computing the supertraits of `A`\n  --> /checkout/src/test/ui/cycle-trait-supertrait-indirect.rs:14:1\n   |\nLL | trait A: B {\n   | ^^^^^^^^^^\n\n"}
[00:45:12] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:45:12] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:45:12] 28 LL | fn send<T: Send>(_: T) {}
[00:45:12] 29    | ^^^^^^^^^^^^^^^^^^^^^^
[00:45:12] 30
[00:45:12] - error[E0391]: cyclic dependency detected
[00:45:12] -   --> $DIR/auto-trait-leak.rs:42:1
[00:45:12] + error[E0391]: cycle detected when processing `cycle1`
[00:45:12] 33    |
[00:45:12] - LL | fn cycle1() -> impl Clone {
[00:45:12] -    | ^^^^^^^^^^^^^^^^^^^^^^^^^ cyclic reference
[00:45:12] -    |
[00:45:12] - note: the cycle begins when processing `cycle1`...
[00:45:12] -   --> $DIR/auto-trait-leak.rs:42:1
[00:45:12] -    |
[00:45:12] - LL | fn cycle1() -> impl Clone {
[00:45:12] -    | ^^^^^^^^^^^^^^^^^^^^^^^^^
[00:45:12] - note: ...which then requires processing `cycle2::{{impl-Trait}}`...
[00:45:12] + note: ...which requires processing `cycle2::{{impl-Trait}}`...
[00:45:12] 43   --> $DIR/auto-trait-leak.rs:50:16
[00:45:12] 44    |
[00:45:12] 45 LL | fn cycle2() -> impl Clone {
[00:45:12]
[00:45:12] 46    |                ^^^^^^^^^^
[00:45:12] - note: ...which then requires processing `cycle2`...
[00:45:12] + note: ...which requires processing `cycle2`...
[00:45:12] 48   --> $DIR/auto-trait-leak.rs:50:1
[00:45:12] 49    |
[00:45:12] 50 LL | fn cycle2() -> impl Clone {
[00:45:12]
[00:45:12] 51    | ^^^^^^^^^^^^^^^^^^^^^^^^^
[00:45:12] - note: ...which then requires processing `cycle1::{{impl-Trait}}`...
[00:45:12] + note: ...which requires processing `cycle1::{{impl-Trait}}`...
[00:45:12] 53   --> $DIR/auto-trait-leak.rs:42:16
[00:45:12] 54    |
[00:45:12] 55 LL | fn cycle1() -> impl Clone {
[00:45:12]
[00:45:12] 56    |                ^^^^^^^^^^
[00:45:12] -    = note: ...which then again requires processing `cycle1`, completing the cycle.
[00:45:12] + note: ...which again requires processing `cycle1`, completing the cycle
[00:45:12] +   --> $DIR/auto-trait-leak.rs:42:16
[00:45:12] +    |
[00:45:12] + LL | fn cycle1() -> impl Clone {
[00:45:12] +    |                ^^^^^^^^^^
[00:45:12] + note: cycle used when type-checking all item bodies
[00:45:12] +   --> $DIR/auto-trait-leak.rs:42:1
[00:45:12] +    |
[00:45:12] + LL | fn cycle1() -> impl Clone {
[00:45:12] +    | ^^^^^^^^^^^^^^^^^^^^^^^^^
---
[00:45:12] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'impl-trait/auto-trait-leak.rs'
[00:45:12]
[00:45:12] error: 1 errors occurred comparing output.
[00:45:12] status: exit code: 101
[00:45:12] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/impl-trait/auto-trait-leak.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/impl-trait/auto-trait-leak.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/impl-trait/auto-trait-leak.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:45:12] {"message":"the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this erameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":721,"byte_end":725,"line_start":25,"line_end":25,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    send(before());","highlight_start":5,"highlight_end":9}],"label":"`std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely","suggested_replacement":null,"expansion":null}],"children":[{"message":"within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:19:5: 19:22 p:std::rc::Rc<std::cell::Cell<i32>>]`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `impl std::ops::Fn<(i32,)>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `send`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":678,"byte_end":700,"line_start":22,"line_end":22,"column_start":1,"column_end":23,"is_primary":true,"text":[{"text":"fn send<T: Send>(_: T) {}","highlight_start":1,"highlight_end":23}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:25:5\n   |\nLL |     send(before());\n   |     ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely\n   |\n   = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`\n   = note: required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:19:5: 19:22 p:std::rc::Rc<std::cell::Cell<i32>>]`\n   = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`\nnote: required by `send`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:22:1\n   |\nLL | fn send<T: Send>(_: T) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:45:12] {"message":"the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":845,"byte_end":849,"line_start":28,"line_end":28,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    send(after());","highlight_start":5,"highlight_end":9}],"label":"`std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely","suggested_replacement":null,"expansion":null}],"children":[{"message":"within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:36:5: 36:22 p:std::rc::Rc<std::cell::Cell<i32>>]`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `impl std::ops::Fn<(i32,)>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `send`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":678,"byte_end":700,"line_start":22,"line_end":22,"column_start":1,"column_end":23,"is_primary":true,"text":[{"text":"fn send<T: Send>(_: T) {}","highlight_start":1,"highlight_end":23}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:28:5\n   |\nLL |     send(after());\n   |     ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely\n   |\n   = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`\n   = note: required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:36:5: 36:22 p:std::rc::Rc<std::cell::Cell<i32>>]`\n   = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`\nnote: required by `send`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:22:1\n   |\nLL | fn send<T: Send>(_: T) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:45:12] {"message":"cycle detected when processing `cycle1`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[],"children":[{"message":"...which requires processing `cycle2::{{impl-Trait}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1495,"byte_end":1505,"line_start":50,"line_end":50,"column_start":16,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle2() -> impl Clone {","highlight_start":16,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires processing `cycle2`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1480,"byte_end":1505,"line_start":50,"line_end":50,"column_start":1,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle2() -> impl Clone {","highlight_start":1,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires processing `cycle1::{{impl-Trait}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1341,"byte_end":1351,"line_start":42,"line_end":42,"column_start":16,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle1() -> impl Clone {","highlight_start":16,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires processing `cycle1`, completing the cycle","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1341,"byte_end":1351,"line_start":42,"line_end":42,"column_start":16,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle1() -> impl Clone {","highlight_start":16,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"cycle used when type-checking all item bodies","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1326,"byte_end":1351,"line_start":42,"line_end":42,"column_start":1,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle1() -> impl Clone {","highlight_start":1,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0391]: cy:12] To update references, run this command from build directory:
[00:45:12] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'issue-12511.rs'
[00:45:12]
[00:45:12] error: 1 errors occurred comparing output.
[00:45:12] status: exit code: 101
[00:45:12] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-12511.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-12511.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/issue-12511.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:45:12] {"message":"cycle detected when computing the supertraits of `t1`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[],"children":[{"message":"...which requires computing the supertraits of `t2`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-12511.rs","byte_start":467,"byte_end":480,"line_start":11,"line_end":11,"column_start":1,"column_end":14,"is_primary":true,"text":[{"text":"trait t1 : t2 {","highlight_start":1,"highlight_end":14}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires computing the supertraits of `t1`, completing the cycle","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-12511.rs","byte_start":486,"byte_end":499,"line_start":14,"line_end":14,"column_start":1,"column_end":14,"is_primary":true,"text":[{"text":"trait t2 : t1 {","highlight_start":1,"highlight_end":14}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when computing the supertraits of `t1`\n   |\nnote: ...which requires computing the supertraits of `t2`...\n  --> /checkout/src/test/ui/issue-12511.rs:11:1\n   |\nLL | trait t1 : t2 {\n   | ^^^^^^^^^^^^^\nnote: ...which again requires computing the supertraits of `t1`, completing the cycle\n  --> /checkout/src/test/ui/issue-12511.rs:14:1\n   |\nLL | trait t2 : t1 {\n   | ^^^^^^^^^^^^^\n\n"}
[00:45:12] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:45:12] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:45:12] - error[E0391]: cyclic dependency detected
[00:45:12] -   --> $DIR/issue-23302-1.rs:14:9
[00:45:12] + error[E0391]: cycle detected when const-evaluating `X::A::{{initializer}}`
[00:45:12] 3    |
[00:45:12] - LL |     A = X::A as isize, //~ ERROR E0391
[00:45:12] -    |         ^^^^^^^^^^^^^ cyclic reference
[00:45:12] -    |
[00:45:12] - note: the cycle begins when const-evaluating `X::A::{{initializer}}`...
[00:45:12] + note: ...which requires computing layout of `X`...
[00:45:12] 8   --> $DIR/issue-23302-1.rs:14:9
[00:45:12] 9    |
[00:45:12] 10 LL |     A = X::A as isize, //~ ERROR E0391
[00:45:12]
[00:45:12] -    |         ^^^^^^^^^^^^^
[00:45:12] - note: ...which then requires computing layout of `X`...
[00:45:12] -   --> $DIR/issue-23302-1.rs:14:9
[00:45:12] -    |
[00:45:12] - LL |     A = X::A as isize, //~ ERROR E0391
[00:45:12] 16    |         ^^^^
[00:45:12] -    = note: ...which then again requires const-evaluating `X::A::{{initializer}}`, completing the cycle.
[00:45:12] + note: ...which again requires const-evaluating `X::A::{{initializer}}`, completing the cycle
---
[00:45:12] Actual stderr san}\n```\n"},"level":"error","spans":[],"children":[{"message":"...which requires computing layout of `X`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-1.rs","byte_start":612,"byte_end":616,"line_start":14,"line_end":14,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":"    A = X::A as isize, //~ ERROR E0391","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires const-evaluating `X::A::{{initializer}}`, completing the cycle","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-1.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"// Copyright 2015 The Rust Project Developers. See the COPYRIGHT","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when const-evaluating `X::A::{{initializer}}`\n   |\nnote: ...which requires computing layout of `X`...\n  --> /checkout/src/test/ui/issue-23302-1.rs:14:9\n   |\nLL |     A = X::A as isize, //~ ERROR E0391\n   |         ^^^^\nnote: ...which again requires const-evaluating `X::A::{{initializer}}`, completing the cycle\n\n"}
[00:45:12] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:45:12] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:45:12] - error[E0391]: cyclic dependency detected
[00:45:12] -   --> $DIR/issue-23302-2.rs:14:9
[00:45:12] + error[E0391]: cycle detected when const-evaluating `Y::A::{{initializer}}`
[00:45:12] 3    |
[00:45:12] - LL |     A = Y::B as isize, //~ ERROR E0391
[00:45:12] -    |         ^^^^^^^^^^^^^ cyclic reference
[00:45:12] -    |
[00:45:12] - note: the cycle begins when const-evaluating `Y::A::{{initializer}}`...
[00:45:12] + note: ...which requires computing layout of `Y`...
[00:45:12] 8   --> $DIR/issue-23302-2.rs:14:9
[00:45:12] 9    |
[00:45:12] 10 LL |     A = Y::B as isize, //~ ERROR E0391
[00:45:12]
[00:45:12] -    |         ^^^^^^^^^^^^^
[00:45:12] - note: ...which then requires computing layout of `Y`...
[00:45:12] -   --> $DIR/issue-23302-2.rs:14:9
[00:45:12] -    |
[00:45:12] - LL |     A = Y::B as isize, //~ ERROR E0391
[00:45:12] 16    |         ^^^^
[00:45:12] -    = note: ...which then again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle.
[00:45:12] + note: ...which again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle
---
[00:45:12] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'issue-23302-2.rs'
[00:45:12]
[00:45:12] error: 1 errors occurred comparing output.
[00:45:12] status: exit code: 101
[00:45:12] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-23302-2.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-23302-2.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/issue-23302-2.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:45:12] {"message":"cycle detected when const-evaluating `Y::A::{{initializer}}`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[],"children":[{"message":"...which requires computing layout of `Y`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-2.rs","byte_start":567,"byte_end":571,"line_start":14,"line_end":14,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":"    A = Y::B as isize, //~ ERROR E0391","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-2.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"// Copyright 2015 The Rust Project Developers. See the COPYRIGHT","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when const-evaluating `Y::A::{{initializer}}`\n   |\nnote: ...which requires computing layout of `Y`...\n  --> /checkout/src/test/ui/issue-23302-2.rs:14:9\n   |\nLL |     A = Y::B as isize, //~ ERROR E0391\n   |         ^^^^\nnote: ...which again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle\n\n"}
[00:45:12] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:45:12] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:45:12] - error[E0391]: cyclic dependency detected
[00:45:12] -   --> $DIR/issue-23302-3.rs:13:16
[00:45:12] + error[E0391]: cycle detected when const checking if rvalue is promotable to static `A`
[00:45:12] 3    |
[00:45:12] - LL | const B: i32 = A; //~ ERROR cyclic dependency detected
[00:45:12] -    |                ^ cyclic reference
[00:45:12] -    |
[00:45:12] - note: the cycle begins when const checking if rvalue is promotable to static `A`...
[00:45:12] + note: ...which requires checking which parts of `A` are promotable to static...
[00:45:12] 8   --> $DIR/issue-23302-3.rs:11:1
[00:45:12] 9    |
[00:45:12] 10 LL | const A: i32 = B;
[00:45:12]
[00:45:12] 11    | ^^^^^^^^^^^^^^^^^
[00:45:12] - note: ...which then requires checking which parts of `A` are promotable to static...
[00:45:12] -   --> $DIR/issue-23302-3.rs:11:1
[00:45:12] -    |
[00:45:12] - LL | const A: i32 = B;
[00:45:12] -    | ^^^^^^^^^^^^^^^^^
[00:45:12] - note: ...which then requires const checking if rvalue is promotable to static `B`...
[00:45:12] + note: ...which requires const checking if rvalue is promotablement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires const checking if rvalue is promotable to static `B`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-3.rs","byte_start":482,"byte_end":483,"line_start":11,"line_end":11,"column_start":16,"column_end":17,"is_primary":true,"text":[{"text":"const A: i32 = B;","highlight_start":16,"highlight_end":17}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires checking which parts of `B` are promotable to static...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-3.rs","byte_start":486,"byte_end":503,"line_start":13,"line_end":13,"column_start":1,"column_end":18,"is_primary":true,"text":[{"text":"const B: i32 = A; //~ ERROR cyclic dependency detected","highlight_start":1,"highlight_end":18}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires const checking if rvalue is promotable to static `A`, completing the cycle","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-3.rs","byte_start":501,"byte_end":502,"line_start":13,"line_end":13,"column_start":16,"column_end":17,"is_primary":true,"text":[{"text":"const B: i32 = A; //~ ERROR cyclic dependency detected","highlight_start":16,"highlight_end":17}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when const checking if rvalue is promotable to static `A`\n   |\nnote: ...which requires checking which parts of `A` are promotable to static...\n  --> /checkout/src/test/ui/issue-23302-3.rs:11:1\n   |\nLL | const A: i32 = B;\n   | ^^^^^^^^^^^^^^^^^\nnote: ...which requires const checking if rvalue is promotable to static `B`...\n  --> /checkout/src/test/ui/issue-23302-3.rs:11:16\n   |\nLL | const A: i32 = B;\n   |                ^\nnote: ...which requires checking which parts of `B` are promotable to static...\n  --> /checkout/src/test/ui/issue-23302-3.rs:13:1\n   |\nLL | const B: i32 = A; //~ ERROR cyclic dependency detected\n   | ^^^^^^^^^^^^^^^^^\nnote: ...which again requires const checking if rvalue is promotable to static `A`, completing the cycle\n  --> /checkout/src/test/ui/issue-23302-3.rs:13:16\n   |\nLL | const B: i32 = A; //~ ERROR cyclic dependency detected\n   |                ^\n\n"}
[00:45:12] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:45:12] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:45:12] - error[E0391]: cyclic dependency detected
[00:45:12] -   --> $DIR/issue-36163.rs:14:9
[00:45:12] + error[E0391]: cycle detected when const-evaluating `Foo::B::{{initializer}}`
[00:45:12] 3    |
[00:45:12] - LL |     B = A, //~ ERROR E0391
[00:45:12] -    |         ^ cyclic reference
[00:45:12] -    |
[00:45:12] - note: the cycle begins when const-evaluating `Foo::B::{{initializer}}`...
[00:45:12] + note: ...which requires processing `Foo::B::{{initializer}}`...
[00:45:12] 8   --> $DIR/issue-36163.rs:14:9
[00:45:12] 9    |
[00:45:12] 10 LL |     B = A, //~ ERROR E0391
[00:45:12]
[00:45:12] 11    |         ^
[00:45:12] - note: ...which then requires processing `Foo::B::{{initializer}}`...
[00:45:12] -   --> $DIR/issue-36163.rs:14:9
[00:45:12] -    |
[00:45:12] - LL |     B = A, //~ ERROR E0391
[00:45:12] -    |         ^
[00:45:12] - note: ...which then requires const-evaluating `A`...
[00:45:12] + note: ...which requires const-evaluating `A`...
[00:45:12] 18   --> $DIR/issue-36163.rs:11:1
[00:45:12] 19    |
[00:45:12] 20 LL | const A: isize = Foo::B as isize;
[00:45:12]
[00:45:12] 21    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:45:12] - note: ...which then requires computing layout of `Foo`...
[00:45:12] + note: ...which requires computing layout of `Foo`...
[00:45:12] 23   --> $DIR/issue-36163.rs:11:18
[00:45:12] 24    |
[00:45:12] 25 LL | const A: isize = Foo::B as isize;
[00:45:12]
[00:45:12] 26    |                  ^^^^^^
[00:45:12] -    = note: ...which then again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle.
[00:45:12] + note: ...which again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle
---
[00:45:12] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'issue-36163.rs'
[00:45:12]
[00:45:12] error: 1 errors occurred comparing output.
[00:45:12] status: exit code: 101
[00:45:12] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-36163.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-36163.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/issue-36163.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:45:12] {"message":"cycle detected when const-evaluating `Foo::B::{{initializer}}`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[],"children":[{"message":"...which requires processing `Foo::B::{{initializer}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":521,"byte_end":522,"line_start":14,"line_end":14,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"    B = A, //~ ERROR E0391","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires const-evaluating `A`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":467,"byte_end":500,"line_start":11,"line_end":11,"column_start":1,"column_end":34,"is_primary":true,"text":[{"text":"const A: isize = Foo::B as isize;","highlight_start":1,"highlight_end":34}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires computing layout of `Foo`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":484,"byte_end":490,"line_start":11,"line_end":11,"column_start":18,"column_end":24,"is_primary":true,"text":[{"text":"const A: isize = Foo::B as isize;","highlight_start":18,"highlight_end":24}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle","code":ned at 'explicit panic', tools/compiletest/src/runtest.rs:2919:9
[00:45:12]
[00:45:12] ---- [ui] ui/resolve/issue-23305.rs stdout ----
[00:45:12]  diff of stderr:
[00:45:12]
[00:45:12] - error[E0391]: cyclic dependency detected
[00:45:12] + error[E0391]: cycle detected when processing `<impl at $DIR/issue-23305.rs:15:1: 15:20>`
[00:45:12] +    |
[00:45:12] + note: ...which again requires processing `<impl at $DIR/issue-23305.rs:15:1: 15:20>`, completing the cycle
[00:45:12] 2   --> $DIR/issue-23305.rs:15:12
[00:45:12] 3    |
[00:45:12] 4 LL | impl ToNbt<Self> {}
[00:45:12]
[00:45:12] -    |            ^^^^ cyclic reference
[00:45:12] -    |
[00:45:12] - note: the cycle begins when processing `<impl at $DIR/issue-23305.rs:15:1: 15:20>`...
[00:45:12] -   --> $DIR/issue-23305.rs:15:1
[00:45:12] -    |
[00:45:12] - LL | impl ToNbt<Self> {}
[00:45:12] -    | ^^^^^^^^^^^^^^^^
[00:45:12] -    = note: ...which then again requires processing `<impl at $DIR/issue-23305.rs:15:1: 15:20>`, completing the cycle.
[00:45:12] +    |            ^^^^
---
[00:45:12] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'resolve/issue-23305.rs'
[00:45:12]
[00:45:12] error: 1 errors occurred comparing output.
[00:45:12] status: exit code: 101
[00:45:12] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/resolve/issue-23305.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/resolve/issue-23305.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/resolve/issue-23305.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:45:12] {"message":"cycle detected when processing `<impl at /checkout/src/test/ui/resolve/issue-23305.rs:15:1: 15:20>`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[],"children":[{"message":"...which again requires processing `<impl at /checkout/src/test/ui/resolve/issue-23305.rs:15:1: 15:20>`, completing the cycle","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/resolve/issue-23305.rs","byte_start":530,"byte_end":534,"line_start":15,"line_end":15,"column_start":12,"column_end":16,"is_primary":true,"text":[{"text":"impl ToNbt<Self> {}","highlight_start":12,"highlight_end":16}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when processing `<impl at /checkout/src/test/ui/resolve/issue-23305.rs:15:1: 15:20>`\n   |\nnote: ...which again requires processing `<impl at /checkout/src/test/ui/resolve/issue-23305.rs:15:1: 15:20>`, completing the cycle\n  --> /checkout/src/test/ui/resolve/issue-23305.rs:15:12\n   |\nLL | impl ToNbt<Self> {}\n   |            ^^^^\n\n"}
[00:45:12] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:45:12] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
$ dmesg | grep -i kill
[   10.692708] init: failsafe main process (1094) killed by TERM signal

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
Copy link
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.
Resolving deltas: 100% (615434/615434), completed with 4902 local objects.
---
[00:00:45] configure: rust.quiet-tests     := True
---
[00:45:51] ...............................................................................i....................
[00:45:58] ......................i.............................................................................
---
[00:46:40] ...................i...........................................................................i....
[00:46:46] ....................................................................................................
[00:46:53] .........ii.........................................................................................
---
[00:47:39] .............................................i......................................................
---
[00:51:40] .............................i......................................................................
[00:51:54] ..............................................................i.....................................
[00:52:10] ................................................i...................................................
[00:52:30] ....................................................................................................
[00:52:51] ....................................................................................................
[00:53:13] ....................................................................................................
[00:53:38] ......i.............................................................................................
[00:54:06] ..i.................................................................................test [run-pass] run-pass/mir_heavy_promoted.rs has been running for over 60 seconds
[00:54:14] ................
[00:54:46] ....................................................................................................
[00:55:21] ....................................................................ii..............................
[00:56:08] ...............................i....................................................i.ii.test [run-pass] run-pass/saturating-float-casts.rs has been running for over 60 seconds
[00:56:14] ...........
[00:56:57] ............................................................................................iiiiiii.
---
[00:59:08] ...............................................F....................................................
[00:59:15] ......F..........FFiF...........................................................ii.iii..............
[00:59:23] ....................................................................................................
[00:59:31] ........i..............................i.......................................................F....
[00:59:38] ....................................................................................................
[00:59:45] ..........i....F....................................................................................
[00:59:53] ...........F.F........F.....................F.................................................F.....
[01:00:03] ....................................................................................................
[01:00:13] .........F..........................................................................................
[01:00:23] .......................F............................................................................
[01:00:37] ....................................................................................................
[01:00:45] ....i...............................................................................................
[01:00:54] ........i..ii.......................................................................................
[01:01:05] ....................................................................................................
[01:01:14] ....................................................................................................
[01:01:23] ...............................................................F..........i.........................
[01:01:34] ....................i...............................................................................
---
[01:02:06] error: /checkout/src/test/compile-fail/coherence-inherited-assoc-ty-cycle-err.rs:19: expected message not found: cyclic dependency detected [E0391]
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 1 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/coherence-inherited-assoc-ty-cycle-err.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/coherence-inherited-assoc-ty-cycle-err.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/coherence-inherited-assoc-ty-cycle-err.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 19,
[01:02:06]         kind: None,
[01:02:06]         msg: "cyclic dependency detected [E0391]"
[01:02:06]     }
[01:02:06] ]
[01:02:06]
[01:02:06] thread '[compile-fail] compile-fail/coherence-inherited-assoc-ty-cycle-err.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:02:06] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:02:06]
[01:02:06] ---- [compile-fail] compile-fail/const-size_of-cycle.rs stdout ----
[01:02:06]
[01:02:06] error: error pattern ' cyclic dependency detected' not found!
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/const-size_of-cycle.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/const-size_of-cycle.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/const-size_of-cycle.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[01:02:06] error[E0391]: cycle detected when computing layout of `Foo`
[01:02:06]    |
[01:02:06] note: ...which requires normalizing `ParamEnvAnd { param_env: ParamEnv { caller_bounds: Slice([]), reveal: All }, value: [u8; _] }`...
[01:02:06] note: ...which requires const-evaluating `Foo::{{initializer}}`...
[01:02:06]   --> /checkout/src/test/compile-fail/const-size_of-cycle.rs:16:17
[01:02:06]    |
[01:02:06] LL |     bytes: [u8; std::mem::size_of::<Foo>()]
[01:02:06]    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
[01:02:06] note: ...which again requires computing layout of `Foo`, completing the cycle
[01:02:06]   --> /checkout/src/libcore/mem.rs:316:14
[01:02:06]    |
[01:02:06] LL |     unsafe { intrinsics::size_of::<T>() }
[01:02:06]    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^
[01:02:06] note: cycle used when const-evaluating `Foo::{{initializer}}`
[01:02:06]   --> /checkout/src/libcore/mem.rs:316:14
[01:02:06]    |
[01:02:06] LL |     unsafe { intrinsics::size_of::<T>() }
---
[01:02:06] error: /checkout/src/test/compile-fail/cycle-trait-default-type-trait.rs:14: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 1 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/cycle-trait-default-type-trait.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/cycle-trait-default-type-trait.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/cycle-trait-default-type-trait.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 14,
[01:02:06]         kind: Some(
[01:02:06]             Error
[01:02:06]         ),
[01:02:06]         msg: "cyclic dependency detected"
---
[01:02:06] error: /checkout/src/test/compile-fail/cycle-projection-based-on-where-clause.rs:27: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 1 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/cycle-projection-based-on-where-clause.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/cycle-projection-based-on-where-clause.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/cycle-projection-based-on-where-clause.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 27,
[01:02:06]         kind: Some(
[01:02:06]             Error
[01:02:06]         ),
[01:02:06]         msg: "cyclic dependency detected"
---
[01:02:06] error: /checkout/src/test/compile-fail/cycle-trait-supertrait-direct.rs:13: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 1 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/cycle-trait-supertrait-direct.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/cycle-trait-supertrait-direct.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/cycle-trait-supertrait-direct.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 13,
[01:02:06]         kind: Some(
[01:02:06]             Error
[01:02:06]         ),
[01:02:06]         msg: "cyclic dependency detected"
---
[01:02:06] error: /checkout/src/test/compile-fail/infinite-vec-type-recursion.rs:11: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 1 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/infinite-vec-type-recursion.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/infinite-vec-type-recursion.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-Zwn-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 11,
[01:02:06]         kind: Some(
[01:02:06]             Error
[01:02:06]         ),
[01:02:06]         msg: "E0391"
[01:02:06]     }
[01:02:06] ]
[01:02:06]
[01:02:06] thread '[compile-fail] compile-fail/issue-17252.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:02:06]
[01:02:06] ---- [compile-fail] compile-fail/issue-20772.rs stdout ----
[01:02:06]
[01:02:06] error: /checkout/src/test/compile-fail/issue-20772.rs:11: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 1 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-20772.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-20772.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/issue-20772.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 11,
[01:02:06]         kind: Some(
[01:02:06]             Error
[01:02:06]         ),
[01:02:06]         msg: "cyclic dependency detected"
[01:02:06]     }
[01:02:06] ]
[01:02:06]
[01:02:06] thread '[compile-fail] compile-fail/issue-20772.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:02:06]
[01:02:06] ---- [compile-fail] compile-fail/issue-20825.rs stdout ----
[01:02:06]
[01:02:06] error: /checkout/src/test/compile-fail/issue-20825.rs:15: expected error not found: cyclic dependency detected [E0391]
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 1 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-20825.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-20825.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/issue-20825.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 15,
[01:02:06]         kind: Some(
[01:02:06]             Error
[01:02:06]         ),
[01:02:06]         msg: "cyclic dependency detected [E0391]"
[01:02:06]     }
[01:02:06] ]
[01:02:06]
[01:02:06] thread '[compile-fail] compile-fail/issue-20825.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:02:06]
[01:02:06] ---- [compile-fail] compile-fail/issue-21177.rs stdout ----
[01:02:06]
[01:02:06] error: /checkout/src/test/compile-fail/issue-21177.rs:16: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 1 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-21177.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-21177.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/issue-21177.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 16,
[01:02:06]         kind: Some(
[01:02:06]             Error
[01:02:06]         ),
[01:02:06]         msg: "cyclic dependency detected"
[01:02:06]     }
[01:02:06] ]
[01:02:06]
[01:02:06] thread '[compile-fail] compile-fail/issue-21177.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:02:06]
[01:02:06] ---- [compile-fail] compile-fail/issue-22673.rs stdout ----
[01:02:06]
[01:02:06] error: /checkout/src/test/compile-fail/issue-22673.rs:11: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 1 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-22673.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-22673.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/issue-22673.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 11,
[01:02:06]         kind: Some(
[01:02:06]             Error
[01:02:06]         ),
[01:02:06]         msg: "cyclic dependency detected"
[01:02:06]     }
[01:02:06] ]
[01:02:06]
[01:02:06] thread '[compile-fail] compile-fail/issue-22673.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:02:06]
[01:02:06] ---- [compile-fail] compile-fail/issue-26548.rs stdout ----
[01:02:06]
[01:02:06] error: error pattern ' cyclic dependency detected' not found!
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-26548.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-26548.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/issue-26548.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[01:02:06] error[E0391]: cycle detected when computing layout of `std::option::Option<S>`
[01:02:06]    |
[01:02:06] note: ...which requires computing layout of `S`...
[01:02:06] note: ...which again requires computing layout of `std::option::Option<S>`, completing the cycle
[01:02:06] note: cycle used when compile_codegen_unit
---
[01:02:06] thread '[compile-fail] compile-fail/issue-26548.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:2919:9
[01:02:06]
[01:02:06] ---- [compile-fail] compile-fail/issue-34373.rs stdout ----
[01:02:06]
[01:02:06] error: /checkout/src/test/compile-fail/issue-34373.rs:18: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 1 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-34373.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-34373.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/issue-34373.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 18,
[01:02:06]         kind: Some(
[01:02:06]             Error
[01:02:06]         ),
[01:02:06]         msg: "cyclic dependency detected"
[01:02:06]     }
[01:02:06] ]
[01:02:06]
[01:02:06] thread '[compile-fail] compile-fail/issue-34373.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:02:06]
[01:02:06] ---- [compile-fail] compile-fail/issue-44415.rs stdout ----
[01:02:06]
[01:02:06] error: /checkout/src/test/compile-fail/issue-44415.rs:17: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 1 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-44415.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-44415.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/issue-44415.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 17,
[01:02:06]         kind: Some(
[01:02:06]             Error
[01:02:06]         ),
[01:02:06]         msg: "cyclic dependency detected"
[01:02:06]     }
[01:02:06] ]
[01:02:06]
[01:02:06] thread '[compile-fail] compile-fail/issue-44415.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:02:06]
[01:02:06] ---- [compile-fail] compile-fail/resolve-self-in-impl.rs stdout ----
[01:02:06]
[01:02:06] error: /checkout/src/test/compile-fail/resolve-self-in-impl.rs:24: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: /checkout/src/test/compile-fail/resolve-self-in-impl.rs:25: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: /checkout/src/test/compile-fail/resolve-self-in-impl.rs:26: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: /checkout/src/test/compile-fail/resolve-self-in-impl.rs:27: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: /checkout/src/test/compile-fail/resolve-self-in-impl.rs:28: expected error not found: cyclic dependency detected
[01:02:06]
[01:02:06] error: 0 unexpected errors found, 5 expected errors not found
[01:02:06] status: exit code: 101
[01:02:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/resolve-self-in-impl.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/resolve-self-in-impl.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-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/compile-fail/resolve-self-in-impl.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:02:06] not found errors (from test file): [
[01:02:06]     Error {
[01:02:06]         line_num: 24,
[01:02:06]         kind: Some(
[01:02:06]             Error
[01:02:06]         ),
[01:02:06]         msg: "cyclic dependency detected"
---
[01:02:06]         msg: "cyclic dependency detected"
---
[01:02:06]         msg: "cyclic dependency detected"
---
[01:02:06]         msg: "cyclic dependency detected"
---
[01:02:06]         msg: "cyclic dependency detected"
[01:02:06]     }
[01:02:06] ]
[01:02:06]
[01:02:06] thread '[compile-fail] compile-fail/resolve-self-in-impl.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
---
[01:02:06] 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/compile-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zmiri -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zmiri -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" "3.9.1\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:02:06] expected success, got: exit code: 101
[01:02:06]
[01:02:06]
[01:02:06] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:02:06] Build completed unsuccessfully in 0:16:53
[01:02:06] make: *** [check] Error 1
[01:02:06] Makefile:58: recipe for target 'check' failed
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:1ba4d337:start=1523661484867905463,finish=1523661484878343870,duration=10438407
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:04069336
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:04069336:start=1523661484884521421,finish=1523661484891187311,duration=6665890
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0dcab874
$ dmesg | grep -i kill
[   10.363451] init: failsafe main process (1094) killed by TERM signal

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)

@@ -11,7 +11,7 @@
// Check that an enum with recursion in the discriminant throws
// the appropriate error (rather than, say, blowing the stack).
enum X {
A = X::A as isize, //~ ERROR E0391
A = X::A as isize,
Copy link
Contributor

Choose a reason for hiding this comment

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

These annotations should not be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The error doesn't have a span, so compiletest just ignores them here :/

for &QueryInfo { span, ref query, .. } in &stack[1..] {
err.span_note(self.sess.codemap().def_span(span),
&format!("...which then requires {}...", query.describe(self)));
let mut err = struct_err!(self.sess,
Copy link
Contributor

Choose a reason for hiding this comment

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

You could just use the span of stack[0], since that's the one mentioned in the error message

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 don't want to print the same span twice. The message is quite noisy already.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can start the iteration at i=1, the it's not printed twice

Copy link
Contributor

Choose a reason for hiding this comment

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

We should avoid diagnostics without a main span. If verbosity is the problem, lets rewrite the diagnostic so that the redundant span note is turned into a note for the main span. This might require a complete rewrite of the text to make sense, specially in cases where a chain of causality is tried to be shown and explained.

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 think I can get away with just shifting the spans around without changing any messages. The text sufficiently unclear to allow that...

@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 15, 2018

I changed the error message to it now emits:

error[E0391]: cycle detected when computing the supertraits of `B`
 --> e.rs:3:1
  |
3 | trait B: C {}
  | ^^^^^^^^^^
  |
note: ...which requires computing the supertraits of `C`...
 --> e.rs:5:1
  |
5 | trait C: B {}
  | ^^^^^^^^^^
  = note: ...which again requires computing the supertraits of `B`, completing the cycle
note: cycle used when computing the supertraits of `A`
 --> e.rs:1:1
  |
1 | trait A: B {}
  | ^^^^^^^^^^

Could we get rid of the cycle used when note? So we would just output:

error[E0391]: cycle detected when computing the supertraits of `B`
 --> e.rs:3:1
  |
3 | trait B: C {}
  | ^^^^^^^^^^
  |
note: ...which requires computing the supertraits of `C`...
 --> e.rs:5:1
  |
5 | trait C: B {}
  | ^^^^^^^^^^
  = note: ...which again requires computing the supertraits of `B`, completing the cycle

It doesn't seem terribly useful and would be annoying to make deterministic for parallel rustc. You can get the full query stack to the cycle by setting RUST_BACKTRACE=1 and passing -Z treat-err-as-bug if you are debugging a compiler bug.

@rust-highfive
Copy link
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.
[00:00:46] configure: rust.quiet-tests     := True
---
[00:43:24] .................................................................................i..................
[00:43:30] ........................i..F........................................................................
[00:43:34] ....................................................................................................
[00:43:38] ....................................................................................................
[00:43:41] ....................................................................................................
[00:43:46] ....................................................................................................
[00:43:52] ...............F...........................................................F........................
[00:43:58] .F.F..F.......................................F.....................................................
[00:44:04] ....................................................................................................
[00:44:11] .......................i...........................................................................i
[00:44:17] ............................................................................F.......................
[00:44:23] .............ii.....................................................................................
---
[00:44:35] 1 error[E0391]: cycle detected when computing the supertraits of `B`
[00:44:35] -    |
[00:44:35] - note: ...which requires computing the supertraits of `C`...
[00:44:35] 4   --> $DIR/cycle-trait-supertrait-indirect.rs:17:1
[00:44:35] 5    |
[00:44:35] 6 LL | trait B: C {
[00:44:35]
[00:44:35] 7    | ^^^^^^^^^^
[00:44:35] - note: ...which again requires computing the supertraits of `B`, completing the cycle
[00:44:35] +    |
[00:44:35] + note: ...which requires computing the supertraits of `C`...
[00:44:35] 9   --> $DIR/cycle-trait-supertrait-indirect.rs:20:1
[00:44:35] 10    |
[00:44:35] 11 LL | trait C: B { }
[00:44:35]
[00:44:35] 12    | ^^^^^^^^^^
[00:44:35] +    = note: ...which again requires computing the supertraits of `B`, completing the cycle
[00:44:35] 13 note: cycle used when computing the supertraits of `A`
[00:44:35] 14   --> $DIR/cycle-trait-supertrait-indirect.rs:14:1
---
[00:44:35] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'cycle-trait-supertrait-indirect.rs'
[00:44:35]
[00:44:35] error: 1 errors occurred comparing output.
[00:44:35] status: exit code: 101
[00:44:35] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/cycle-trait-supertrait-indirect.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/cycle-trait-supertrait-indirect.stage2-x86_64-unknown-linux-gnu" "-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/cycle-trait-supertrait-indirect.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:44:35] {"message":"cycle detected when computing the supertraits of `B`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/cycle-trait-supertrait-indirect.rs","byte_start":592,"byte_end":602,"line_start":17,"line_end":17,"column_start":1,"column_end":11,"is_primary":true,"text":[{"text":"trait B: C {","highlight_start":1,"highlight_end":11}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"...which requires computing the supertraits of `C`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/cycle-trait-supertrait-indirect.rs","byte_start":608,"byte_end":618,"line_start":20,"line_end":20,"column_start":1,"column_end":11,"is_primary":true,"text":[{"text":"trait C: B { }","highlight_start":1,"highlight_end":11}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires computing the supertraits of `B`, completing the cycle","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"cycle used when computing the supertraits of `A`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/cycle-trait-supertrait-indirect.rs","byte_start":576,"byte_end":586,"line_start":14,"line_end":14,"column_start":1,"column_end":11,"is_primary":true,"text":[{"text":"trait A: B {","highlight_start":1,"highlight_end":11}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when computing the supertraits of `B`\n  --> /checkout/src/test/ui/cycle-trait-supertrait-indirect.rs:17:1\n   |\nLL | trait B: C {\n   | ^^^^^^^^^^\n   |\nnote: ...which requires computing the supertraits of `C`...\n  --> /checkout/src/test/ui/cycle-trait-supertrait-indirect.rs:20:1\n   |\nLL | trait C: B { }\n   | ^^^^^^^^^^\n   = note: ...which again requires computing the supertraits of `B`, completing the cycle\nnote: cycle used when computing the supertraits of `A`\n  --> /checkout/src/test/ui/cycle-trait-supertrait-indirect.rs:14:1\n   |\nLL | trait A: B {\n   | ^^^^^^^^^^\n\n"}
[00:44:35] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:44:35] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:44:35] 31 error[E0391]: cycle detected when processing `cycle1`
[00:44:35] -    |
[00:44:35] - note: ...which requires processing `cycle2::{{impl-Trait}}`...
[00:44:35] 34   --> $DIR/auto-trait-leak.rs:48:16
[00:44:35] 35    |
[00:44:35] 36 LL | fn cycle2() -> impl Clone {
[00:44:35]
[00:44:35] 37    |                ^^^^^^^^^^
[00:44:35] - note: ...which requires processing `cycle2`...
[00:44:35] +    |
[00:44:35] + note: ...which requires processing `cycle2::{{impl-Trait}}`...
[00:44:35] 39   --> $DIR/auto-trait-leak.rs:48:1
[00:44:35] 40    |
[00:44:35] 41 LL | fn cycle2() -> impl Clone {
[00:44:35]
[00:44:35] 42    | ^^^^^^^^^^^^^^^^^^^^^^^^^
[00:44:35] - note: ...which requires processing `cycle1::{{impl-Trait}}`...
[00:44:35] + note: ...which requires processing `cycle2`...
[00:44:35] 44   --> $DIR/auto-trait-leak.rs:42:16
[00:44:35] 45    |
[00:44:35] 46 LL | fn cycle1() -> impl Clone {
[00:44:35]
[00:44:35] 47    |                ^^^^^^^^^^
[00:44:35] - note: ...which again requires processing `cycle1`, completing the cycle
[00:44:35] + note: ...which requires processing `cycle1::{{impl-Trait}}`...
[00:44:35] 49   --> $DIR/auto-trait-leak.rs:42:16
[00:44:35] 50    |
[00:44:35] 51 LL | fn cycle1() -> impl Clone {
[00:44:35]
[00:44:35] 52    |                ^^^^^^^^^^
[00:44:35] +    = note: ...which again requires processing `cycle1`, completing the cycle
[00:44:35] 53 note: cycle used when type-checking all item bodies
---
[00:44:35] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'impl-trait/auto-trait-leak.rs'
[00:44:35]
[00:44:35] error: 1 errors occurred comparing output.
[00:44:35] status: exit code: 101
[00:44:35] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/impl-trait/auto-trait-leak.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/impl-trait/auto-trait-leak.stage2-x86_64-unknown-linux-gnu" "-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/impl-trait/auto-trait-leak.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:44:35] {"message":"the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":721,"byte_end":725,"line_start":25,"line_end":25,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    send(before());","highlight_start":5,"highlight_end":9}],"label":"`std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely","suggested_replacement":null,"expansion":null}],"children":[{"message":"within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:19:5: 19:22 p:std::rc::Rc<std::cell::Cell<i32>>]`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `impl std::ops::Fn<(i32,)>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `send`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":678,"byte_end":700,"line_start":22,"line_end":22,"column_start":1,"column_end":23,"is_primary":true,"text":[{"text":"fn send<T: Send>(_: T) {}","highlight_start":1,"highlight_end":23}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:25:5\n   |\nLL |     send(before());\n   |     ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely\n   |\n   = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`\n   = note: required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:19:5: 19:22 p:std::rc::Rc<std::cell::Cell<i32>>]`\n   = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`\nnote: required by `send`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:22:1\n   |\nLL | fn send<T: Send>(_: T) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:44:35] {"message":"the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":845,"byte_end":849,"line_start":28,"line_end":28,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    send(after());","highlight_start":5,"highlight_end":9}],"label":"`std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely","suggested_replacement":null,"expansion":null}],"children":[{"message":"within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:36:5: 36:22 p:std::rc::Rc<std::cell::Cell<i32>>]`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required because it appears within the type `impl std::ops::Fn<(i32,)>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"required by `send`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":678,"byte_end":700,"line_start":22,"line_end":22,"column_start":1,"column_end":23,"is_primary":true,"text":[{"text":"fn send<T: Send>(_: T) {}","highlight_start":1,"highlight_end":23}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `std::rc::Rc<std::cell::Cell<i32>>: std::marker::Send` is not satisfied in `impl std::ops::Fn<(i32,)>`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:28:5\n   |\nLL |     send(after());\n   |     ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely\n   |\n   = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>`\n   = note: required because it appears within the type `[closure@/checkout/src/test/ui/impl-trait/auto-trait-leak.rs:36:5: 36:22 p:std::rc::Rc<std::cell::Cell<i32>>]`\n   = note: required because it appears within the type `impl std::ops::Fn<(i32,)>`\nnote: required by `send`\n  --> /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:22:1\n   |\nLL | fn send<T: Send>(_: T) {}\n   | ^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:44:35] {"message":"cycle detected when processing `cycle1`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1427,"byte_end":1437,"line_start":48,"line_end":48,"column_start":16,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle2() -> impl Clone {","highlight_start":16,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"...which requires processing `cycle2::{{impl-Trait}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1412,"byte_end":1437,"line_start":48,"line_end":48,"column_start":1,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle2() -> impl Clone {","highlight_start":1,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires processing `cycle2`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1341,"byte_end":1351,"line_start":42,"line_end":42,"column_start":16,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle1() -> impl Clone {","highlight_start":16,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires processing `cycle1::{{impl-Trait}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/impl-trait/auto-trait-leak.rs","byte_start":1341,"byte_end":1351,"line_start":42,"line_end":42,"column_start":16,"column_end":26,"is_primary":true,"text":[{"text":"fn cycle1() -> impl Clone {","highlight_start":16,"highlight_end":26}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires processing `cycle1`, completing the cycle","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"cycle used when type-check\n"}
[00:44:35] {"message":"Some errors occurred: E0277, E0391.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0277, E0391.\n"}
[00:44:35] {"message":"For more information about an error, try `rustc --explain E0277`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about an error, try `rustc --explain E0277`.\n"}
---
[00:44:35] 1 error[E0391]: cycle detected when computing the supertraits of `t1`
[00:44:35] -    |
[00:44:35] - note: ...which requires computing the supertraits of `t2`...
[00:44:35] 4   --> $DIR/issue-12511.rs:11:1
[00:44:35] 5    |
[00:44:35] 6 LL | trait t1 : t2 {
[00:44:35]
[00:44:35] 7    | ^^^^^^^^^^^^^
[00:44:35] - note: ...which again requires computing the supertraits of `t1`, completing the cycle
[00:44:35] +    |
[00:44:35] + note: ...which requires computing the supertraits of `t2`...
[00:44:35] 9   --> $DIR/issue-12511.rs:14:1
[00:44:35] 10    |
[00:44:35] 11 LL | trait t2 : t1 {
[00:44:35]
[00:44:35] 12    | ^^^^^^^^^^^^^
[00:44:35] +    = note: ...which again requires computing the supertraits of `t1`, completing the cycle
---
[00:44:35] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'issue-12511.rs'
[00:44:35]
[00:44:35] error: 1 errors occurred comparing output.
[00:44:35] status: exit code: 101
[00:44:35] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-12511.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-12511.stage2-x86_64-unknown-linux-gnu" "-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/issue-12511.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:44:35] {"message":"cycle detected when computing the supertraits of `t1`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issue-12511.rs","byte_start":467,"byte_end":480,"line_start":11,"line_end":11,"column_start":1,"column_end":14,"is_primary":true,"text":[{"text":"trait t1 : t2 {","highlight_start":1,"highlight_end":14}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"...which requires computing the supertraits of `t2`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-12511.rs","byte_start":486,"byte_end":499,"line_start":14,"line_end":14,"column_start":1,"column_end":14,"is_primary":true,"text":[{"text":"trait t2 : t1 {","highlight_start":1,"highlight_end":14}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires computing the supertraits of `t1`, completing the cycle","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when computing the supertraits of `t1`\n  --> /checkout/src/test/ui/issue-12511.rs:11:1\n   |\nLL | trait t1 : t2 {\n   | ^^^^^^^^^^^^^\n   |\nnote: ...which requires computing the supertraits of `t2`...\n  --> /checkout/src/test/ui/issue-12511.rs:14:1\n   |\nLL | trait t2 : t1 {\n   | ^^^^^^^^^^^^^\n   = note: ...which again requires computing the supertraits of `t1`, completing the cycle\n\n"}
[00:44:35] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:44:35] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:44:35] 1 error[E0391]: cycle detected when const-evaluating `X::A::{{initializer}}`
[00:44:35] -    |
[00:44:35] - note: ...which requires computing layout of `X`...
[00:44:35] 4   --> $DIR/issue-23302-1.rs:14:9
[00:44:35] 5    |
[00:44:35] 6 LL |     A = X::A as isize,
[00:44:35]
[00:44:35] 7    |         ^^^^
[00:44:35] - note: ...which again requires const-evaluating `X::A::{{initializer}}`, completing the cycle
[00:44:35] +    |
[00:44:35] + note: ...which requires computing layout of `X`...
[00:44:35] +    = note: ...which again requires const-evaluating `X::A::{{initializer}}`, completing the cycle
---
[00:44:35] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'issue-23302-1.rs'
[00:44:35]
[00:44:35] error: 1 errors occurred comparing output.
[00:44:35] status: exit code: 101
[00:44:35] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-23302-1.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-23302-1.stage2-x86_64-unknown-linux-gnu" "-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/issue-23302-1.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:44:35] {"message":"cycle detected when const-evaluating `X::A::{{initializer}}`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-1.rs","byte_start":612,"byte_end":616,"line_start":14,"line_end":14,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":"    A = X::A as isize,","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"...which requires computing layout of `X`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-1.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"// Copyright 2015 The Rust Project Developers. See the COPYRIGHT","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires const-evaluating `X::A::{{initializer}}`, completing the cycle","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when const-evaluating `X::A::{{initializer}}`\n  --> /checkout/src/test/ui/issue-23302-1.rs:14:9\n   |\nLL |     A = X::A as isize,\n   |         ^^^^\n   |\nnote: ...which requires computing layout of `X`...\n   = note: ...which again requires const-evaluating `X::A::{{initializer}}`, completing the cycle\n\n"}
[00:44:35] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:44:35] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:44:35] 1 error[E0391]: cycle detected when const-evaluating `Y::A::{{initializer}}`
[00:44:35] -    |
[00:44:35] - note: ...which requires computing layout of `Y`...
[00:44:35] 4   --> $DIR/issue-23302-2.rs:14:9
[00:44:35] 5    |
[00:44:35] 6 LL |     A = Y::B as isize,
[00:44:35]
[00:44:35] 7    |         ^^^^
[00:44:35] - note: ...which again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle
[00:44:35] +    |
[00:44:35] + note: ...which requires computing layout of `Y`...
[00:44:35] +    = note: ...which again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle
---
[00:44:35] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'issue-23302-2.rs'
[00:44:35]
[00:44:35] error: 1 errors occurred comparing output.
[00:44:35] status: exit code: 101
[00:44:35] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-23302-2.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-23302-2.stage2-x86_64-unknown-linux-gnu" "-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/issue-23302-2.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:44:35] {"message":"cycle detected when const-evaluating `Y::A::{{initializer}}`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-2.rs","byte_start":567,"byte_end":571,"line_start":14,"line_end":14,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":"    A = Y::B as isize,","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"...which requires computing layout of `Y`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-2.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"// Copyright 2015 The Rust Project Developers. See the COPYRIGHT","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when const-evaluating `Y::A::{{initializer}}`\n  --> /checkout/src/test/ui/issue-23302-2.rs:14:9\n   |\nLL |     A = Y::B as isize,\n   |         ^^^^\n   |\nnote: ...which requires computing layout of `Y`...\n   = note: ...which again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle\n\n"}
[00:44:35] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:44:35] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:44:35] 1 error[E0391]: cycle detected when const checking if rvalue is promotable to static `A`
[00:44:35] -    |
[00:44:35] - note: ...which requires checking which parts of `A` are promotable to static...
[00:44:35] 4   --> $DIR/issue-23302-3.rs:11:1
[00:44:35] 5    |
[00:44:35] 6 LL | const A: i32 = B;
[00:44:35]
[00:44:35] 7    | ^^^^^^^^^^^^^^^^^
[00:44:35] - note: ...which requires const checking if rvalue is promotable to static `B`...
[00:44:35] +    |
[00:44:35] + note: ...which requires checking which parts of `A` are promotable to static...
[00:44:35] 9   --> $DIR/issue-23302-3.rs:11:16
[00:44:35] 10    |
[00:44:35] 11 LL | const A: i32 = B;
[00:44:35]
[00:44:35] 12    |                ^
[00:44:35] - note: ...which requires checking which parts of `B` are promotable to static...
[00:44:35] + note: ...which requires const checking if rvalue is promotable to static `B`...
[00:44:35] 14   --> $DIR/issue-23302-3.rs:13:1
[00:44:35] 15    |
[00:44:35] 16 LL | const B: i32 = A;
[00:44:35]
[00:44:35] 17    | ^^^^^^^^^^^^^^^^^
[00:44:35] - note: ...which again requires const checking if rvalue is promotable to static `A`, completing the cycle
[00:44:35] + note: ...which requires checking which parts of `B` are promotable to static...
[00:44:35] 19   --> $DIR/issue-23302-3.rs:13:16
[00:44:35] 20    |
[00:44:35] 21 LL | const B: i32 = A;
[00:44:35]
[00:44:35] 22    |                ^
[00:44:35] +    = note: ...which again requires const checking if rvalue is promotable to static `A`, completing the cycle
---
[00:44:35] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'issue-23302-3.rs'
[00:44:35]
[00:44:35] error: 1 errors occurred comparing output.
[00:44:35] status: exit code: 101
[00:44:35] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-23302-3.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-23302-3.stage2-x86_64-unknown-linux-gnu" "-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/issue-23302-3.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:44:35] {"message":"cycle detected when const checking if rvalue is promotable to static `A`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-3.rs","byte_start":467,"byte_end":484,"line_start":11,"line_end":11,"column_start":1,"column_end":18,"is_primary":true,"text":[{"text":"const A: i32 = B;","highlight_start":1,"highlight_end":18}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"...which requires checking which parts of `A` are promotable to static...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-3.rs","byte_start":482,"byte_end":483,"line_start":11,"line_end":11,"column_start":16,"column_end":17,"is_primary":true,"text":[{"text":"const A: i32 = B;","highlight_start":16,"highlight_end":17}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires const checking if rvalue is promotable to static `B`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-3.rs","byte_start":486,"byte_end":503,"line_start":13,"line_end":13,"column_start":1,"column_end":18,"is_primary":true,"text":[{"text":"const B: i32 = A;","highlight_start":1,"highlight_end":18}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires checking which parts of `B` are promotable to static...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-23302-3.rs","byte_start":501,"byte_end":502,"line_start":13,"line_end":13,"column_start":16,"column_end":17,"is_primary":true,"text":[{"text":"const B: i32 = A;","highlight_start":16,"highlight_end":17}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires const checking if rvalue is promotable to static `A`, completing the cycle","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when const ch: ...which requires processing `Foo::B::{{initializer}}`...
[00:44:35] 4   --> $DIR/issue-36163.rs:14:9
[00:44:35] 5    |
[00:44:35] 6 LL |     B = A,
[00:44:35]
[00:44:35] 7    |         ^
[00:44:35] - note: ...which requires const-evaluating `A`...
[00:44:35] +    |
[00:44:35] + note: ...which requires processing `Foo::B::{{initializer}}`...
[00:44:35] 9   --> $DIR/issue-36163.rs:11:1
[00:44:35] 10    |
[00:44:35] 11 LL | const A: isize = Foo::B as isize;
[00:44:35]
[00:44:35] 12    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:44:35] - note: ...which requires computing layout of `Foo`...
[00:44:35] + note: ...which requires const-evaluating `A`...
[00:44:35] 14   --> $DIR/issue-36163.rs:11:18
[00:44:35] 15    |
[00:44:35] 16 LL | const A: isize = Foo::B as isize;
[00:44:35]
[00:44:35] 17    |                  ^^^^^^
[00:44:35] - note: ...which again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle
[00:44:35] + note: ...which requires computing layout of `Foo`...
[00:44:35] +    = note: ...which again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle
---
[00:44:35] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'issue-36163.rs'
[00:44:35]
[00:44:35] error: 1 errors occurred comparing output.
[00:44:35] status: exit code: 101
[00:44:35] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-36163.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-36163.stage2-x86_64-unknown-linux-gnu" "-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/issue-36163.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:44:35] {"message":"cycle detected when const-evaluating `Foo::B::{{initializer}}`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":521,"byte_end":522,"line_start":14,"line_end":14,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"    B = A,","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"...which requires processing `Foo::B::{{initializer}}`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":467,"byte_end":500,"line_start":11,"line_end":11,"column_start":1,"column_end":34,"is_primary":true,"text":[{"text":"const A: isize = Foo::B as isize;","highlight_start":1,"highlight_end":34}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires const-evaluating `A`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":484,"byte_end":490,"line_start":11,"line_end":11,"column_start":18,"column_end":24,"is_primary":true,"text":[{"text":"const A: isize = Foo::B as isize;","highlight_start":18,"highlight_end":24}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which requires computing layout of `Foo`...","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/issue-36163.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"// Copyright 2012 The Rust Project Developers. See the COPYRIGHT","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null},{"message":"...which again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when const-evaluating `Foo::B::{{initializer}}`\n  -->pl ToNbt<Self> {}
[00:44:35]
[00:44:35] 7    |            ^^^^
[00:44:35] +    |
[00:44:35] +    = note: ...which again requires processing `<impl at $DIR/issue-23305.rs:15:1: 15:20>`, completing the cycle
---
[00:44:35] /checkout/src/test/ui/update-references.sh '/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui' 'resolve/issue-23305.rs'
[00:44:35]
[00:44:35] error: 1 errors occurred comparing output.
[00:44:35] status: exit code: 101
[00:44:35] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/resolve/issue-23305.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/resolve/issue-23305.stage2-x86_64-unknown-linux-gnu" "-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/resolve/issue-23305.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[00:44:35] {"message":"cycle detected when processing `<impl at /checkout/src/test/ui/resolve/issue-23305.rs:15:1: 15:20>`","code":{"code":"E0391","explanation":"\nThis error indicates that some types or traits depend on each other\nand therefore cannot be constructed.\n\nThe following example contains a circular dependency between two traits:\n\n```compile_fail,E0391\ntrait FirstTrait : SecondTrait {\n\n}\n\ntrait SecondTrait : FirstTrait {\n\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/resolve/issue-23305.rs","byte_start":530,"byte_end":534,"line_start":15,"line_end":15,"column_start":12,"column_end":16,"is_primary":true,"text":[{"text":"impl ToNbt<Self> {}","highlight_start":12,"highlight_end":16}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[{"message":"...which again requires processing `<impl at /checkout/src/test/ui/resolve/issue-23305.rs:15:1: 15:20>`, completing the cycle","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0391]: cycle detected when processing `<impl at /checkout/src/test/ui/resolve/issue-23305.rs:15:1: 15:20>`\n  --> /checkout/src/test/ui/resolve/issue-23305.rs:15:12\n   |\nLL | impl ToNbt<Self> {}\n   |            ^^^^\n   |\n   = note: ...which again requires processing `<impl at /checkout/src/test/ui/resolve/issue-23305.rs:15:1: 15:20>`, completing the cycle\n\n"}
[00:44:35] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:44:35] {"message":"For more information about this error, try `rustc --explain E0391`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0391`.\n"}
---
[00:44:35] 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-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--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" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:44:35] expected success, got: exit code: 101
[00:44:35]
[00:44:35]
[00:44:35] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:44:35] Build completed unsuccessfully in 0:01:47
[00:44:35] Makefile:58: recipe for target 'check' failed
[00:44:35] make: *** [check] Error 1
---
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:0a75242f:start=1523820190670923246,finish=1523820190679881645,duration=8958399
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:000f0249
$ dmesg | grep -i kill
[   11.173530] init: failsafe main process (1095) killed by TERM signal

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
Copy link
Contributor Author

Zoxc commented Apr 15, 2018

The issue-23302-2.rs and issue-36163.rs tests are lacking span information because computing layout of .. [layout_raw] query is not giving us a span for the query key.

@rust-highfive
Copy link
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.
[00:01:04] configure: rust.quiet-tests     := True
---
[00:43:17] .................................................................................i..................
[00:43:22] ........................i..F........................................................................
[00:43:26] ....................................................................................................
[00:43:30] ....................................................................................................
[00:43:33] ....................................................................................................
[00:43:37] ....................................................................................................
[00:43:43] ...............F...........................................................F........................
[00:43:49] .....F..............................................................................................
[00:43:55] ....................................................................................................
[00:44:02] .......................i...........................................................................i
[00:44:07] ............................................................................F.......................
[00:44:13] .............ii.....................................................................................
[00:44:21] ....................................................................................................
est/ui" "--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/cycle-trait-supertrait-indirect.stage2-x86_64-unknown-linux-gnu" "-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/cycle-trait-supertrait-indirect.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[00:44:25] unexpected errors (from JSON output): [
[00:44:25]     Error {
[00:44:25]         line_num: 17,
[00:44:25]         kind: Some(
[00:44:25]             Error
[00:44:25]         ),
[00:44:25]         msg: "17:1: 17:11: cycle detected when computing the supertraits of `B` [E0391]"
---
[00:44:25]         msg: "cyclic dependency detected"
[00:44:25]     },
[00:44:25]     Error {
[00:44:25]         line_num: 20,
[00:44:25]         kind: None,
[00:44:25]         msg: "cyclic reference"
---
[00:44:25] error: /checkout/src/test/ui/impl-trait/auto-trait-leak.rs:50: unexpected er,
[00:44:25]         msg: "cyclic dependency detected"
[00:44:25]     },
[00:44:25]     Error {
[00:44:25]         line_num: 42,
[00:44:25]         kind: None,
[00:44:25]         msg: "cyclic reference"
---
[00:44:25] error: /checkout/src/test/ui/issue-12511.rs:11: unexpected error: '11:1: 11:14: cycle detected when computing the supertraits of `t1` [E0391]'
[00:44:25]
[00:44:25] error: /checkout/src/test/ui/issue-12511.rs:14: expected error not found: cyclic dependency detected
[00:44:25]
[00:44:25] error: /checkout/src/test/ui/issue-12511.rs:14: expected message not found: cyclic reference
[00:44:25]
[00:44:25] error: 1 unexpected errors found, 2 expected errors not found
[00:44:25] status: exit code: 101
[00:44:25] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issue-12511.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--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/issue-12511.stage2-x86_64-unknown-linux-gnu" "-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/issue-12511.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[00:44:25] unexpected errors (from JSON outpun: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:44:25] Build completed unsuccessfully in 0:01:43
[00:44:25] make: *** [check] Error 1
[00:44:25] Makefile:58: recipe for target 'check' failed
ei3hhuv/s-f05gsdk5tn-yjlezp-3pbjjk2ek2e4p
109932 ./obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu
109928 ./obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release
106036 ./obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps
102808 ./obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends
102508 ./obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/incremental/core-31lccp6wy7orz
102504 ./obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/incremental/core-31lccp6wy7orz/s-f05hu981eo-mpsbit-bcs1sclq83s
---
70496 ./obj/build/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
find: `/home/travis/Library/Logs/DiagnosticReports': No such file or directory
travis_time:end:2cad7824:start=1523830250697241214,finish=1523830250703896676,duration=6655462
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:022cb37c
$ dmesg | grep -i kill
[   10.992445] init: failsafe main process (1097) killed by TERM signal

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
Copy link
Contributor Author

Zoxc commented Apr 15, 2018

It may also make sense to mark queries as public, and require a string description of those. Non-public queries could then be stripped from query cycles presented to users. So this error:

error[E0391]: cycle detected when computing layout of `Foo`
  |
note: ...which requires normalizing `ParamEnvAnd { param_env: ParamEnv { caller_bounds: Slice([]), reveal: All }, value: [u8; _] }`...
 --> ../../par-merge/src/test/compile-fail/issue-44415.rs:19:17
  |
19|     bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
  |                 ^^^^^^
note: ...which requires const-evaluating `Foo::{{initializer}}`...
 --> ../../par-merge/src/test/compile-fail/issue-44415.rs:19:26
  |
19|     bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
  |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = note: ...which again requires computing layout of `Foo`, completing the cycle

Could become:

error[E0391]: cycle detected when computing layout of `Foo`
  |
note: ...which requires const-evaluating `Foo::{{initializer}}`...
 --> ../../par-merge/src/test/compile-fail/issue-44415.rs:19:26
  |
19|     bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
  |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  = note: ...which again requires computing layout of `Foo`, completing the cycle

@rust-highfive
Copy link
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.
[00:00:49] configure: rust.quiet-tests     := True
---
[00:45:02] .................................................................................i..................
[00:45:08] ........................i...........................................................................
---
[00:45:50] .......................i...........................................................................i
[00:45:56] ....................................................................................................
[00:46:02] .............ii.....................................................................................
---
[00:46:48] .............................................i......................................................
---
[00:50:41] ..............................i.....................................................................
[00:50:55] ...............................................................i....................................
[00:51:10] .................................................i..................................................
[00:51:30] ....................................................................................................
[00:51:51] ....................................................................................................
[00:52:12] ....................................................................................................
[00:52:37] .......i............................................................................................
[00:53:05] ...i...................................................................................test [run-pass] run-pass/mir_heavy_promoted.rs has been running for over 60 seconds
[00:53:12] .............
[00:53:44] ....................................................................................................
[00:54:15] .....................................................................ii.............................
[00:55:06] ................................i....................................................i.ii...test [run-pass] run-pass/saturating-float-casts.rs has been running for over 60 seconds
[00:55:10] ........
[00:55:52] .............................................................................................iiiiiii
---
[00:57:58] ................................................F...................................................
[00:58:05] ......F..........FFiF............................................................iiiii..............
[00:58:12] ....................................................................................................
[00:58:20] ........i..............................i.......................................................F....
[00:58:27] ....................................................................................................
[00:58:34] ..........i.........................................................................................
[00:58:42] ............FF......F......................F.................................................F......
[00:58:51] ....................................................................................................
[00:59:02] ........F...........................................................................................
[00:59:12] ......................F.............................................................................
[00:59:25] ....................................................................................................
[00:59:34] ...i................................................................................................
[00:59:43] .......i..ii........................................................................................
[00:59:53] ....................................................................................................
[01:00:02] ....................................................................................................
[01:00:11] ..............................................................F..........i..........................
[01:00:22] ...................i................................................................................
---
[01:00:54] error: /checkout/src/test/compile-fail/coherence-inherited-assoc-ty-cycle-err.rs:19: unexpected error: '19:1: 19:15: cycle detected when processing `Trait` [E0391]'
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/coherence-inherited-assoc-ty-cycle-err.rs:19: expected message not found: cyclic dependency detected [E0391]
[01:00:54]
[01:00:54] error: 1 unexpected errors found, 1 expected errors not found
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/coherence-inherited-assoc-ty-cycle-err.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/coherence-inherited-assoc-ty-cycle-err.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/coherence-inherited-assoc-ty-cycle-err.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:00:54] unexpected errors (from JSON output): [
[01:00:54]     Error {
[01:00:54]         line_num: 19,
[01:00:54]         kind: Some(
[01:00:54]             Error
[01:00:54]         ),
[01:00:54]         msg: "19:1: 19:15: cycle detected when processing `Trait` [E0391]"
[01:00:54]     }
[01:00:54] ]
[01:00:54]
[01:00:54] not found errors (from test file): [
[01:00:54]     Error {
[01:00:54]         line_num: 19,
[01:00:54]         kind: None,
[01:00:54]         msg: "cyclic dependency detected [E0391]"
[01:00:54]     }
[01:00:54] ]
[01:00:54]
[01:00:54] thread '[compile-fail] compile-fail/coherence-inherited-assoc-ty-cycle-err.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:00:54] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:00:54]
[01:00:54] ---- [compile-fail] compile-fail/const-size_of-cycle.rs stdout ----
[01:00:54]
[01:00:54] error: error pattern ' cyclic dependency detected' not found!
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/const-size_of-cycle.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/const-size_of-cycle.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/const-size_of-cycle.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:00:54] stdout:
[01:00:54] ------------------------------------------
[01:00:54]
[01:00:54] -------------------------------:00:54]     Error {
[01:00:54]         line_num: 27,
[01:00:54]         kind: Some(
[01:00:54]             Error
[01:00:54]         ),
[01:00:54]         msg: "cyclic dependency detected"
---
[01:00:54] error: /checkout/src/test/compile-fail/cycle-trait-default-type-trait.rs:14: unexpected error: '14:19: 14:22: cycle detected when processing `Foo::X` [E0391]'
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/cycle-trait-default-type-trait.rs:14: expected error not found: cyclic dependency detected
[01:00:54]
[01:00:54] error: 1 unexpected errors found, 1 expected errors not found
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/cycle-trait-default-type-trait.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/cycle-trait-default-type-trait.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/cycle-trait-default-type-trait.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:00:54] unexpected errors (from JSON output): [
[01:00:54]     Error {
[01:00:54]         line_num: 14,
[01:00:54]         kind: Some(
[01:00:54]             Error
[01:00:54]         ),
[01:00:54]         msg: "14:19: 14:22: cycle detected when processing `Foo::X` [E0391]"
---
[01:00:54]         msg: "cyclic dependency detected"
---
[01:00:54] error: /checkout/src/test/compile-fail/cycle-trait-supertrait-direct.rs:13: unexpected error: '13:1: 13:29: cycle detected when computing the supertraits of `Chromosome` [E0391]'
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/cycle-trait-supertrait-direct.rs:13: expected error not found: cyclic dependency detected
[01:00:54]
[01:00:54] error: 1 unexpected errors found, 1 expected errors not found
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/cycle-trait-supertrait-direct.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "-- cyclic dependency detected
[01:00:54]
[01:00:54] error: 1 unexpected errors found, 1 expected errors not found
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/infinite-vec-type-recursion.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/infinite-vec-type-recursion.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/infinite-vec-type-recursion.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:00:54] unexpected errors (from JSON output): [
[01:00:54]     Error {
[01:00:54]         line_num: 11,
[01:00:54]         kind: Some(
[01:00:54]             Error
[01:00:54]         ),
[01:00:54]         msg: "11:14: 11:15: cycle detected when processing `x` [E0391]"
---
[01:00:54]         msg: "cyclic dependency detected"
[01:00:54]     }
[01:00:54] ]
[01:00:54]
[01:00:54] thread '[compile-fail] compile-fail/infinite-vec-type-recursion.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:00:54]
[01:00:54] ---- [compile-fail] compile-fail/issue-20772.rs stdout ----
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/issue-20772.rs:11: unexpected error: '11:1: 14:3: cycle detected when computing the supertraits of `T` [E0391]'
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/issue-20772.rs:11: expected error not found: cyclic dependency detected
[01:00:54]
[01:00:54] error: 1 unexpected errors found, 1 expected errors not found
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-20772.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-20772.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/issue-20772.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:00:54] unexpected errors (from JSON output): [
[01:00:54]     Error {
[01:00:54]         line_num: 11,
[01:00:54]         kind: Some(
[01:00:54]             Error
[01:00:54]         ),
[01:00:54]         msg: "11:1: 14:3: cycle detected when computing the supertraits of `T` [E0391]"
---
[01:00:54]         msg: "cyclic dependency detected"
[01:00:54]     }
[01:00:54] ]
[01:00:54]
[01:00:54] thread '[compile-fail] compile-fail/issue-20772.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:00:54]
[01:00:54] ---- [compile-fail] compile-fail/issue-20825.rs stdout ----
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/issue-20825.rs:15: unexpected error: '15:1: 15:53: cycle detected when computing the supertraits of `Processor` [E0391]'
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/issue-20825.rs:15: expected error not found: cyclic dependency detected [E0391]
[01:00:54]
[01:00:54] error: 1 unexpected errors found, 1 expected errors not found
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-20825.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-20825.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/issue-20825.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:00:54] unexpected errors (from JSON output): [
[01:00:54]     Error {
[01:00:54]         line_num: 15,
[01:00:54]         kind: Some(
[01:00:54]             Error
[01:00:54]         ),
[01:00:54]         msg: "15:1: 15:53: cycle detected when computing the supertraits of `Processor` [E0391]"
---
[01:00:54]         msg: "cyclic dependency detected [E0391]"
[01:00:54]     }
[01:00:54] ]
[01:00:54]
[01:00:54] thread '[compile-fail] compile-fail/issue-20825.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:00:54]
[01:00:54] ---- [compile-fail] compile-fail/issue-21177.rs stdout ----
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/issue-21177.rs:16: unexpected error: '16:21: 16:25: cycle detected when computing the bounds for type parameter `T` [E0391]'
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/issue-21177.rs:16: expected error not found: cyclic dependency detected
[01:00:54]
[01:00:54] error: 1 unexpected errors found, 1 expected errors not found
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-21177.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-21177.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/issue-21177.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:00:54] unexpected errors (from JSON output): [
[01:00:54]     Error {
[01:00:54]         line_num: 16,
[01:00:54]         kind: Some(
[01:00:54]             Error
[01:00:54]         ),
[01:00:54]         msg: "16:21: 16:25: cycle detected when computing the bounds for type parameter `T` [E0391]"
---
[01:00:54]         msg: "cyclic dependency detected"
[01:00:54]     }
[01:00:54] ]
[01:00:54]
[01:00:54] thread '[compile-fail] compile-fail/issue-21177.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:00:54]
[01:00:54] ---- [compile-fail] compile-fail/issue-22673.rs stdout ----
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/issue-22673.rs:11: unexpected error: '11:1: 11:35: cycle detected when computing the supertraits of `Expr` [E0391]'
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/issue-22673.rs:11: expected error not found: cyclic dependency detected
[01:00:54]
[01:00:54] error: 1 unexpected errors found, 1 expected errors not found
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-22673.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-22673.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/issue-22673.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:00:54] unexpected errors (from JSON output): [
[01:00:54]     Error {
[01:00:54]         line_num: 11,
[01:00:54]         kind: Some(
[01:00:54]             Error
[01:00:54]         ),
[01:00:54]         msg: "11:1: 11:35: cycle detected when computing the supertraits of `Expr` [E0391]"
---
[01:00:54]         msg: "cyclic dependency detected"
[01:00:54]     }
[01:00:54] ]
[01:00:54]
[01:00:54] thread '[compile-fail] compile-fail/issue-22673.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:00:54]
[01:00:54] ---- [compile-fail] compile-fail/issue-26548.rs stdout ----
[01:00:54]
[01:00:54] error: error pattern ' cyclic dependency detected' not found!
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-26548.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-26548.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/issue-26548.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
---
[01:00:54] error[E0391]: cycle detected when computing layout of `std::option::Option<S>`
[01:00:54]    |
[01:00:54] note: ...which requires computing layout of `S`...
[01:00:54]    = note: ...which again requires computing layout of `std::option::Option<S>`, completing the cycle
[01:00:54] note: cycle used when compile_codegen_unit
---
[01:00:54] thread '[compile-fail] compile-fail/issue-26548.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:2919:9
[01:00:54]
[01:00:54] ---- [compile-fail] compile-fail/issue-34373.rs stdout ----
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/issue-34373.rs:17: unexpected error: '17:30: 17:40: ' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:1254:13
[01:00:54]
[01:00:54] ---- [compile-fail] compile-fail/issue-44415.rs stdout ----
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/issue-44415.rs:1: unexpected error: '1:1: 1:1: cycle detected when computing layout of `Foo` [E0391]'
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/issue-44415.rs:17: expected error not found: cyclic dependency detected
[01:00:54]
[01:00:54] error: 1 unexpected errors found, 1 expected errors not found
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/issue-44415.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-44415.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/issue-44415.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:00:54] unexpected errors (from JSON output): [
[01:00:54]     Error {
[01:00:54]         line_num: 1,
[01:00:54]         kind: Some(
[01:00:54]             Error
[01:00:54]         ),
[01:00:54]         msg: "1:1: 1:1: cycle detected when computing layout of `Foo` [E0391]"
---
[01:00:54] error: /checkout/src/test/compile-fail/resolve-self-in-impl.rs:24: expected error not found: cyclic dependency detected
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/resolve-self-in-impl.rs:25: expected error not found: cyclic dependency detected
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/resolve-self-in-impl.rs:26: expected error not found: cyclic dependency detected
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/resolve-self-in-impl.rs:27: expected error not found: cyclic dependency detected
[01:00:54]
[01:00:54] error: /checkout/src/test/compile-fail/resolve-self-in-impl.rs:28: expected error not found: cyclic dependency detected
[01:00:54]
[01:00:54] error: 5 unexpected errors found, 5 expected errors not found
[01:00:54] status: exit code: 101
[01:00:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/compile-fail/resolve-self-in-impl.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail/resolve-self-in-impl.stage2-x86_64-unknown-linux-gnu" "-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/compile-fail/resolve-self-in-impl.stage2-x86_64-unknown-linux-gnu.aux" "-A" "unused"
[01:00:54] unexpected errors (from JSON output): [
[01:00:54]     Error {
[01:00:54]         line_pertrait-direct.rs
[01:00:54]     [compile-fail] compile-fail/infinite-vec-type-recursion.rs
[01:00:54]     [compile-fail] compile-fail/issue-20772.rs
[01:00:54]     [compile-fail] compile-fail/issue-20825.rs
[01:00:54]     [compile-fail] compile-fail/issue-21177.rs
[01:00:54]     [compile-fail] compile-fail/issue-22673.rs
[01:00:54]     [compile-fail] compile-fail/issue-26548.rs
[01:00:54]     [compile-fail] compile-fail/issue-34373.rs
[01:00:54]     [compile-fail] compile-fail/issue-44415.rs
[01:00:54]     [compile-fail] compile-fail/resolve-self-in-impl.rs
[01:00:54]
[01:00:54] test result: FAILED. 2281 passed; 14 failed; 15 ignored; 0 measured; 0 filtered out
[01:00:54]
[01:00:54]
[01:00:54]
[01:00:54] 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/compile-fail" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/compile-fail" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "compile-fail" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--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" "3.9.1\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:00:54] expected success, got: exit code: 101
[01:00:54]
[01:00:54]
[01:00:54] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:00:54] Build completed unsuccessfully in 0:16:30
[01:00:54] Makefile:58: recipe for target 'check' failed
[01:00:54] make: *** [check] Error 1
---
55760 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/incremental/syntax-33oa6nnkk1g08/s-f05j2vyycc-ggfnk5-3irgqbf4ljze2
---
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
travis_time:end:29ca0f0c:start=1523833730266935852,finish=1523833730274126485,duration=7190633
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:0b652510
$ find $HOME/Library/Ltravis_time:start:00651a3c
$ dmesg | grep -i kill
[   10.610675] init: failsafe main process (1093) killed by TERM signal

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)

Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

I like how the output looks. Left some drive by nitpicks.

--> $DIR/issue-36163.rs:11:18
|
LL | const A: isize = Foo::B as isize;
| ^^^^^^
= note: ...which then again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle.
note: ...which requires computing layout of `Foo`...
Copy link
Contributor

@estebank estebank Apr 16, 2018

Choose a reason for hiding this comment

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

Shouldn't this be pointing at line 13?

note: ...which requires computing layout of `Foo`...
    |
 LL | enum Foo {
    |      ^^^

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The computing layout of ... (layout_raw) query has no default span and no span is provided. So there isn't a span to print.

| ^ cyclic reference
|
note: the cycle begins when const checking if rvalue is promotable to static `A`...
error[E0391]: cycle detected when const checking if rvalue is promotable to static `A`
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a bit jargon heavy. @nikomatsakis what would you recommend? I'm thinking something along the lines of

error[E0391]: cycle detected when taking `A` as static
  --> $DIR/issue-23302-3.rs:11:1
   |
LL | const A: i32 = B; //~ ERROR cycle detected
   | ^^^^^^^^^^^^^^^^^
   |
note: ...which requires checking which parts of `A` could be static...
  --> $DIR/issue-23302-3.rs:11:16
   |
LL | const A: i32 = B; //~ ERROR cycle detected
   |                ^
note: ...which requires taking `B` as static...
  --> $DIR/issue-23302-3.rs:13:1
   |
LL | const B: i32 = A;
   | ^^^^^^^^^^^^^^^^^
note: ...which requires checking which parts of `B` could be static...
  --> $DIR/issue-23302-3.rs:13:16
   |
LL | const B: i32 = A;
   |                ^
   = note: ...which again requires taking `A` as static, completing the cycle

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 have no idea what taking as static or being static means.

Copy link
Contributor

Choose a reason for hiding this comment

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

From

cycle detected when const checking if rvalue is promotable to static `A`

I understand

cycle detected when [checking during compilation] if [the value being assigned] is [able to be stored to `const A` in static memory instead of stack slots]

That is too long for an error message, IMO, and I might also be wrong. That being said, not everybody, and certainly no newcomers know what "const checking", "rvalue" and "promotable to static" mean.

@nrc, @eddyb, @steveklabnik would you have a suggestion on a message with less jargon for this error?

That being said, I wouldn't block this PR on this at all.

--> $DIR/issue-23302-2.rs:14:9
|
LL | A = Y::B as isize, //~ ERROR E0391
| ^^^^
= note: ...which then again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle.
|
note: ...which requires computing layout of `Y`...
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this note should have a span pointing at line 13.

--> $DIR/issue-23305.rs:15:12
|
LL | impl ToNbt<Self> {}
| ^^^^ cyclic reference
| ^^^^
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to remove the label in the primary span?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There isn't a reason to print it just on the first span, since it's a cycle. It should be on all the spans or none of the spans.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sadly, at the moment it is impossible to have span labels on anything other than the primary diagnostic. All note/help sections can only have spans without labels. (Not that it would improve this diagnostic.)

if span == DUMMY_SP && stringify!($name) != "def_span" {
span = key.default_span(tcx);
}

Copy link
Member

Choose a reason for hiding this comment

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

Ooh, so much nicer! :)

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 forgot the remove the other copy of this code in try_get_with, that will be gone too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the [WIP] from the title once you're ready for merging.

@michaelwoerister
Copy link
Member

Looks good to me! I'll leave reviewing the changes to diagnostic output to @estebank, if that's OK.

r? @estebank

@Zoxc Zoxc changed the title [WIP] Improve query cycle error message Improve query cycle error message Apr 16, 2018
@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 17, 2018

📌 Commit 9cbe3b7 has been approved by estebank

@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 Apr 17, 2018
@bors
Copy link
Contributor

bors commented Apr 18, 2018

⌛ Testing commit 9cbe3b7 with merge b91e6a2...

bors added a commit that referenced this pull request Apr 18, 2018
@bors
Copy link
Contributor

bors commented Apr 18, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: estebank
Pushing b91e6a2 to master...

@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 19, 2018

@Mark-Simulacrum
Copy link
Member

I believe so, yes.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 20, 2018

I don't think the order in which the cycle is reported is deterministic. I'm getting random failures of the ui tests

    [ui] ui/issue-23302-1.rs
    [ui] ui/issue-23302-2.rs
    [ui] ui/issue-36163.rs

where the order of the reported stack keeps changing between builds.

@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 20, 2018

I don't see any sources of non-determinism here. @oli-obk Do you have the output of these tests?

@oli-obk
Copy link
Contributor

oli-obk commented Apr 20, 2018

one example:

---- [ui] ui/issue-23302-2.rs stdout ----
        diff of stderr:

-       error[E0391]: cycle detected when processing `Y::A::{{initializer}}`
+       error[E0391]: cycle detected when const-evaluating `Y::A::{{initializer}}`
2         --> $DIR/issue-23302-2.rs:14:9
3          |
4       LL |     A = Y::B as isize, //~ ERROR E0391

-          |         ^^^^^^^^^^^^^
+          |         ^^^^
6          |
-          = note: ...which again requires processing `Y::A::{{initializer}}`, completing the cycle
-       note: cycle used when const-evaluating `Y::A::{{initializer}}`
-         --> $DIR/issue-23302-2.rs:14:9
-          |
-       LL |     A = Y::B as isize, //~ ERROR E0391
-          |         ^^^^^^^^^^^^^
+       note: ...which requires computing layout of `Y`...
+          = note: ...which again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle

bors added a commit that referenced this pull request Apr 25, 2018
Warn on all erroneous constants

fixes #49791
fixes #47054

@Zoxc this PR triggers the nondeterministic errors of #49950 (comment) really often (at least on stage1).
@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 25, 2018

@Mark-Simulacrum The results here look pretty green, but incomplete. What is up with that?

@Mark-Simulacrum
Copy link
Member

I am uncertain; it's possible the left commit had some error on the server which lead to it being poorly benchmarked. I can try to rerun it if it's critical, please ping me if so.

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.

None yet

7 participants