-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
StableMIR: Add associated_items
.
#138826
base: master
Are you sure you want to change the base?
StableMIR: Add associated_items
.
#138826
Conversation
- Add `AssocItem` and related things to `stable_mir::ty`. - Implement `Display` for `AssocKind`.
…lated to `AssocItem`.
Lack of the ui-test for it. I open this pr for some feedback first. |
My question is what data structure should be used for |
Forgot to mention that there may be some issues with the retrieved associated items that the compiler generated after RPITIT desugaring. For example: trait Ciallo {
fn rpitit(&self) -> impl std::fmt::Debug {
"RPITIT"
}
} get all associated items of this trait by AssocItems {
items: [
(
"rpitit",
AssocItem {
def_id: AssocDef(
DefId {
id: 17336,
name: "Ciallo::rpitit",
},
),
name: "rpitit",
kind: Fn,
container: Trait,
trait_item_def_id: Some(
AssocDef(
DefId {
id: 17336,
name: "Ciallo::rpitit",
},
),
),
fn_has_self_parameter: true,
opt_rpitit_info: None,
},
),
(
"",
AssocItem {
def_id: AssocDef(
DefId {
id: 17338,
name: "Ciallo::{synthetic#0}",
},
),
name: "",
kind: Type,
container: Trait,
trait_item_def_id: None,
fn_has_self_parameter: false,
opt_rpitit_info: Some(
Trait {
fn_def_id: FnDef(
DefId {
id: 17336,
name: "Ciallo::rpitit",
},
),
opaque_def_id: OpaqueDef(
DefId {
id: 17339,
name: "Ciallo::rpitit::{opaque#0}",
},
),
},
),
},
),
],
} The problem is the name of the generated associated type is "". I have no knowledge of RPITIT desugaring, unsure if this is an issue and whether we should slap a name to it. |
Can you do |
Oh yes, it makes sense. |
No description provided.