Skip to content

Regression in -Z dump-mir=all #41697

Description

@oli-obk

running rustc -Z dump-mir=all src/test/run-pass/issue-33387.rs

yields

error[E0391]: unsupported cyclic reference between types/traits detected
  --> ../rust/src/test/run-pass/issue-33387.rs:19:1
   |
19 | / impl Foo for [u8; 2] {
20 | |     fn get(&self) -> [u8; 2] {
21 | |         *self
22 | |     }
23 | | }
   | |_^ cyclic reference
   |
note: the cycle begins when processing `<impl at ../rust/src/test/run-pass/issue-33387.rs:19:1: 23:2>`...
  --> ../rust/src/test/run-pass/issue-33387.rs:19:1
   |
19 | / impl Foo for [u8; 2] {
20 | |     fn get(&self) -> [u8; 2] {
21 | |         *self
22 | |     }
23 | | }
   | |_^
note: ...which then requires const-evaluating `<impl at ../rust/src/test/run-pass/issue-33387.rs:19:1: 23:2>::{{initializer}}`...
  --> ../rust/src/test/run-pass/issue-33387.rs:19:19
   |
19 | impl Foo for [u8; 2] {
   |                   ^
note: ...which then requires processing `<impl at ../rust/src/test/run-pass/issue-33387.rs:19:1: 23:2>::{{initializer}}`...
  --> ../rust/src/test/run-pass/issue-33387.rs:19:19
   |
19 | impl Foo for [u8; 2] {
   |                   ^
note: ...which then requires processing `<impl at ../rust/src/test/run-pass/issue-33387.rs:19:1: 23:2>::{{initializer}}`...
  --> ../rust/src/test/run-pass/issue-33387.rs:19:19
   |
19 | impl Foo for [u8; 2] {
   |                   ^
note: ...which then requires processing `<impl at ../rust/src/test/run-pass/issue-33387.rs:19:1: 23:2>`...
  --> ../rust/src/test/run-pass/issue-33387.rs:19:1
   |
19 | / impl Foo for [u8; 2] {
20 | |     fn get(&self) -> [u8; 2] {
21 | |         *self
22 | |     }
23 | | }
   | |_^
   = note: ...which then again requires processing `<impl at ../rust/src/test/run-pass/issue-33387.rs:19:1: 23:2>`, completing the cycle.

Happening on rustc 1.19.0-nightly (777ee2079 2017-05-01). Did not happen on the latest nightly available through rustup on 27.04.2017.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions