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: name clash for items within trait methods #1161

Open
W95Psp opened this issue Dec 3, 2024 · 0 comments
Open

Engine: name clash for items within trait methods #1161

W95Psp opened this issue Dec 3, 2024 · 0 comments

Comments

@W95Psp
Copy link
Collaborator

W95Psp commented Dec 3, 2024

In the folllwing snippet, the items A_STRUCT and a_fn yields name clashes.

struct A;
struct B;

impl Clone for A {
   fn clone(&self) -> Self {
      struct A_STRUCT;
      fn a_fn(){};
      A
   }
}
impl Clone for B {
   fn clone(&self) -> Self {
      struct A_STRUCT;
      fn a_fn(){};
      B
   }
}

Open this code snippet in the playground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant