Skip to content

Infinite recursion when traversing a cyclic data structure with repr #6180

Closed
@Aatch

Description

@Aatch
struct A { a: Option<@mut A> }
fn main() {
  let a = @mut A { a: None }; let mut v = Some(a); a.a <-> v;
  io::println(fmt!("%?",a));
}

This causes the formatter to go into an infinite loop.

Nominating for maturity 3, since it's mostly likely a problem with the reflection api.

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