Add common trait for crate definitions#118215
Merged
bors merged 3 commits intorust-lang:masterfrom Nov 24, 2023
Merged
Conversation
This will allow users to use rustc span messages to display user friendly messages.
Collaborator
|
r? @spastorino (rustbot has picked a reviewer for you, use r? to override) |
Collaborator
|
This PR changes Stable MIR cc @oli-obk, @celinval, @spastorino, @ouz-a |
This comment has been minimized.
This comment has been minimized.
ouz-a
reviewed
Nov 23, 2023
Contributor
ouz-a
left a comment
There was a problem hiding this comment.
few nits, this is very nice change thanks!
ouz-a
approved these changes
Nov 24, 2023
Contributor
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 24, 2023
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#118187 (Recompile LLVM when it changes in the git sources) - rust-lang#118210 (intercrate ambiguity causes: ignore candidates which don't apply) - rust-lang#118215 (Add common trait for crate definitions) - rust-lang#118238 (memcpy assumptions: update GCC link) - rust-lang#118243 (EvalCtxt::commit_if_ok don't inherit nested goals) - rust-lang#118245 (Add `Span` to `TraitBoundModifier`) - rust-lang#118246 (Remove a hack for effects) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 24, 2023
Rollup merge of rust-lang#118215 - celinval:smir-def-paths, r=ouz-a Add common trait for crate definitions In stable mir, we specialize DefId, however some functionality is the same for every definition, such as def paths, and getting their crate. Use a trait to implement those.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In stable mir, we specialize DefId, however some functionality is the same for every definition, such as def paths, and getting their crate. Use a trait to implement those.