Skip to content

name() for DefId #91

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

Closed
the-ssd opened this issue Dec 6, 2024 · 1 comment · Fixed by rust-lang/rust#137886
Closed

name() for DefId #91

the-ssd opened this issue Dec 6, 2024 · 1 comment · Fixed by rust-lang/rust#137886
Assignees
Labels
good first issue Good for newcomers

Comments

@the-ssd
Copy link

the-ssd commented Dec 6, 2024

In the debug implementation of DefId the name is printed, so maybe it should also have a name() function like in CrateDef?

@celinval celinval added the good first issue Good for newcomers label Feb 27, 2025
@NotLebedev
Copy link

@rustbot claim

rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 3, 2025
Rollup merge of rust-lang#137886 - NotLebedev:stable-mir-91, r=oli-obk

`name()` and `trimmed_name()` for `stable_mir::crate_def::DefId`

Resolves rust-lang/project-stable-mir#91

* Added `stable_mir::crate_def::DefId::name()`  and  `stable_mir::crate_def::DefId::trimmed_name()`  methods
* Changed `CrateDef` and `DefId` `Debug` implementations to use new methods instead of copy-paste call to `Context::def_name`
* Updated docs to avoid duplicating description of what `name` and `trimmed_name` do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants