Skip to content

Conversation

@nikomatsakis
Copy link
Contributor

The first few commits are all refactorings that should not affect anything. The last commit is the important part. There is one caveat, which is that it was a bit hard for me to test some of the method stuff: it seems to do the right thing, but the current code also passes the tests, though it shouldn't, I think due to various bugs in the mode.rs code. So I may have some more patches coming along.

r? @brson

@nikomatsakis
Copy link
Contributor Author

Oh, I think I see why the tests are passing on trunk even though I expect them to fail (or one reason, anyway)---I'm passing in the &mut by reference. I will try and correct that. Working with slices and impls still feels semi-awkward. Sigh.

@brson
Copy link
Contributor

brson commented Jan 24, 2013

r+

contents of other borrowed pointers to the lifetimes of the
borrowed value.  Fixes rust-lang#3148.
The tail portion of the pattern effectively borrows a vector,
but the borrow checker knew nothing about this.
for notating FIXME-style-situations that you want to be reminded
of before you commit.
…orrow when

needed.

Regarding soundness: there was a subtle bug in how it was done before; see the
compile-fail test for an example.

Regarding reborrowing: reborrowing allows mut and const
slices/borrowed-pointers to be used with pure fns that expect immutable data.
lent.  We can be more liberal with respect to the scope of the loan
if we do not own the data being lent, which used to be impossible
but can now occur with `&mut`.
@nikomatsakis
Copy link
Contributor Author

r? @pcwalton (just commit 8495ed4)

@pcwalton
Copy link
Contributor

r=me

@nikomatsakis
Copy link
Contributor Author

Pushed now.

RalfJung added a commit to RalfJung/rust that referenced this pull request Oct 13, 2025
Improve GenMC mode scheduling and add assume statements
makai410 pushed a commit to makai410/rust that referenced this pull request Nov 8, 2025
Improve GenMC mode scheduling and add assume statements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants