Skip to content

core::vec is missing methods for mutable slices - #6780

Closed
june0cho wants to merge 1 commit into
rust-lang:incomingfrom
june0cho:issue5984
Closed

core::vec is missing methods for mutable slices#6780
june0cho wants to merge 1 commit into
rust-lang:incomingfrom
june0cho:issue5984

Conversation

@june0cho

Copy link
Copy Markdown
Contributor

Fix#5984. Also, I found a problem on type inference and left a comment.

@brson

Copy link
Copy Markdown
Contributor

@june0cho Thanks! Can you file an issue about the method inference problem?

@nikomatsakis

Copy link
Copy Markdown
Contributor

I don't believe the failure to find a method is a bug, but rather the impl definitions in the PR are not quite right. In particular, the mut_slice method is defined as:

 + fn mut_slice(&mut self, start: uint, end: uint) -> &'self mut [T] {...}

but the receiver type is &mut [T]. Really the mut_slice method should therefore just take self, I should think. (Once dynamically sized types lands, the current self type would be the correct one, because the impl type would be [T] not &mut [T]).

bors added a commit that referenced this pull request May 29, 2013
Fix#5984. Also, I found a problem on type inference and left a comment.
@borsbors closed this May 29, 2013
@june0cho

Copy link
Copy Markdown
ContributorAuthor

@nikomatsakis you are right. I corrected as you commented and the error does not occur anymore.
I'll update it !

@june0chojune0cho mentioned this pull request May 29, 2013
bors added a commit that referenced this pull request May 29, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 25, 2021
lintcheck: fully rerun lintcheck if clippy was rebuilt since last log update
Automatically clean lintchecks shared target dir (will force clippy to recheck sources) if
the clippy binaries are older than the lintcheck logs.
Also updated lintcheck logs in the pr.
changelog: lintcheck: fully rerun lintcheck if clippy was rebuilt since last log update
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
7009: Implement workspace/willRenameFiles for single-level file moves r=matklad a=kjeremy
Automatically rename modules during file rename if they're in the same directory.
Fixesrust-lang#6780
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Sign up for freeto 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

@june0cho@brson@nikomatsakis@bors