nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: bytecodealliance/wasmtime
Pull request #5674 (2023-01-31 19:09:56)

Remove unused code from the write module
The `DisplayValuesWithDelimiter` struct is no longer used.
<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

- [ ] This has been discussed in issue #..., or if not, please tell us why
  here.
- [ ] A short description of what this does, why it is needed; if the
  description becomes long, the matter should probably be discussed in an issue
  first.
- [ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
  If you don't know who could review this, please indicate so. The list of
  suggested reviewers on the right can help you.

Please ensure all communication adheres to the [code of
conduct](https://github.com/bytecodealliance/wasmtime/blob/master/CODE_OF_CONDUCT.md).
-->



Patch:
diff --git a/cranelift/codegen/src/write.rs b/cranelift/codegen/src/write.rs
index bd9167284..1eaa78d63 100644
--- a/cranelift/codegen/src/write.rs
+++ b/cranelift/codegen/src/write.rs
@@ -525,21 +525,6 @@ impl<'a> fmt::Display for DisplayValues<'a> {
     }
 }
 
-struct DisplayValuesWithDelimiter<'a>(&'a [Value], char);
-
-impl<'a> fmt::Display for DisplayValuesWithDelimiter<'a> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        for (i, val) in self.0.iter().enumerate() {
-            if i == 0 {
-                write!(f, "{}", val)?;
-            } else {
-                write!(f, "{}{}", self.1, val)?;
-            }
-        }
-        Ok(())
-    }
-}
-
 #[cfg(test)]
 mod tests {
     use crate::cursor::{Cursor, CursorPosition, FuncCursor};


Test patch:
diff --git a/winch/filetests/build.rs b/winch/filetests/build.rs
new file mode 100644
index 000000000..bd0f62b29
--- /dev/null
+++ b/winch/filetests/build.rs
@@ -0,0 +1,4 @@
+fn main() {
+    // Ensure that new files in the filetests directory cause a rebuild.
+    println!("cargo:rerun-if-changed=filetests");
+}