Skip to content

assertion failed: !borrow_list.is_empty() #8675

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

Closed
metajack opened this issue Aug 21, 2013 · 6 comments
Closed

assertion failed: !borrow_list.is_empty() #8675

metajack opened this issue Aug 21, 2013 · 6 comments
Labels
P-low Low priority

Comments

@metajack
Copy link
Contributor

@kmcallister found this bug in some Servo code.

The following code compiles but triggers an internal assertion and crashes:

struct Foo {
  bar: @mut Bar,
}

struct Bar {
  x: int,
}

fn main() {
  let foo1 = @mut Foo { bar: @mut Bar { x: 1 } };
  let foo2 = @mut Foo { bar: @mut Bar { x: 2 } };
  let foos = ~[foo1, foo2];

  for &@Foo { bar: ref bar } in foos.iter() {
  }
}

If you remove the ref in the pattern match, the code works.

@metajack
Copy link
Contributor Author

nominating production ready

kmcallister added a commit to kmcallister/servo that referenced this issue Aug 21, 2013
bors-servo pushed a commit to servo/servo that referenced this issue Aug 21, 2013
@kmcallister
Copy link
Contributor

It's worth noting that the symptom in Servo was not an assertion but rather memory corruption and an eventual segfault.

ILyoan pushed a commit to ILyoan/servo that referenced this issue Aug 22, 2013
ILyoan pushed a commit to ILyoan/servo that referenced this issue Aug 22, 2013
tikue pushed a commit to tikue/servo that referenced this issue Aug 28, 2013
@catamorphism
Copy link
Contributor

Accepted for production-ready

@nikomatsakis
Copy link
Contributor

cc me

@pnkfelix
Copy link
Member

P-low, not a 1.0 blocker.

@alexcrichton
Copy link
Member

I can't reproduce this now, and it likely had to do with the interaction of @mut and @ patterns, both of which have been removed. Closing due to being unable to reproduce.

gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Sep 30, 2019
…ister:frametreeiterator); r=metajack

The bug is rust-lang/rust#8675.

Fixes #752.

Source-Repo: https://github.com/servo/servo
Source-Revision: 48f9e9aaa544d05b7b3352afebb7a0f48745cf59

UltraBlame original commit: 9be787e695fa2f45cba945f4d22f111c849fd852
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Sep 30, 2019
…ister:frametreeiterator); r=metajack

The bug is rust-lang/rust#8675.

Fixes #752.

Source-Repo: https://github.com/servo/servo
Source-Revision: 48f9e9aaa544d05b7b3352afebb7a0f48745cf59

UltraBlame original commit: 9be787e695fa2f45cba945f4d22f111c849fd852
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…ister:frametreeiterator); r=metajack

The bug is rust-lang/rust#8675.

Fixes #752.

Source-Repo: https://github.com/servo/servo
Source-Revision: 48f9e9aaa544d05b7b3352afebb7a0f48745cf59

UltraBlame original commit: 9be787e695fa2f45cba945f4d22f111c849fd852
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this issue Feb 11, 2024
…agnostic, r=Veykril

feat: Add incorrect case diagnostics for traits and their associated items

Updates incorrect case diagnostic to:
- Check traits and their associated items
- Ignore trait implementations except for patterns in associated function bodies

Also cleans up `hir-ty::diagnostics::decl_check` a bit (mostly to make it a bit more DRY and easier to maintain)

Also fixes: rust-lang#8675 and fixes: rust-lang#8225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-low Low priority
Projects
None yet
Development

No branches or pull requests

6 participants