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

engine: bundling: inconsistant renaming for inherent impls #1133

Open
W95Psp opened this issue Nov 25, 2024 · 0 comments
Open

engine: bundling: inconsistant renaming for inherent impls #1133

W95Psp opened this issue Nov 25, 2024 · 0 comments
Labels
engine Issue in the engine enhancement New feature or request

Comments

@W95Psp
Copy link
Collaborator

W95Psp commented Nov 25, 2024

pub mod a {
    pub fn f() {
        super::b::f()
    }

    pub struct A;
    impl A {
        pub fn a(self) {}
    }
    fn g(x: A) {
        x.a()
    }
}
pub mod b {
    pub fn f() {
        super::a::f()
    }
}


struct B;
impl B {
    fn b(self) {}
}
fn g(x: B, y: a::A) {
    x.b();
    y.a()
}

Open this code snippet in the playground

The naming scheme for a::A::a is different from the one for B::b.
a::A::a extracts to a while B::b extracts to impl__B__b.

This is not a bug, but an inconsistency.

I think we should improve that: A::a should be named impl__A__a.

@W95Psp W95Psp added enhancement New feature or request engine Issue in the engine labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issue in the engine enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant