Skip to content

Commit d9b1a08

Browse files
committed
explicitly invoke into_iter
1 parent b53837c commit d9b1a08

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/formality-core/src/judgment.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ macro_rules! push_rules {
265265
};
266266

267267
(@body $args:tt ($i:expr => $p:pat) $($m:tt)*) => {
268-
for $p in $i {
268+
// Explicitly calling `into_iter` silences some annoying lints
269+
// in the case where `$i` is an `Option` or a `Result`
270+
for $p in std::iter::IntoIterator::into_iter($i) {
269271
$crate::push_rules!(@body $args $($m)*);
270272
}
271273
};

0 commit comments

Comments
 (0)