Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions c2rust-refactor/tests/reconstruct_for_range/run.sh

This file was deleted.

12 changes: 12 additions & 0 deletions c2rust-refactor/tests/snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,18 @@ fn test_matcher_typed() {
.test();
}

/// TODO Broken.
/// This panics with the error:
///
/// ```shell
/// thread 'rustc' panicked at 'Could not find an HIR id for NodeId NodeId(61); span=Some(NodeSpan { span: Span { lo: BytePos(237), hi: BytePos(325), ctxt: #0 }, kind: Stmt }), context=Some(NodeContextKey { stmt_index: Some(6), child_path: [], symbol: None, owner: Some(NodeId(8)) })', c2rust-refactor/src/context.rs:927:13
/// ```
#[should_panic]
#[test]
fn test_reconstruct_for_range() {
refactor("reconstruct_for_range").test();
}

#[test]
fn test_reconstruct_while() {
refactor("reconstruct_while").test();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
source: c2rust-refactor/tests/snapshots.rs
expression: c2rust-refactor reconstruct_for_range --rewrite-mode alongside -- tests/snapshots/reconstruct_for_range.rs --edition 2021
---
fn main() {
let (mut i, mut j, mut k);

'a: for i in 0..10 {
println!("{}", i);
}
Expand Down