-
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
StableMIR: Add associated_items
.
#138826
Conversation
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. |
@bors r+ rollup Thanks! |
Rollup of 11 pull requests Successful merges: - rust-lang#136457 (Expose algebraic floating point intrinsics) - rust-lang#137880 (Autodiff batching) - rust-lang#137897 (fix pthread-based tls on apple targets) - rust-lang#138024 (Allow optimizing out `panic_bounds_check` in Unicode checks.) - rust-lang#138546 (Add integer to string formatting tests) - rust-lang#138826 (StableMIR: Add `associated_items`.) - rust-lang#138950 (replace extra_filename with strict version hash in metrics file names) - rust-lang#139274 (Rustdoc: typecheck settings.js) - rust-lang#139285 (use lower case to match other error messages) - rust-lang#139341 (Apply `Recovery::Forbidden` when reparsing pasted macro fragments.) - rust-lang#139389 (make `Arguments::as_statically_known_str` doc(hidden)) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138826 - makai410:assoc-items, r=celinval StableMIR: Add `associated_items`. Resolves: rust-lang/project-stable-mir#87
Resolves: rust-lang/project-stable-mir#87