-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Issue #7444 - Borrowck permits moved values to be captured #7849
Closed
nikomatsakis
wants to merge
13
commits into
rust-lang:master
from
nikomatsakis:issue-7444-capture-moved-value
Closed
Issue #7444 - Borrowck permits moved values to be captured #7849
nikomatsakis
wants to merge
13
commits into
rust-lang:master
from
nikomatsakis:issue-7444-capture-moved-value
Conversation
This file contains 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
… semantics. Also added unit tests of range code to test refactoring. The num-range-rev.rs test will need to be updated when the range_rev semantics change.
… only, not type signatures)
…fclosedness-issue5270-2ndpr, r=cmr Changes int/uint range_rev to iterate over range `(hi,lo]` instead of `[hi,lo)`. Fix rust-lang#5270. Also: * Adds unit tests for int/uint range functions * Updates the uses of `range_rev` to account for the new semantics. (Note that pretty much all of the updates there were strict improvements to the code in question; yay!) * Exposes new function, `range_step_inclusive`, which does the range `[hi,lo]`, (at least when `hi-lo` is a multiple of the `step` parameter). * Special-cases when `|step| == 1` removing unnecessary bounds-check. (I did not check whether LLVM was already performing this optimization; I figure it would be a net win to not leave that analysis to the compiler. If reviewer objects, I can easily remove that from the refactored code.) (This pull request is a rebased version of PR rust-lang#7524, which went stale due to recent unrelated changes to num libraries.)
Allowing them in type signatures is a significant amount of extra work, unfortunately. This also doesn't apply to static values, which takes a different code path.
…e-unwrap, r=pcwalton Fixes Issue rust-lang#7764 Running `make check` I do get a failure: test rt::io::extensions::test::push_bytes ... ok rustest rt::comm::test::oneshot_single_thread_send_port_close ... t: task failed at 'Unhandled condition: read_error: {kind: OtherIoError, desc: "Placeholder error. You shouldn\'t be seeing this", detail: None}', /Users/shout/Projects/rust/src/libstd/condition.rs:50 /bin/sh: line 1: 35056 Abort trap: 6 x86_64-apple-darwin/stage2/test/stdtest-x86_64-apple-darwin --logfile tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.log make: *** [tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.ok] Error 134
Whenever a lang_item is required, some relevant message is displayed, often with a span of what triggered the usage of the lang item. Now "hello word" is as small as: ```rust #[no_std]; extern { fn puts(s: *u8); } extern "rust-intrinsic" { fn transmute<T, U>(t: T) -> U; } #[start] fn main(_: int, _: **u8, _: *u8) -> int { unsafe { let (ptr, _): (*u8, uint) = transmute("Hello!"); puts(ptr); } return 0; } ```
…lton Add some codegen tests. Nothing too surprising.
bors
added a commit
that referenced
this pull request
Jul 18, 2013
…e, r=bblum This code looks like it was just wrong. r? @bblum
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Oct 21, 2021
FIx FP in `missing_safety_doc` lint Fix FP where lint souldn't fire if any parent has `#[doc(hidden)]` attribute fixes: rust-lang#7347 changelog: [`missing_safety_doc`] Fix FP if any parent has `#[doc(hidden)]` attribute
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.
This code looks like it was just wrong. r? @bblum