Skip to content

In stats.rs port [T] to Vec<T> #14354

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

Merged
merged 1 commit into from
May 22, 2014
Merged

In stats.rs port [T] to Vec<T> #14354

merged 1 commit into from
May 22, 2014

Conversation

EdorianDark
Copy link
Contributor

It seemed to me, that [T] was deprecated and i am trying to help.

@huonw
Copy link
Member

huonw commented May 22, 2014

The deprecation was just of the ~[T] (aka Box<[T]>) type. The borrowed slices &[T] and &mut [T] are perfectly fine.

(&Vec<T> is strictly less flexible than &[T], that is, anything you can do with a &Vec<T> you can also do with a &[T]. &mut [T] can do everything a &mut Vec<T>, except resize, i.e. the only reason to use a reference directly to a vector type of any form is a &mut Vec<T> when resizing is required.)

Thanks for the patch though! I'll approve it if you trim it down so that is just removing the allow(deprecated_owned_vector) lint attribute on the test_run_inner function.

@EdorianDark
Copy link
Contributor Author

Like so? It looks too easy, but it compiled and no test failed.

bors added a commit that referenced this pull request May 22, 2014
It seemed to me, that [T] was deprecated and i am trying to help.
@bors bors closed this May 22, 2014
@bors bors merged commit 6787e22 into rust-lang:master May 22, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 20, 2023
feat: Add signature help for record and tuple struct patterns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants