Skip to content
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 11 pull requests #61305

Merged
merged 38 commits into from
May 29, 2019
Merged

Rollup of 11 pull requests #61305

merged 38 commits into from
May 29, 2019

Commits on Mar 6, 2019

  1. 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.
    jtdowney committed Mar 6, 2019
    Configuration menu
    Copy the full SHA
    a35cdd4 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2019

  1. Update stable attribute to be since 1.35.0

    Co-Authored-By: jtdowney <jdowney@gmail.com>
    Centril and jtdowney committed Mar 19, 2019
    Configuration menu
    Copy the full SHA
    8c69876 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2019

  1. Configuration menu
    Copy the full SHA
    422a4c0 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2019

  1. wip nth_back on chunks

    Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
    @amit.chandra authored and wizAmit committed May 4, 2019
    Configuration menu
    Copy the full SHA
    4d9b9e9 View commit details
    Browse the repository at this point in the history
  2. hopefully working nth_back on chunks

    Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
    @amit.chandra authored and wizAmit committed May 4, 2019
    Configuration menu
    Copy the full SHA
    73ca8bc View commit details
    Browse the repository at this point in the history

Commits on May 5, 2019

  1. Configuration menu
    Copy the full SHA
    5eb0e08 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2019

  1. wip nth_back on chunks

    Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
    @amit.chandra authored and wizAmit committed May 14, 2019
    Configuration menu
    Copy the full SHA
    02a148d View commit details
    Browse the repository at this point in the history
  2. hopefully working nth_back on chunks

    Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
    @amit.chandra authored and wizAmit committed May 14, 2019
    Configuration menu
    Copy the full SHA
    aff83c8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    16223e4 View commit details
    Browse the repository at this point in the history
  4. fixed merge conflicts

    wizAmit committed May 14, 2019
    Configuration menu
    Copy the full SHA
    fd15405 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2019

  1. wip nth_back on chunks

    Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
    @amit.chandra authored and wizAmit committed May 22, 2019
    Configuration menu
    Copy the full SHA
    dc82626 View commit details
    Browse the repository at this point in the history
  2. hopefully working nth_back on chunks

    Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
    @amit.chandra authored and wizAmit committed May 22, 2019
    Configuration menu
    Copy the full SHA
    2080b86 View commit details
    Browse the repository at this point in the history
  3. wip nth_back on chunks

    Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
    @amit.chandra authored and wizAmit committed May 22, 2019
    Configuration menu
    Copy the full SHA
    29a103d View commit details
    Browse the repository at this point in the history
  4. succint implementation

    wizAmit committed May 22, 2019
    Configuration menu
    Copy the full SHA
    9309447 View commit details
    Browse the repository at this point in the history
  5. fix merge conflicts

    wizAmit committed May 22, 2019
    Configuration menu
    Copy the full SHA
    bcfd1f3 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2019

  1. Add Step::sub_usize

    timvermeulen committed May 25, 2019
    Configuration menu
    Copy the full SHA
    f1d0829 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2019

  1. sync::Weak::{as,from,into}_raw

    Methods on the Weak to access it as raw pointer to the data.
    vorner committed May 26, 2019
    Configuration menu
    Copy the full SHA
    f9d328d View commit details
    Browse the repository at this point in the history
  2. rc::Weak::{as,from,into}_raw

    Methods on the Weak to access it as a raw pointer to the data.
    vorner committed May 26, 2019
    Configuration menu
    Copy the full SHA
    4f1dcb3 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2019

  1. Configuration menu
    Copy the full SHA
    06eb412 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2019

  1. 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 re-use in a separate
    EmitterWriter.
    phansch committed May 28, 2019
    Configuration menu
    Copy the full SHA
    96e3fb2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e4d83e View commit details
    Browse the repository at this point in the history
  3. Avoid unneeded bug!() call

    spastorino committed May 28, 2019
    Configuration menu
    Copy the full SHA
    0631d19 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    120ce12 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    03d3290 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    29b7c06 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7fa97c0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9f8d934 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2019

  1. Rollup merge of rust-lang#58975 - jtdowney:iter_arith_traits_option, …

    …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.
    Centril committed May 29, 2019
    Configuration menu
    Copy the full SHA
    d67d1f2 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#60542 - timvermeulen:step_sub_usize, r=scot…

    …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?
    Centril committed May 29, 2019
    Configuration menu
    Copy the full SHA
    61545b6 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#60555 - timvermeulen:rchunks_nth_back, r=sc…

    …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
    Centril committed May 29, 2019
    Configuration menu
    Copy the full SHA
    23b9b83 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#60766 - vorner:weak-into-raw, r=sfackler

    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.
    Centril committed May 29, 2019
    Configuration menu
    Copy the full SHA
    cb012a0 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#61048 - wizAmit:feature/nth_back_chunks, r=…

    …scottmcm
    
    Feature/nth back chunks
    
    A succinct implementation for nth_back on chunks. Thank you @timvermeulen for the guidance.
    
    r? @timvermeulen
    Centril committed May 29, 2019
    Configuration menu
    Copy the full SHA
    f0ea975 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#61191 - phansch:annotate_snippet_refactorin…

    …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.
    Centril committed May 29, 2019
    Configuration menu
    Copy the full SHA
    01c3ca1 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#61235 - lzutao:stabilize-bufreader_buffer, …

    …r=Centril
    
    Stabilize bufreader_buffer feature
    
    FCP done in rust-lang#45323 (comment)
    
    Closes rust-lang#45323
    
    r? @SimonSapin
    Centril committed May 29, 2019
    Configuration menu
    Copy the full SHA
    405edc7 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#61249 - spastorino:local-or-deref-local, r=…

    …oli-obk,Centril
    
    Rename Place::local to Place::local_or_deref_local
    
    r? @oli-obk
    Centril committed May 29, 2019
    Configuration menu
    Copy the full SHA
    dcfc15b View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#61291 - spastorino:avoid-unneeded-bug-call,…

    … r=estebank
    
    Avoid unneeded bug!() call
    
    r? @oli-obk
    Centril committed May 29, 2019
    Configuration menu
    Copy the full SHA
    73530ff View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#61294 - eddyb:no-trait-nor-impl, r=varkor

    Rename `TraitOrImpl` to `Assoc` and `trait_or_impl` to `assoc`.
    Centril committed May 29, 2019
    Configuration menu
    Copy the full SHA
    3013c0b View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#61297 - eddyb:forsaken-stats, r=nagisa

    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
    Centril committed May 29, 2019
    Configuration menu
    Copy the full SHA
    907f4fd View commit details
    Browse the repository at this point in the history