-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rename @ to GC<T> #9796
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
Comments
cc #7803 |
Dupe. |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Dec 1, 2022
Fix rust-lang#9771 (`unnecessary_to_owned` false positive) Fixes rust-lang#9771 In that issue's example(s), the lint tried to add a `&` to a value, which implicitly changed the type of a field to a reference. The fix is to add the reference to `receiver_ty` (the type of the receiver of the `to_owned`-like method), before passing `receiver_ty` to `can_change_type`. `can_change_type` properly rejects the modified `receiver_ty`. cc: `@mikerite` just because I think he was the author of `can_change_type`. changelog: fix `unnecessary_to_owned` false positive which implicitly tried to change the type of a field to a reference
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't have time to put a full description here, but here are some random notes.
Update this with the actual plan once we know it.
trait Trait {
fn foo(GC<Mut>, ...)
fn bar(&self, ...)
fn baz(&mut self, ...)
fn xyz(self, ...)
}
fn boo(Anything<I<Want>>, ...)
obj: GC<Mut>
obj.foo()
obj.as_ref().bar() <-- explicit freeze?
obj.as_mut_ref().baz() <-- explicit mut borrow?
impl Trait for GC<Mut> {
fn foo(GC<Mut) {
self: GC<Mut<GC<Mut>>>
}
fn bar(&self) {
self: &GC<Mut>
}
...
fn xyz(self) {
self: GC<Mut>
}
}
Nominating.
The text was updated successfully, but these errors were encountered: