Skip to content

Commit 6b8c371

Browse files
committed
Manual adjustments
1 parent df8d8b6 commit 6b8c371

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

tests/pass/issues/issue-17877.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ fn main() {
33
match [0u8; 16 * 1024] {
44
_ => 42_usize,
55
},
6-
42_usize
6+
42_usize,
77
);
88

99
assert_eq!(
@@ -12,6 +12,6 @@ fn main() {
1212
[0, ..] => 1_usize,
1313
_ => 2_usize,
1414
},
15-
1_usize
15+
1_usize,
1616
);
1717
}

tests/pass/libc.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ fn test_mutex_libc_init_recursive() {
9595
assert_eq!(libc::pthread_mutexattr_init(&mut attr as *mut _), 0);
9696
assert_eq!(
9797
libc::pthread_mutexattr_settype(&mut attr as *mut _, libc::PTHREAD_MUTEX_RECURSIVE),
98-
0
98+
0,
9999
);
100100
let mut mutex: libc::pthread_mutex_t = std::mem::zeroed();
101101
assert_eq!(libc::pthread_mutex_init(&mut mutex as *mut _, &mut attr as *mut _), 0);
@@ -118,11 +118,11 @@ fn test_mutex_libc_init_normal() {
118118
let mut mutexattr: libc::pthread_mutexattr_t = std::mem::zeroed();
119119
assert_eq!(
120120
libc::pthread_mutexattr_settype(&mut mutexattr as *mut _, 0x12345678),
121-
libc::EINVAL
121+
libc::EINVAL,
122122
);
123123
assert_eq!(
124124
libc::pthread_mutexattr_settype(&mut mutexattr as *mut _, libc::PTHREAD_MUTEX_NORMAL),
125-
0
125+
0,
126126
);
127127
let mut mutex: libc::pthread_mutex_t = std::mem::zeroed();
128128
assert_eq!(libc::pthread_mutex_init(&mut mutex as *mut _, &mutexattr as *const _), 0);
@@ -141,9 +141,9 @@ fn test_mutex_libc_init_errorcheck() {
141141
assert_eq!(
142142
libc::pthread_mutexattr_settype(
143143
&mut mutexattr as *mut _,
144-
libc::PTHREAD_MUTEX_ERRORCHECK
144+
libc::PTHREAD_MUTEX_ERRORCHECK,
145145
),
146-
0
146+
0,
147147
);
148148
let mut mutex: libc::pthread_mutex_t = std::mem::zeroed();
149149
assert_eq!(libc::pthread_mutex_init(&mut mutex as *mut _, &mutexattr as *const _), 0);
@@ -216,7 +216,7 @@ fn test_prctl_thread_name() {
216216
let mut buf = [255; 10];
217217
assert_eq!(
218218
libc::prctl(libc::PR_GET_NAME, buf.as_mut_ptr(), 0 as c_long, 0 as c_long, 0 as c_long),
219-
0
219+
0,
220220
);
221221
assert_eq!(b"<unnamed>\0", &buf);
222222
let thread_name = CString::new("hello").expect("CString::new failed");
@@ -226,14 +226,14 @@ fn test_prctl_thread_name() {
226226
thread_name.as_ptr(),
227227
0 as c_long,
228228
0 as c_long,
229-
0 as c_long
229+
0 as c_long,
230230
),
231-
0
231+
0,
232232
);
233233
let mut buf = [255; 6];
234234
assert_eq!(
235235
libc::prctl(libc::PR_GET_NAME, buf.as_mut_ptr(), 0 as c_long, 0 as c_long, 0 as c_long),
236-
0
236+
0,
237237
);
238238
assert_eq!(b"hello\0", &buf);
239239
let long_thread_name = CString::new("01234567890123456789").expect("CString::new failed");
@@ -243,14 +243,14 @@ fn test_prctl_thread_name() {
243243
long_thread_name.as_ptr(),
244244
0 as c_long,
245245
0 as c_long,
246-
0 as c_long
246+
0 as c_long,
247247
),
248-
0
248+
0,
249249
);
250250
let mut buf = [255; 16];
251251
assert_eq!(
252252
libc::prctl(libc::PR_GET_NAME, buf.as_mut_ptr(), 0 as c_long, 0 as c_long, 0 as c_long),
253-
0
253+
0,
254254
);
255255
assert_eq!(b"012345678901234\0", &buf);
256256
}

tests/pass/linux-getrandom-without-isolation.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@ fn main() {
1111
libc::SYS_getrandom,
1212
0 as *mut libc::c_void,
1313
0 as libc::size_t,
14-
0 as libc::c_uint
14+
0 as libc::c_uint,
1515
),
16-
0
16+
0,
1717
);
1818
assert_eq!(
1919
libc::syscall(
2020
libc::SYS_getrandom,
2121
buf.as_mut_ptr() as *mut libc::c_void,
2222
5 as libc::size_t,
23-
0 as libc::c_uint
23+
0 as libc::c_uint,
2424
),
25-
5
25+
5,
2626
);
2727

2828
assert_eq!(
2929
libc::getrandom(0 as *mut libc::c_void, 0 as libc::size_t, 0 as libc::c_uint),
30-
0
30+
0,
3131
);
3232
assert_eq!(
3333
libc::getrandom(
3434
buf.as_mut_ptr() as *mut libc::c_void,
3535
5 as libc::size_t,
36-
0 as libc::c_uint
36+
0 as libc::c_uint,
3737
),
38-
5
38+
5,
3939
);
4040
}
4141
}

tests/pass/linux-getrandom.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@ fn main() {
1010
libc::SYS_getrandom,
1111
0 as *mut libc::c_void,
1212
0 as libc::size_t,
13-
0 as libc::c_uint
13+
0 as libc::c_uint,
1414
),
15-
0
15+
0,
1616
);
1717
assert_eq!(
1818
libc::syscall(
1919
libc::SYS_getrandom,
2020
buf.as_mut_ptr() as *mut libc::c_void,
2121
5 as libc::size_t,
22-
0 as libc::c_uint
22+
0 as libc::c_uint,
2323
),
24-
5
24+
5,
2525
);
2626

2727
assert_eq!(
2828
libc::getrandom(0 as *mut libc::c_void, 0 as libc::size_t, 0 as libc::c_uint),
29-
0
29+
0,
3030
);
3131
assert_eq!(
3232
libc::getrandom(
3333
buf.as_mut_ptr() as *mut libc::c_void,
3434
5 as libc::size_t,
35-
0 as libc::c_uint
35+
0 as libc::c_uint,
3636
),
37-
5
37+
5,
3838
);
3939
}
4040
}

tests/pass/stacked-borrows/2phase.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ fn two_phase3(b: bool) {
2222
x.push((
2323
{
2424
if b {
25-
x = &mut y
26-
};
25+
x = &mut y;
26+
}
2727
22
2828
},
2929
x.len(),

0 commit comments

Comments
 (0)