Skip to content

Commit 3a0c0e9

Browse files
committed
Apply review feedback
1 parent e0ef87f commit 3a0c0e9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

library/coretests/tests/macros.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,12 @@ impl Drop for MutRefWithDrop<'_> {
236236
fn temporary_scope_introduction() {
237237
// Fails to compile if the macros don't introduce a temporary scope, since `&mut val` would
238238
// create a second mutable borrow while `MutRefWithDrop` still holds a unique ref.
239+
// See https://github.com/rust-lang/rust/issues/154406 for reference.
239240
let mut val = 0;
240241

241242
(assert_matches!(*MutRefWithDrop(&mut val).0, 0), std::mem::take(&mut val));
243+
(assert_matches!(*MutRefWithDrop(&mut val).0, 0, "msg"), std::mem::take(&mut val));
242244

243245
(debug_assert_matches!(*MutRefWithDrop(&mut val).0, 0), std::mem::take(&mut val));
246+
(debug_assert_matches!(*MutRefWithDrop(&mut val).0, 0, "msg"), std::mem::take(&mut val));
244247
}

0 commit comments

Comments
 (0)