Skip to content
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

Support method impls with weaker trait clauses #530

Closed
Nadrieril opened this issue Jan 21, 2025 · 1 comment
Closed

Support method impls with weaker trait clauses #530

Nadrieril opened this issue Jan 21, 2025 · 1 comment
Labels
C-unsupported-language-feature A rust feature we don't extract well

Comments

@Nadrieril
Copy link
Member

This code is valid:

trait Trait {
    fn method()
    where
        Self: Sized;
}
impl Trait for () {
    fn method() {} // note the absence of the `Self: Sized` bound
}
fn main() {
    <() as Trait>::method()
}

but crashes charon because the implemented method expects the wrong clauses.

@Nadrieril Nadrieril added the C-unsupported-language-feature A rust feature we don't extract well label Jan 21, 2025
@Nadrieril
Copy link
Member Author

Duplicate of #513

@Nadrieril Nadrieril marked this as a duplicate of #513 Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-unsupported-language-feature A rust feature we don't extract well
Projects
None yet
Development

No branches or pull requests

1 participant