Skip to content

Commit be54f6c

Browse files
committed
tidy
1 parent e700e31 commit be54f6c

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

compiler/rustc_session/src/options.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,7 @@ mod desc {
379379
pub const parse_passes: &str = "a space-separated list of passes, or `all`";
380380
pub const parse_panic_strategy: &str = "either `unwind` or `abort`";
381381
pub const parse_on_broken_pipe: &str = "either `kill`, `error`, or `inherit`";
382-
pub const parse_patchable_function_entry: &str =
383-
"either two comma separated integers (total_nops,prefix_nops), with prefix_nops <= total_nops, or one integer (total_nops)";
382+
pub const parse_patchable_function_entry: &str = "either two comma separated integers (total_nops,prefix_nops), with prefix_nops <= total_nops, or one integer (total_nops)";
384383
pub const parse_opt_panic_strategy: &str = parse_panic_strategy;
385384
pub const parse_oom_strategy: &str = "either `panic` or `abort`";
386385
pub const parse_relro_level: &str = "one of: `full`, `partial`, or `off`";

tests/codegen/patchable-function-entry/patchable-function-entry-both-flags.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ pub fn fun3() {}
2727
#[patchable_function_entry(prefix_nops = 2, entry_nops = 19)]
2828
pub fn fun4() {}
2929

30-
// The attribute should override patchable-function-entry to 3 and patchable-function-prefix to the default of 0, clearing it entirely
30+
// The attribute should override patchable-function-entry to 3 and
31+
// patchable-function-prefix to the default of 0, clearing it entirely
3132
#[no_mangle]
3233
#[patchable_function_entry(entry_nops = 3)]
3334
pub fn fun5() {}
3435

35-
// The attribute should override patchable-function-prefix to 4 and patchable-function-entry to the default of 0, clearing it entirely
36+
// The attribute should override patchable-function-prefix to 4
37+
// and patchable-function-entry to the default of 0, clearing it entirely
3638
#[no_mangle]
3739
#[patchable_function_entry(prefix_nops = 4)]
3840
pub fn fun6() {}
@@ -60,4 +62,3 @@ pub fn fun6() {}
6062

6163
// CHECK: attributes #6 = { {{.*}}"patchable-function-prefix"="4"{{.*}} }
6264
// CHECK-NOT: attributes #6 = { {{.*}}patchable-function-entry{{.*}} }
63-

tests/codegen/patchable-function-entry/patchable-function-entry-no-flag.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ pub fn fun0() {}
1010
#[patchable_function_entry(prefix_nops = 1, entry_nops = 2)]
1111
pub fn fun1() {}
1212

13-
// The attribute should work even without compiler flags and only set patchable-function-entry to 3.
13+
// The attribute should work even without compiler flags
14+
// and only set patchable-function-entry to 3.
1415
#[no_mangle]
1516
#[patchable_function_entry(entry_nops = 3)]
1617
pub fn fun2() {}
1718

18-
// The attribute should work even without compiler flags and only set patchable-function-prefix to 4.
19+
// The attribute should work even without compiler flags
20+
// and only set patchable-function-prefix to 4.
1921
#[no_mangle]
2022
#[patchable_function_entry(prefix_nops = 4)]
2123
pub fn fun3() {}
@@ -25,7 +27,6 @@ pub fn fun3() {}
2527
// CHECK: @fun2() unnamed_addr #2
2628
// CHECK: @fun3() unnamed_addr #3
2729

28-
2930
// CHECK-NOT: attributes #0 = { {{.*}}patchable-function-entry{{.*}} }
3031
// CHECK-NOT: attributes #0 = { {{.*}}patchable-function-prefix{{.*}} }
3132

@@ -36,4 +37,3 @@ pub fn fun3() {}
3637

3738
// CHECK: attributes #3 = { {{.*}}"patchable-function-prefix"="4"{{.*}} }
3839
// CHECK-NOT: attributes #3 = { {{.*}}patchable-function-entry{{.*}} }
39-

tests/codegen/patchable-function-entry/patchable-function-entry-one-flag.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ pub fn fun3() {}
2727
#[patchable_function_entry(prefix_nops = 2, entry_nops = 19)]
2828
pub fn fun4() {}
2929

30-
// The attribute should override patchable-function-entry to 3 and patchable-function-prefix to the default of 0, clearing it entirely
30+
// The attribute should override patchable-function-entry to 3
31+
// and patchable-function-prefix to the default of 0, clearing it entirely
3132
#[no_mangle]
3233
#[patchable_function_entry(entry_nops = 3)]
3334
pub fn fun5() {}
3435

35-
// The attribute should override patchable-function-prefix to 4 and patchable-function-entry to the default of 0, clearing it entirely
36+
// The attribute should override patchable-function-prefix to 4
37+
// and patchable-function-entry to the default of 0, clearing it entirely
3638
#[no_mangle]
3739
#[patchable_function_entry(prefix_nops = 4)]
3840
pub fn fun6() {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
//@ compile-flags: -Z patchable-function-entry=1,2
2-
fn main() {}
2+
fn main() {}

0 commit comments

Comments
 (0)