-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Allow mut on self/~self like other args. #9989
Conversation
Does the manual/tutorial need to be updated for this? |
I was just wishing for this a few days ago. Excellent. 🌵 |
I'd like an explanation on why |
@bstrie There are quite a few places where just immediately do something like @huonw Yea, I guess I'll update this later to include those changes. |
Ok, I get the idea now. However, I'd still like one of the primary devs to weigh in on this before anyone approves it. |
This is great! I've certainly been wonting for this for awhile. @bstrie, I believe that there's nothing unsound about this because the function has ownership of I'd also be interested in a test or two with a mutable self in a default trait method. I know that there were bugs in the past for that, and I doubt that there's actually any bugs here, but better safe than sorry! |
I don't recall any previous discussion of this. Let's talk about it in the meeting tomorrow. |
@@ -0,0 +1,30 @@ | |||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's 2013 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right you are :P
Consensus is that we should do this. |
@luqmana Can you put something in the manual about this? |
…ip1995 Move `unnecessary_unsafety_doc` to `pedantic` This lint was added in rust-lang#9822. I like the idea, but also agree with rust-lang#9986 as well. I think it should at least not be warn-by-default. This is one of these cases, where I'd like a group between pedantic and restriction. But I believe that users using `#![warn(clippy::pedantic)]` will know how to enable the lint if they disagree with it. --- Since the lint is new: changelog: none r? `@flip1995` since I'd suggest back porting this, the original PR was merged 16 days ago. Closes: rust-lang#9986 (While it doesn't address everything, I believe that this is the best compromise)
No description provided.