You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
We didn't really decide anything today; just discussing how to move GC into the libs. Here are the notes.
- pcwalton: want to talk about GC, DSTs
- `my_smart_pointer.as_ref().some_method()`
- If we have `GC<Mut<T>>`
- `my_smart_pointer.as_ref().as_ref().some_method()`
- You could do `fn foo(Foo<self>, ...)`
- Absolute minimum things for 1.0 if we wanted to do `@T` => `GC<T>`
- change `@T` to `GC<T>`
- change `@T` constructor to placement new, `in`
- generalize explicit self to accept smart pointer declarations
like `GC<self>`, `GC<Mut<self>>`
Unclear to me if this should work:
- GC<[T]>
- ~[T], &[T] ==>
- GC<Trait> <-- this would be nice to have, but maybe it can wait
- GC<~Trait> <-- potential workaround
- Eventually we'd probably want an overloaded `*`, but we can (for now) make GC a lang item and just do built-in deref
brson asks what about `fn foo(&RC<self>, ...)`.
nmatsakis: why not? should be possible to make it work
brson: would allow you to take RC<self> "by ref" (not cloning)
Nominating.
The text was updated successfully, but these errors were encountered:
Fixrust-lang#9771 (`unnecessary_to_owned` false positive)
Fixesrust-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
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: