-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Allow rvalues to be borrowed mutably #6472
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
nikomatsakis
wants to merge
561
commits into
rust-lang:master
from
nikomatsakis:issue-5967-rvalue-immutability
Closed
Allow rvalues to be borrowed mutably #6472
nikomatsakis
wants to merge
561
commits into
rust-lang:master
from
nikomatsakis:issue-5967-rvalue-immutability
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…graydon Fix unintended error problem of: ```` static s: int = 1; static e: int = 42; fn main() { match 7 { s..e => (), ^~ error: expected `=>` but found `..` _ => (), } } ````
Also fixed the docstring on `TC_ONCE_CLOSURE` (was accidentally the same as `TC_MUTABLE`) and shifted the `TC_EMPTY_ENUM` bit left by one since whatever previously used that bit has been removed.
…y base logarithms
Both expm1 and ln1p have been renamed to exp_m1 and ln_1p in order to be consistent with the underscore usage elsewhere. The exp_m1 method is used for increased accuracy when doing floating point calculations, so this has been moved from the more general 'Exponential' trait into 'Float'.
the ABI as part of the type of an extern fn. cc rust-lang#3678
These breakpoints make it difficult to debug coretest
…priv-variants, r=graydon @brson: r? [please ignore the other one that was accidentally based off master due to back-button-bugs in github.com] My goal is to resolve the question of whether we want to encourage (by example) consistent use of pub to make identifiers publicly-accessible, even in syntax extensions. (If people don't want that, then we can just let this pull request die.) This is part one of two. Part two, whose contents should be clear from the FIXME's in this commit, would land after this gets incorporated into a snapshot. (The eventual goal is to address issue rust-lang#6009 , which was implied by my choice of branch name, but not mentioned in the pull request, so github did not notice it.)
existing tests. The bug itself was fixed as part of recent borrowck reform. Fixes rust-lang#4666.
… r=thestinger It appears the cause of rust-lang#5517 was fixed in 0dc6c41, so adding a test so the issue can be closed.
…ter-foldl, r=graydon Closes rust-lang#5311 and rust-lang#4490. This doesn't change `vec.foldl` because that's still part of `old_iter`, although I could change that as well if necessary.
This issue has been fixed in passing.
This is only used on rust_rng, which I am trying to extricate from the kernel.
…nger Instead link against the built libraries and directly invoke those. Closes rust-lang#5387
When trying to import nonexistent items from existing modules, specify that that is what happened, rather than just reporting "unresolved name".
…-> __attribute__((...)).
This pull request adds 4 atomic intrinsics to the compiler, in preparation for rust-lang#5042. * `atomic_load(src: &int) -> int` performs an atomic sequentially consistent load. * `atomic_load_acq(src: &int) -> int` performs an atomic acquiring load. * `atomic_store(dst: &mut int, val: int)` performs an atomic sequentially consistent store. * `atomic_store_rel(dst: &mut int, val: int)` performs an atomic releasing store. For more information about the whole acquire/release thing: http://llvm.org/docs/Atomics.html r?
When trying to import nonexistent items from existing modules, specify that that is what happened, rather than just reporting "unresolved name". Ideally the error would be reported on the span of the import... but I do not see a way to get a span there. Help appreciated 😄
I changed the dependencies of librust in rust-lang#6438, but I forgot to update the dependencies in the Makefile, this should have the dependencies right now.
r? @pcwalton * Move `SharedMutableState`, `LittleLock`, and `Exclusive` from `core::unstable` to `core::unstable::sync` * Modernize the `SharedMutableState` interface with methods * Rename `SharedMutableState` to `UnsafeAtomicRcBox` to match `RcBox`.
Also fix up all the fallout elsewhere throughout core. It's really nice being able to have the prelude.
uninit() would result in potentially running a destructor on arbitrary memory if the Ord implementation throws
- vec.rs :add 'each2_mut function' - testsuit : run-pass/vec-each2_mut.rs
This includes 26fa6f8 which fixes rust-lang#6258 @ILyoan I ported your patches forward and confirmed that they build but you should be aware of this upgrade.
…pcwalton uninit() would result in potentially running a destructor on arbitrary memory if the Ord implementation throws
Also fix up all the fallout elsewhere throughout core. It's really nice being able to have the prelude. I'm not quite sure how resolution works with traits, but it seems to me like the public imports at the top-level of the core crate were leaking into the sub-crates, but that could also be working as intended. Regardless, things compile without the re-exports now.
reissued |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simpler version of PR #5974 based on the new borrow checker.