Skip to content

Commit 1765c13

Browse files
committed
fir: Improve field order, fix checks
1 parent 798e2d4 commit 1765c13

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fir/src/checks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl<T: Debug> Fir<T> {
118118
// FIXME: Check `to` as well
119119
}
120120
Kind::Assignment { to, from: _ } => {
121-
check!(to => Kind::TypedValue { .. }, node);
121+
check!(to => Kind::TypedValue { .. } | Kind::Binding { .. }, node);
122122
// FIXME: Check `from` as well
123123
}
124124
Kind::Instantiation {

fir/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ impl<T> Index<&OriginIdx> for Fir<T> {
254254

255255
#[derive(Debug, Clone)]
256256
pub struct Node<T = ()> {
257-
pub data: T,
258257
pub origin: OriginIdx,
259258
pub kind: Kind,
259+
pub data: T,
260260
}
261261

262262
/// An instance of [`Fir`] is similar to a graph, containing [`Node`]s and relationships binding them together.

0 commit comments

Comments
 (0)