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

name() and trimmed_name() for stable_mir::crate_def::DefId #137886

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

NotLebedev
Copy link
Contributor

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

Use `DefId.name` and `DefId.trimmed_name` instead
Reference `DefId` in `CrateDef` docs to avoid duplicating long
description of `trimmed_name`
@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2025

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 2, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2025

This PR changes Stable MIR

cc @oli-obk, @celinval, @ouz-a

@oli-obk
Copy link
Contributor

oli-obk commented Mar 2, 2025

@bors r+ rollup

Thanks! looks great.

@bors
Copy link
Collaborator

bors commented Mar 2, 2025

📌 Commit a3378f5 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 2, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 3, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#137375 (Minor internal comments fix for `BufRead::read_line`)
 - rust-lang#137641 (More precisely document `Global::deallocate()`'s safety.)
 - rust-lang#137755 (doc: update Wasmtime flags)
 - rust-lang#137851 (improve `simd_select` error message when used with invalid mask type)
 - rust-lang#137860 (rustc_target: Add msync target feature and enable it on powerpcspe targets)
 - rust-lang#137871 (fix `RangeBounds::is_empty` documentation)
 - rust-lang#137873 (Disable `f16` on Aarch64 without `neon`)
 - rust-lang#137876 (Adjust triagebot.toml entries for `rustc_mir_build/src/builder/`)
 - rust-lang#137883 (edit mailmap)
 - rust-lang#137886 (`name()` and `trimmed_name()` for `stable_mir::crate_def::DefId`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 59fe0c7 into rust-lang:master Mar 3, 2025
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request 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
@rustbot rustbot added this to the 1.87.0 milestone Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

name() for DefId
4 participants