-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Can't find impl for type involving & #5050
Comments
I'm not sure if this is a bug. Here's an updated test case: trait Tr {
fn foo(&self);
}
impl<'self> Tr for &'self int {
fn foo(&self) {
println("hello");
}
}
fn foo<T: Tr>(a: &T) { a.foo(); }
fn main() {
foo(&5);
} ...which fails to compile with However, if you change the |
On Mon, May 06, 2013 at 12:40:38PM -0700, Ben Striegel wrote:
I don't believe this is a bug. T here is |
It appears that the consensus is that this isn't a bug, so I'm closing for now. |
…st, r=flip1995 Change the criteria of `interior_mutable_const` This implements my suggestion [here](rust-lang/rust-clippy#5050 (comment)), and so hopefully fixes rust-lang#5050. * stop linting associated types and generic type parameters * start linting ones in trait impls whose corresponding definitions in the traits are generic * remove the `is_copy` check as presumably the only purpose of it is to allow generics with `Copy` bounds as `Freeze` is internal and generics are no longer linted * remove the term 'copy' from the tests as being `Copy` no longer have meaning --- changelog: Change the criteria of `declare_interior_mutable_const` and `borrow_interior_mutable_const` to narrow the lints to only lint things that defenitly is a interior mutable type, not potentially.
There are similarly confusing errors involving unsafe pointers, but I haven't figured out a good testcase yet.
The text was updated successfully, but these errors were encountered: