Skip to content

Add method .as_mut_slice() to MutableVector#10885

Merged
bors merged 1 commit into
rust-lang:masterfrom
lilyball:as_mut_slice
Dec 30, 2013
Merged

Add method .as_mut_slice() to MutableVector#10885
bors merged 1 commit into
rust-lang:masterfrom
lilyball:as_mut_slice

Conversation

@lilyball

@lilyball lilyball commented Dec 9, 2013

Copy link
Copy Markdown
Contributor

This method is primarily intended to allow for converting a [T, ..N] to
a &mut [T].

@emberian

Copy link
Copy Markdown
Contributor

@kballard needs a rebase

This method is primarily intended to allow for converting a [T, ..N] to
a &mut [T].
@lilyball

Copy link
Copy Markdown
Contributor Author

Rebased

@lilyball

Copy link
Copy Markdown
Contributor Author

test io::fs::test::truncate_works::native ... FAILED

I guess something wonky is going on with the windows buildbot.

bors added a commit that referenced this pull request Dec 30, 2013
This method is primarily intended to allow for converting a [T, ..N] to
a &mut [T].
@bors bors merged commit 01209f1 into rust-lang:master Dec 30, 2013
@lilyball lilyball deleted the as_mut_slice branch December 30, 2013 23:42
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 31, 2023
new lint: `redundant_locals`

This lint checks for code like the following:

```rs
let x = 1;
let x = x;
```

It checks (afaik) all cases where a binding is shadowed by its own value in the same block, including function parameters. This has no effect and is almost certainly accidental, so it's in the `correctness` category like `self_assignment`.

This also lays the groundwork for a more generalized version of rust-lang#5102.

changelog: new lint: [`redundant_local`]
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.

4 participants