-
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 6 pull requests #65227
Rollup of 6 pull requests #65227
Commits on Oct 6, 2019
-
Configuration menu - View commit details
-
Copy full SHA for dd2356f - Browse repository at this point
Copy the full SHA dd2356fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 50932ea - Browse repository at this point
Copy the full SHA 50932eaView commit details
Commits on Oct 7, 2019
-
[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.
Configuration menu - View commit details
-
Copy full SHA for 543449d - Browse repository at this point
Copy the full SHA 543449dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c04c8e - Browse repository at this point
Copy the full SHA 6c04c8eView commit details -
track_caller feature gate starts in 1.40.0.
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 43d4b70 - Browse repository at this point
Copy the full SHA 43d4b70View commit details -
Configuration menu - View commit details
-
Copy full SHA for d931afe - Browse repository at this point
Copy the full SHA d931afeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9900211 - Browse repository at this point
Copy the full SHA 9900211View commit details -
Configuration menu - View commit details
-
Copy full SHA for 53096c5 - Browse repository at this point
Copy the full SHA 53096c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8992c30 - Browse repository at this point
Copy the full SHA 8992c30View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdc4bd1 - Browse repository at this point
Copy the full SHA bdc4bd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 130be6d - Browse repository at this point
Copy the full SHA 130be6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f70ed29 - Browse repository at this point
Copy the full SHA f70ed29View commit details -
Configuration menu - View commit details
-
Copy full SHA for 190212c - Browse repository at this point
Copy the full SHA 190212cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c49966b - Browse repository at this point
Copy the full SHA c49966bView commit details -
Configuration menu - View commit details
-
Copy full SHA for cca58d1 - Browse repository at this point
Copy the full SHA cca58d1View commit details
Commits on Oct 8, 2019
-
Configuration menu - View commit details
-
Copy full SHA for d1d2565 - Browse repository at this point
Copy the full SHA d1d2565View commit details -
Fix calling function pointer const parameters. Also fixes inference of
function pointer const parameters.
Configuration menu - View commit details
-
Copy full SHA for 2afd277 - Browse repository at this point
Copy the full SHA 2afd277View commit details -
Configuration menu - View commit details
-
Copy full SHA for a59eb6d - Browse repository at this point
Copy the full SHA a59eb6dView commit details -
Gate use of raw and function pointers in const generics behind
const_compare_raw_pointers.
Configuration menu - View commit details
-
Copy full SHA for cf3b561 - Browse repository at this point
Copy the full SHA cf3b561View commit details -
Configuration menu - View commit details
-
Copy full SHA for 43badf9 - Browse repository at this point
Copy the full SHA 43badf9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9677cbe - Browse repository at this point
Copy the full SHA 9677cbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 50ea5f4 - Browse repository at this point
Copy the full SHA 50ea5f4View commit details -
Update feature gate error message
Co-Authored-By: varkor <github@varkor.com>
Configuration menu - View commit details
-
Copy full SHA for 16b7f44 - Browse repository at this point
Copy the full SHA 16b7f44View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5986fe2 - Browse repository at this point
Copy the full SHA 5986fe2View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 2c81089 - Browse repository at this point
Copy the full SHA 2c81089View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdcc21c - Browse repository at this point
Copy the full SHA bdcc21cView commit details
Commits on Oct 9, 2019
-
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.)
Configuration menu - View commit details
-
Copy full SHA for c1ef7d5 - Browse repository at this point
Copy the full SHA c1ef7d5View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 6b1eab9 - Browse repository at this point
Copy the full SHA 6b1eab9View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for e261879 - Browse repository at this point
Copy the full SHA e261879View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for ddcaded - Browse repository at this point
Copy the full SHA ddcadedView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for db99e5a - Browse repository at this point
Copy the full SHA db99e5aView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 813785b - Browse repository at this point
Copy the full SHA 813785bView commit details