Skip to content

Restore leading spaces on empty context lines in patch files #2015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2024
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
2 changes: 1 addition & 1 deletion collector/compile-benchmarks/coercions/0-println.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ index 3fb7c5f..63e7f0f 100644
@@ -65574,4 +65574,4 @@ pub static MAPPING: [&'static str; 0xffff] = [
"",
];

-fn main() { }
+fn main() { println!("test"); }
2 changes: 1 addition & 1 deletion collector/compile-benchmarks/inflate/0-println.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index b5f3996..8d7766d 100644
+++ b/src/lib.rs
@@ -184,6 +184,7 @@ impl<'a> BitStream<'a> {
}

fn fill(&mut self) -> BitState {
+ println!("testing");
while self.state.n + 8 <= 32 && self.use_byte() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ index 4b9db94..c44dea6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2,7 +2,7 @@ extern crate futures;

use futures::{Future, Poll};

-const BUFFER_SIZE: usize = 1;
+const BUFFER_SIZE: usize = 6144;
pub struct Error(::std::io::Error);

struct Dummy<T>(T);
6 changes: 3 additions & 3 deletions collector/compile-benchmarks/issue-46449/1-u32-3072.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ index c44dea6..b555f05 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2,8 +2,8 @@ extern crate futures;

use futures::{Future, Poll};

-const BUFFER_SIZE: usize = 6144;
-pub struct Error(::std::io::Error);
+const BUFFER_SIZE: usize = 3072;
+pub struct Error(u32);

struct Dummy<T>(T);
impl<T> Future for Dummy<T> {
4 changes: 2 additions & 2 deletions collector/compile-benchmarks/issue-46449/2-u8-3072.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ index f8f91d6..b555f05 100644
+++ b/src/lib.rs
@@ -3,7 +3,7 @@ extern crate futures;
use futures::{Future, Poll};

const BUFFER_SIZE: usize = 3072;
-pub struct Error(u32);
+pub struct Error(u8);

struct Dummy<T>(T);
impl<T> Future for Dummy<T> {
4 changes: 2 additions & 2 deletions collector/compile-benchmarks/issue-46449/3-empty-3072.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ index f8f91d6..72382a0 100644
+++ b/src/lib.rs
@@ -3,7 +3,7 @@ extern crate futures;
use futures::{Future, Poll};

const BUFFER_SIZE: usize = 3072;
-pub struct Error(u8);
+pub struct Error;

struct Dummy<T>(T);
impl<T> Future for Dummy<T> {
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ index 72382a0..5d8fc67 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2,8 +2,8 @@ extern crate futures;

use futures::{Future, Poll};

-const BUFFER_SIZE: usize = 3072;
-pub struct Error;
+const BUFFER_SIZE: usize = 6144;
+pub struct Error(&'static str);

struct Dummy<T>(T);
impl<T> Future for Dummy<T> {
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index 9db743f..ef1948e 100644
+++ b/src/compile.rs
@@ -137,6 +137,8 @@ impl Compiler {
}

fn compile_one(mut self, expr: &Hir) -> result::Result<Program, Error> {
+ {} // @030
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index 9bea703..3b6ae94 100644
+++ b/src/expand.rs
@@ -128,6 +128,7 @@ fn find_cap_ref(replacement: &[u8]) -> Option<CaptureRef<'_>> {
}

/// Returns true if and only if the given byte is allowed in a capture name.
fn is_valid_cap_letter(b: &u8) -> bool {
+ { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index 92bafc1..6eb5799 100644
+++ b/src/freqs.rs
@@ -2,7 +2,7 @@
// edit directly

pub const BYTE_FREQUENCIES: [u8; 256] = [
- 55, // '\x00'
+ 54+1, // '\x00'
Expand Down
2 changes: 1 addition & 1 deletion collector/compile-benchmarks/regex-1.5.5/5-Job.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ index 3c06254..4b72fd4 100644
SaveRestore { slot: usize, old_pos: Option<usize> },
+ Inst { ip: InstPtr, at: InputAt },
}

impl<'a, 'm, 'r, 's, I: Input> Bounded<'a, 'm, 'r, 's, I> {
2 changes: 1 addition & 1 deletion collector/compile-benchmarks/regex/0-compile-one.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index 9db743f..ef1948e 100644
+++ b/src/compile.rs
@@ -137,6 +137,8 @@ impl Compiler {
}

fn compile_one(mut self, expr: &Expr) -> result::Result<Program, Error> {
+ {} // @030
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index 9bea703..3b6ae94 100644
+++ b/src/expand.rs
@@ -84,6 +84,7 @@ fn find_cap_ref(mut replacement: &[u8]) -> Option<CaptureRef> {
}

fn is_valid_cap_letter(b: &u8) -> bool {
+ { }
match *b {
Expand Down
2 changes: 1 addition & 1 deletion collector/compile-benchmarks/regex/2-expand.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index 9bea703..a28b82d 100644
+++ b/src/expand.rs
@@ -5,6 +5,7 @@ use memchr::memchr;
use bytes::Captures;

pub fn expand(caps: &Captures, mut replacement: &[u8], dst: &mut Vec<u8>) {
+ { }
while !replacement.is_empty() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ index 92bafc1..6eb5799 100644
+++ b/src/freqs.rs
@@ -12,7 +12,7 @@
// edit directly

pub const BYTE_FREQUENCIES: [u8; 256] = [
- 55, // '\x00'
+ 54+1, // '\x00'
Expand Down
2 changes: 1 addition & 1 deletion collector/compile-benchmarks/regex/6-sparse-set.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ index 34c05e7..ef5188e 100644
- /// The number of elements in the set.
- size: usize,
}

impl SparseSet {
2 changes: 1 addition & 1 deletion collector/compile-benchmarks/regex/7-Job.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ index 3c06254..4b72fd4 100644
SaveRestore { slot: usize, old_pos: Option<usize> },
+ Inst { ip: InstPtr, at: InputAt },
}

impl<'a, 'm, 'r, 's, I: Input> Bounded<'a, 'm, 'r, 's, I> {
2 changes: 1 addition & 1 deletion collector/compile-benchmarks/serde-1.0.136/0-println.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ index 576fd03c..a825007a 100644
--- a/src/de/utf8.rs
+++ b/src/de/utf8.rs
@@ -41,6 +41,7 @@ pub struct Encode {

impl Encode {
pub fn as_str(&self) -> &str {
+ println!();
Expand Down
2 changes: 1 addition & 1 deletion collector/compile-benchmarks/style-servo/0-println.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ diff --git a/components/style/matching.rs b/components/style/matching.rs
if replacements.intersects(RestyleHint::for_animations()) {
+ println!("{:?}", context.shared.traversal_flags.for_animation_only());
debug_assert!(context.shared.traversal_flags.for_animation_only());

if replacements.contains(RESTYLE_SMIL) {
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ index da32340..81c52b7 100644
assert self.name.name == obj.identifier.name
- return IDLCallbackType(self.location, obj)
+ return IDLCallbackType(obj.location, obj)

if self._promiseInnerType and not self._promiseInnerType.isComplete():
self._promiseInnerType = self._promiseInnerType.complete(scope)
@@ -6521,7 +6521,7 @@ class Parser(Tokenizer):
Expand Down
Loading