Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Stabilize btree_entry_insert feature #144871

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

Open
Kivooeo wants to merge 1 commit into rust-lang:master
base: master
Choose a base branch
Loading
from Kivooeo:btree_entry_insert-stabilize
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions library/alloc/src/collections/btree/map/entry.rs
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ impl<'a, K: Ord, V, A: Allocator + Clone> Entry<'a, K, V, A> {
/// # Examples
///
/// ```
/// #![feature(btree_entry_insert)]
/// use std::collections::BTreeMap;
///
/// let mut map: BTreeMap<&str, String> = BTreeMap::new();
Expand All @@ -284,7 +283,7 @@ impl<'a, K: Ord, V, A: Allocator + Clone> Entry<'a, K, V, A> {
/// assert_eq!(entry.key(), &"poneyland");
/// ```
#[inline]
#[unstable(feature = "btree_entry_insert", issue = "65225")]
#[stable(feature = "btree_entry_insert", since = "CURRENT_RUSTC_VERSION")]
pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V, A> {
match self {
Occupied(mut entry) => {
Expand Down Expand Up @@ -383,7 +382,6 @@ impl<'a, K: Ord, V, A: Allocator + Clone> VacantEntry<'a, K, V, A> {
/// # Examples
///
/// ```
/// #![feature(btree_entry_insert)]
/// use std::collections::BTreeMap;
/// use std::collections::btree_map::Entry;
///
Expand All @@ -395,7 +393,7 @@ impl<'a, K: Ord, V, A: Allocator + Clone> VacantEntry<'a, K, V, A> {
/// }
/// assert_eq!(map["poneyland"], 37);
/// ```
#[unstable(feature = "btree_entry_insert", issue = "65225")]
#[stable(feature = "btree_entry_insert", since = "CURRENT_RUSTC_VERSION")]
pub fn insert_entry(mut self, value: V) -> OccupiedEntry<'a, K, V, A> {
let handle = match self.handle {
None => {
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /