Skip to content

explicit self and object types (trait types) are incompatible #3865

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
nikomatsakis opened this issue Oct 26, 2012 · 1 comment
Closed

explicit self and object types (trait types) are incompatible #3865

nikomatsakis opened this issue Oct 26, 2012 · 1 comment
Labels
A-codegen Area: Code generation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Milestone

Comments

@nikomatsakis
Copy link
Contributor

This program yields an LLVM error:

trait Foo {
    fn foo(&self) -> uint;
}

impl uint: Foo {
    fn foo(&self) -> uint { *self }
}

fn bar(x: @Foo, v: uint) {
    assert x.foo() == v;
}

fn main() {
    let x: @uint = @3;
    bar(x as @Foo, *x);
}
@nikomatsakis
Copy link
Contributor Author

Fixed.

RalfJung pushed a commit to RalfJung/rust that referenced this issue Sep 8, 2024
…fJung

Fix comment in mutex_id_offset

We no longer store the kind inside the pthread_mutex_t, so this comment is outdated.
Sorry I didn't catch this in the original PR.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-codegen Area: Code generation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

1 participant