-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Be more informative with object-unsafe supertraits #19538
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Comments
emberian
added
A-diagnostics
Area: Messages for errors, warnings, and lints
I-papercut
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
labels
Dec 4, 2014
bors
added a commit
that referenced
this issue
Dec 7, 2014
Closes #18959 Technically, this causes code that once compiled to no longer compile, but that code probably never ran. [breaking-change] ------------ Not quite sure the error message is good enough, I feel like it ought to tell you "because it inherits from non-object-safe trait Foo", so I've opened up a follow-up issue #19538
@steveklabnik this hasn't been fixed, has it been migrated to RFCs? |
Sorry, I saw that #19539 was merged, which says "fixes 19538", and assumed that github incorrectly didn't auto close. |
I now see that the number was wrong, and this is a follow-up, not the original issue. My bad. |
This looks like it might be resolved. Code: trait Foo {
fn foo<T>(&self, val: T);
}
trait Bar: Foo { }
pub struct Thing;
impl Foo for Thing {
fn foo<T>(&self, val: T) { }
}
impl Bar for Thing { }
fn main() {
let mut thing = Thing;
let test: &mut Bar = &mut thing;
} And the current error:
|
nham
pushed a commit
to nham/rust
that referenced
this issue
Jun 24, 2015
bors
added a commit
that referenced
this issue
Jun 25, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Currently, we say:
But we should include the information that it's Bar that is not object-safe, because
Foo
is not and it inherits fromFoo
.The text was updated successfully, but these errors were encountered: