Skip to content

Commit f6ae0c1

Browse files
committed
Auto merge of rust-lang#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.
2 parents 132ba2c + 8f612b5 commit f6ae0c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/hir-ty/src/mir.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ impl SwitchTargets {
323323

324324
#[derive(Debug, PartialEq, Eq, Clone)]
325325
pub struct Terminator {
326-
span: MirSpan,
327-
kind: TerminatorKind,
326+
pub span: MirSpan,
327+
pub kind: TerminatorKind,
328328
}
329329

330330
#[derive(Debug, PartialEq, Eq, Clone)]

0 commit comments

Comments
 (0)