Skip to content

ICE when putting a println! after non-break infinite loop in a library's function #16010

Closed
@allan-simon

Description

@allan-simon

The minimal code to reproduce the bug

#![crate_name = "xmpp"]
#![crate_type = "lib"]

pub fn handle() {
    loop { }
    println!("we close");
}

the stack trace i got

https://gist.github.com/allan-simon/5a689088c8c46e2843d0

Note:

  • it does compile correctly if we replace the function by "main" and compile it as a normal software
  • it does compile correctly if we replace the println! by a let a = 42u

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions