-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Description
This should compile but no longer does:
use std::cell::RefCell;
trait Foo {
fn foo(&self) {}
}
impl<T> Foo for T where T: Clone {}
struct Bar;
impl Bar {
fn foo(&self) {}
}
fn main() {
let b = RefCell::new(Bar);
b.borrow().foo()
}
test.rs:17:5: 17:21 error: the trait `core::clone::Clone` is not implemented for the type `core::cell::Ref<'_,Bar>`
test.rs:17 b.borrow().foo()
^~~~~~~~~~~~~~~~
Note that calling Bar.foo()
directly works.
Metadata
Metadata
Assignees
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.