hax icon indicating copy to clipboard operation
hax copied to clipboard

Some `concrete_ident`s differ only by their `kind`

Open maximebuyse opened this issue 1 year ago • 3 comments

For items of the form {v = Type{name;_} ; ident;_}, name and ident have the same def_id but name has kind Type and ident has kind Value. They should both have kind Type.

In general we should never have two concrete_idents that have the same def_id but a different kind. We should add a sanity check for that.

maximebuyse avatar Oct 02 '24 09:10 maximebuyse

In the case of a struct with anonymous variants we also give the same name to the variants and the struct itself which is a problem in the case of renaming with cyclic dependencies:

Example:



pub mod a {
    pub struct A(pub Box<super::b::B>);
}

pub mod b {
    pub enum B {
        A(super::a::A),
        B(i32)
    }
}



Open this code snippet in the playground

Here A is translated to

t_A =
  | t_A :
      Alloc.Boxed.t_Box t_B
          Alloc.Alloc.t_Global
    -> t_A

But the variant should be named A and not t_A, the problem is that the renaming cannot differentiate them.

maximebuyse avatar Oct 14 '24 14:10 maximebuyse

This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.

github-actions[bot] avatar Dec 17 '24 02:12 github-actions[bot]

This is related to:

  • #1135

W95Psp avatar Dec 17 '24 06:12 W95Psp

This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.

github-actions[bot] avatar Oct 30 '25 00:10 github-actions[bot]

This is not a problem anymore.

maximebuyse avatar Nov 06 '25 12:11 maximebuyse