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 6 pull requests #65227

Closed
wants to merge 32 commits into from
Closed

Commits on Oct 6, 2019

  1. Configuration menu
    Copy the full SHA
    dd2356f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    50932ea View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2019

  1. [RFC 2091] Add #[track_caller] attribute.

    - The attribute is behind a feature gate.
    - Error if both #[naked] and #[track_caller] are applied to the same function.
    - Error if #[track_caller] is applied to a non-function item.
    - Error if ABI is not "rust"
    - Error if #[track_caller] is applied to a trait function.
    
    Error codes and descriptions are pending.
    ayosec authored and anp committed Oct 7, 2019
    Configuration menu
    Copy the full SHA
    543449d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6c04c8e View commit details
    Browse the repository at this point in the history
  3. track_caller feature gate starts in 1.40.0.

    Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
    anp and Centril committed Oct 7, 2019
    Configuration menu
    Copy the full SHA
    43d4b70 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d931afe View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9900211 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    53096c5 View commit details
    Browse the repository at this point in the history
  7. E0735 -> E0739

    Prevents number collision with another approved PR.
    anp committed Oct 7, 2019
    Configuration menu
    Copy the full SHA
    8992c30 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bdc4bd1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    130be6d View commit details
    Browse the repository at this point in the history
  10. Update expected error output.

    anp committed Oct 7, 2019
    Configuration menu
    Copy the full SHA
    f70ed29 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    190212c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c49966b View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    cca58d1 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2019

  1. Configuration menu
    Copy the full SHA
    d1d2565 View commit details
    Browse the repository at this point in the history
  2. Fix calling function pointer const parameters. Also fixes inference of

    function pointer const parameters.
    skinnyBat committed Oct 8, 2019
    Configuration menu
    Copy the full SHA
    2afd277 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a59eb6d View commit details
    Browse the repository at this point in the history
  4. Gate use of raw and function pointers in const generics behind

    const_compare_raw_pointers.
    skinnyBat committed Oct 8, 2019
    Configuration menu
    Copy the full SHA
    cf3b561 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    43badf9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9677cbe View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    50ea5f4 View commit details
    Browse the repository at this point in the history
  8. Update feature gate error message

    Co-Authored-By: varkor <github@varkor.com>
    skinnyBat and varkor committed Oct 8, 2019
    Configuration menu
    Copy the full SHA
    16b7f44 View commit details
    Browse the repository at this point in the history
  9. Update ui tests

    skinnyBat committed Oct 8, 2019
    Configuration menu
    Copy the full SHA
    5986fe2 View commit details
    Browse the repository at this point in the history
  10. Update LLVM for Emscripten exception handling support

    Updates LLVM to pick up the cherry-picked support for correctly
    handling exception handling with aggregates passed by value. This will
    be necessary to continue to support Emscripten's exception handling
    once we switch using Emscripten's LLVM backend. See rust-lang#63649.
    tlively committed Oct 8, 2019
    Configuration menu
    Copy the full SHA
    2c81089 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    bdcc21c View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2019

  1. Rollup merge of rust-lang#64656 - passcod:map-entry-insert, r=Amanieu

    Implement (HashMap) Entry::insert as per rust-lang#60142
    
    Implementation of `Entry::insert` as per @SimonSapin's comment on rust-lang#60142. This requires a patch to hashbrown:
    
    ```diff
    diff --git a/src/rustc_entry.rs b/src/rustc_entry.rs
    index fefa5c3..7de8300 100644
    --- a/src/rustc_entry.rs
    +++ b/src/rustc_entry.rs
    @@ -546,6 +546,32 @@ impl<'a, K, V> RustcVacantEntry<'a, K, V> {
             let bucket = self.table.insert_no_grow(self.hash, (self.key, value));
             unsafe { &mut bucket.as_mut().1 }
         }
    +
    +    /// Sets the value of the entry with the RustcVacantEntry's key,
    +    /// and returns a RustcOccupiedEntry.
    +    ///
    +    /// # Examples
    +    ///
    +    /// ```
    +    /// use hashbrown::HashMap;
    +    /// use hashbrown::hash_map::RustcEntry;
    +    ///
    +    /// let mut map: HashMap<&str, u32> = HashMap::new();
    +    ///
    +    /// if let RustcEntry::Vacant(v) = map.rustc_entry("poneyland") {
    +    ///     let o = v.insert_and_return(37);
    +    ///     assert_eq!(o.get(), &37);
    +    /// }
    +    /// ```
    +     #[inline]
    +    pub fn insert_and_return(self, value: V) -> RustcOccupiedEntry<'a, K, V> {
    +        let bucket = self.table.insert_no_grow(self.hash, (self.key, value));
    +        RustcOccupiedEntry {
    +            key: None,
    +            elem: bucket,
    +            table: self.table
    +        }
    +    }
     }
    
     impl<K, V> IterMut<'_, K, V> {
    ```
    
    This is also only an implementation for HashMap. I tried implementing for BTreeMap, but I don't really understand BTreeMap's internals and require more guidance on implementing the equivalent `VacantEntry::insert_and_return` such that it returns an `OccupiedEntry`. Notably, following the original PR's modifications I end up needing a `Handle<NodeRef<marker::Mut<'_>, _, _, marker::LeafOrInternal>, _>` while I only have a `Handle<NodeRef<marker::Mut<'_>, _, _, marker::Internal>, _>` and don't know how to proceed.
    
    (To be clear, I'm not asking for guidance right now; I'd be happy getting only the HashMap implementation — the subject of this PR — reviewed and ready, and leave the BTreeMap implementation for a latter PR.)
    Centril authored Oct 9, 2019
    Configuration menu
    Copy the full SHA
    c1ef7d5 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#64986 - skinny121:fn-ptr-const-generics, r=…

    …varkor
    
    Function pointers as const generic arguments
    
    Makes function pointers as const generic arguments usable.
    
    Fixes rust-lang#62395
    
    r? @varkor
    Centril authored Oct 9, 2019
    Configuration menu
    Copy the full SHA
    6b1eab9 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#65037 - anp:track-caller, r=oli-obk

    `#[track_caller]` feature gate (RFC 2091 1/N)
    
    RFC text: https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md
    Tracking issue: rust-lang#47809
    
    I started with @ayosec's commit to add the feature gate with tests and rebased it onto current master. I fixed up some tidy lints and added a test.
    Centril authored Oct 9, 2019
    Configuration menu
    Copy the full SHA
    e261879 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#65166 - csmoe:async-move, r=estebank

    Suggest to add `move` keyword for generator capture
    
     Closes rust-lang#64382
    r? @estebank
    Centril authored Oct 9, 2019
    Configuration menu
    Copy the full SHA
    ddcaded View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#65175 - andjo403:partitioning, r=zackmdavis

    add more info in debug traces for gcu merging
    
    to help in investigation of CGU partitioning problems e.g rust-lang#64913
    Centril authored Oct 9, 2019
    Configuration menu
    Copy the full SHA
    db99e5a View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#65220 - tlively:update-llvm-for-emscripten-…

    …exceptions, r=nikic
    
    Update LLVM for Emscripten exception handling support
    
    Updates LLVM to pick up the cherry-picked support for correctly
    handling exception handling with aggregates passed by value. This will
    be necessary to continue to support Emscripten's exception handling
    once we switch using Emscripten's LLVM backend. See rust-lang#63649.
    Centril authored Oct 9, 2019
    Configuration menu
    Copy the full SHA
    813785b View commit details
    Browse the repository at this point in the history