Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #15270 - ChristianSchott:patch-1, r=HKalbasi
Make fields of mir::Terminator public When trying to use the RA crate, I am unable to access the fields in `hir_def::mir::Terminator`. I don't see any reason, why these should be private, especially as the fields of `hir_def::mir::Statement` are `pub`. I am not sure if the fields in `hir_def::mir::SwitchTargets` should be made `pub` too, but at least they are read-accessible via some public methods.. Sorry if I missed something, this is my first PR.
bors 2023-07-13
parent 132ba2c · parent 8f612b5 · commit f6ae0c1
-rw-r--r--crates/hir-ty/src/mir.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir-ty/src/mir.rs b/crates/hir-ty/src/mir.rs
index 5e92b350a3..dc846fc394 100644
--- a/crates/hir-ty/src/mir.rs
+++ b/crates/hir-ty/src/mir.rs
@@ -323,8 +323,8 @@ impl SwitchTargets {
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct Terminator {
- span: MirSpan,
- kind: TerminatorKind,
+ pub span: MirSpan,
+ pub kind: TerminatorKind,
}
#[derive(Debug, PartialEq, Eq, Clone)]