Skip to content

"while(i!=-1)" causes "Unsatisfied precondition constraint" #122

Closed
@jyasskin

Description

@jyasskin
$ cat ~/tmp/test.rs
fn main() {
  let int i = -1;
  while (i != -1) {
    ret;
  }
}
$ ./rustboot -L . ~/tmp/test.rs -o ~/tmp/test
~/tmp/test.rs:3:2 - 6:0:E:Error: Unsatisfied precondition constraint <init #14 = .t0> at stmt 23:
while ({
           auto .t0;
           .t0 = -1;
    }i != .t0) {
    ret;
}
$

Interestingly, changing the literal to "1" avoids the error.

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