Skip to content

Conversation

zachs18
Copy link
Contributor

@zachs18 zachs18 commented Jul 1, 2023

The lifetime of the references being copied from is unrelated to the allocator.

Compare with impl<'a, T: 'a + Copy, A: Allocator> Extend<&'a T> for VecDeque<T, A> which does not have the A: 'a bound already.

Since Allocator is unstable, the only possible A on stable is Global, and Global: 'static, so this change is not (should not be) observable on stable (or without #![feature(allocator_api)]). This is observable on nightly.

@rustbot
Copy link
Collaborator

rustbot commented Jul 1, 2023

r? @cuviper

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 1, 2023
@zachs18 zachs18 marked this pull request as ready for review July 1, 2023 07:52
@cuviper
Copy link
Member

cuviper commented Jul 21, 2023

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 21, 2023

📌 Commit 0699345 has been approved by cuviper

It is now in the queue for this repository.

@bors bors 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 Jul 21, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 22, 2023
…r_lifetime, r=cuviper

Remove lifetime bound for A for `impl Extend<&'a T> for Vec<T, A>`.

The lifetime of the references being copied from is unrelated to the allocator.

Compare with [`impl<'a, T: 'a + Copy, A: Allocator> Extend<&'a T> for VecDeque<T, A>`](https://doc.rust-lang.org/alloc/collections/vec_deque/struct.VecDeque.html#impl-Extend%3C%26'a+T%3E-for-VecDeque%3CT,+A%3E) which does not have the `A: 'a` bound already.

Since `Allocator` is unstable, the only possible `A` on stable is `Global`, and `Global: 'static`, so this change is not (should not be) observable on stable (or without `#![feature(allocator_api)]`). [This is observable on nightly](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=8c4aa166c6116a90593d2934d30cfeb3).
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 22, 2023
…r_lifetime, r=cuviper

Remove lifetime bound for A for `impl Extend<&'a T> for Vec<T, A>`.

The lifetime of the references being copied from is unrelated to the allocator.

Compare with [`impl<'a, T: 'a + Copy, A: Allocator> Extend<&'a T> for VecDeque<T, A>`](https://doc.rust-lang.org/alloc/collections/vec_deque/struct.VecDeque.html#impl-Extend%3C%26'a+T%3E-for-VecDeque%3CT,+A%3E) which does not have the `A: 'a` bound already.

Since `Allocator` is unstable, the only possible `A` on stable is `Global`, and `Global: 'static`, so this change is not (should not be) observable on stable (or without `#![feature(allocator_api)]`). [This is observable on nightly](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=8c4aa166c6116a90593d2934d30cfeb3).
@bors
Copy link
Collaborator

bors commented Jul 22, 2023

⌛ Testing commit 0699345 with merge dcb8104...

@bors
Copy link
Collaborator

bors commented Jul 22, 2023

☀️ Test successful - checks-actions
Approved by: cuviper
Pushing dcb8104 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 22, 2023
@bors bors merged commit dcb8104 into rust-lang:master Jul 22, 2023
@rustbot rustbot added this to the 1.73.0 milestone Jul 22, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (dcb8104): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 1
Improvements ✅
(secondary)
-3.3% [-3.4%, -3.2%] 2
All ❌✅ (primary) -0.5% [-0.5%, -0.5%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 652.988s -> 650.666s (-0.36%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants