-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 9 pull requests #61303
Closed
Closed
Rollup of 9 pull requests #61303
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
This is similar to the existing implementation for `Result`. It will take each item into the accumulator unless a `None` is returned.
Co-Authored-By: jtdowney <jdowney@gmail.com>
Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
Methods on the Weak to access it as raw pointer to the data.
Methods on the Weak to access it as a raw pointer to the data.
Extracted from work on rust-lang#59346. This moves the annotation collection to the `FileWithAnnotatedLines` impl to allow re-use in a separate EmitterWriter.
…r=dtolnay Implement `iter::Sum` and `iter::Product` for `Option` This is similar to the existing implementation for `Result`. It will take each item into the accumulator unless a `None` is returned. I based a lot of this on rust-lang#38580. From that discussion it didn't seem like this addition would be too controversial or difficult. One thing I still don't understand is picking the values for the `stable` attribute. This is my first non-documentation PR for rust so I am open to any feedback on improvements.
…tmcm Add Step::sub_usize Required for rust-lang#54054. I'm aware that the `Step` trait needs a rework, but this still seems like a reasonable addition? This currently doesn't compile because Chalk contains a type that implement this trait, and this is a breaking change. How can that be fixed?
…ottmcm Implement nth_back for RChunks(Exact)(Mut) Part of rust-lang#54054. These implementations may not be optimal because of the use of `self.len()`, but it's quite cheap and simplifies the code a lot. There's quite some duplication going on here, I wouldn't mind cleaning this up later. A good next step would probably be to add private `split_off_up_to`/`split_off_from` helper methods for slices since their behavior is commonly useful throughout the `Chunks` types. r? @scottmcm
Weak::into_raw Hello This is my first shot at rust-lang#60728. I'd like to consult it a bit before moving further. The biggest question I have is if this API makes sense. My motivation for it is to be able to store the `Weak` in `AtomicPtr`. For that I don't actually need for the pointer to point to the `T`, any pointer (maybe casted to `usize`) would be good enough, but this mirrors what `Arc` does and could be useful for other things too (like comparing if Arc and Weak point to the same thing without playing with the counts), while some opaque pointer wouldn't. Some secondary questions, if this is deemed desirable are: * The weak pointer may be dangling if it is created by `Weak::new()`. It would make sense to treat this as NULL, but that is incompatible with `T: ?Sized` ‒ both `new()` and `ptr::null()` are available only for sized types. The current implementation is therefore also available only for sized `T`s. It would be possible to allow `?Sized` if the API would be `fn into_raw(self) -> Option<NonNull<T>>` and `fn from_raw(NonNull<T>)`, but that's different API than `Arc` has. What would be preferred? * There's a FIXME in my code about what I suspect could be UB. Is it really UB & how to get the pointer correctly? Is manual offsetting of the pointer the only way? * Am I missing some other necessary thing around the feature gates and such? * Is the documentation understandable? I know writing docs is not my strongest skill :-|. Thinks I'd like to do as part of the PR, but are not yet done: * Turn the referenced issue into tracking issue for the feature flag. * Once the `sync::Weak` is considered reasonable, I'd do the equivalent for `rc::Weak`. * This might call for few more tests than what is currently part of the documentation.
…scottmcm Feature/nth back chunks A succinct implementation for nth_back on chunks. Thank you @timvermeulen for the guidance. r? @timvermeulen
…gs1, r=estebank librustc_errors: Move annotation collection to own impl Extracted from work on rust-lang#59346. This moves the annotation collection to the `FileWithAnnotatedLines` impl to allow easier re-use in a separate EmitterWriter. Even without that new EmitterWriter present, I think it makes sense to have this as an associated function.
… r=estebank Avoid unneeded bug!() call r? @oli-obk
Rename `TraitOrImpl` to `Assoc` and `trait_or_impl` to `assoc`.
Remove LLVM instruction stats and other (obsolete) codegen stats. Both `-Z count_llvm_insns` and `-Z codegen-stats` are removed, as (AFAIK) they have been of little use in the last few years, especially after the transition to MIR->LLVM codegen. Other than for the LLVM instruction counts, `-Z codegen-stats` has long been obsoleted anyway. r? @nagisa cc @rust-lang/compiler
@bors r+ p=9 rollup=never |
📌 Commit c0142ac has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
May 29, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
Successful merges:
iter::Sum
anditer::Product
forOption
#58975 (Implementiter::Sum
anditer::Product
forOption
)TraitOrImpl
toAssoc
andtrait_or_impl
toassoc
. #61294 (RenameTraitOrImpl
toAssoc
andtrait_or_impl
toassoc
.)Failed merges:
r? @ghost