Skip to content

Remove surplus prepend LinkedList fn - #85571

Merged
bors merged 1 commit into
rust-lang:masterfrom
workingjubilee:reverse-prepend
May 23, 2021
Merged

Remove surplus prepend LinkedList fn#85571
bors merged 1 commit into
rust-lang:masterfrom
workingjubilee:reverse-prepend

Conversation

@workingjubilee

Copy link
Copy Markdown
Member

This nightly library feature provides a function on LinkedList<T> that is identical to fn append with a reversed order of arguments. Observe this diff against the fn append doctest:

+#![feature(linked_list_prepend)]
fn main() {
use std::collections::LinkedList;
let mut list1 = LinkedList::new();
list1.push_back('a');
let mut list2 = LinkedList::new();
list2.push_back('b');
list2.push_back('c');
- list1.append(&mut list2);+ list2.prepend(&mut list1);- let mut iter = list1.iter();+ let mut iter = list2.iter();
assert_eq!(iter.next(), Some(&'a'));
assert_eq!(iter.next(), Some(&'b'));
assert_eq!(iter.next(), Some(&'c'));
assert!(iter.next().is_none());
- assert!(list2.is_empty());+ assert!(list1.is_empty());
}

As this has received no obvious request to stabilize it, nor does it have a tracking issue, and was left on nightly and the consensus seems to have been to deprecate it in this pre-1.0 PR in 2014, #20356, I propose simply removing it.

Originally committed to Rust in 2013, it is identical to append
with a reversed order of arguments.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 21, 2021
@Mark-Simulacrum

Copy link
Copy Markdown
Member

I don't necessarily mind removing this, though it might make sense to deprecate it for a bit so that the transition path can be signaled via the deprecation message.

r? @dtolnay

@dtolnay

Copy link
Copy Markdown
Member

As this has received no obvious request to stabilize it, nor does it have a tracking issue, and was left on nightly and the consensus seems to have been to deprecate it in this pre-1.0 PR in 2014, #20356, I propose simply removing it.

This is not the method from #20356. That one was deleted in #20462. The method in this PR is from #68123.

r? @Amanieu

@rust-highfiverust-highfive assigned Amanieu and unassigned dtolnayMay 22, 2021
@workingjubilee

Copy link
Copy Markdown
MemberAuthor

I am learning so many things about the history of this source file today.

@Amanieu

Copy link
Copy Markdown
Member

I am not sure how that method got in there, it has nothing to do with cursors.

@bors r+

@bors

bors commented May 22, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit c516e71 has been approved by Amanieu

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 22, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request May 23, 2021
Rollup of 6 pull requests
Successful merges:
- rust-lang#84758 (MSVC: Avoid using jmp stubs for dll function imports)
- rust-lang#85288 (add an example to explain std::io::Read::read returning 0 in some cases)
- rust-lang#85334 (Add doc aliases to `unit`)
- rust-lang#85525 (Fix my mailmap entry)
- rust-lang#85571 (Remove surplus prepend LinkedList fn)
- rust-lang#85575 (Fix auto-hide for implementations and implementors.)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 75edb76 into rust-lang:masterMay 23, 2021
@rustbotrustbot added this to the 1.54.0 milestone May 23, 2021
@workingjubilee
workingjubilee deleted the reverse-prepend branch October 4, 2021 20:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@workingjubilee@rust-highfive@Mark-Simulacrum@dtolnay@Amanieu@bors@rustbot