Skip to content

Commit d69b3b1

Browse files
committed
test: address comments and pacify the merciless tidy.
1 parent da33935 commit d69b3b1

File tree

8 files changed

+16
-20
lines changed

8 files changed

+16
-20
lines changed

src/test/auxiliary/rust_test_helpers.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,9 @@ struct U8TaggedEnumOptionU64U64 {
346346
uint8_t tag;
347347
union {
348348
struct {
349-
uint64_t a;
350-
uint64_t b;
351-
} some;
349+
uint64_t a;
350+
uint64_t b;
351+
} some;
352352
};
353353
};
354354

src/test/run-make-fulldeps/arguments-non-c-like-enum/nonclike.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![crate_type = "lib"]
2-
#![crate_name = "nonclike"]
3-
41
#[repr(C, u8)]
52
pub enum TT {
63
AA(u64, u64),

src/test/run-make-fulldeps/arguments-non-c-like-enum/test.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc, char *argv[]) {
5656
uint64_t rr = tt_add(xx, yy);
5757
assert(33 == rr);
5858

59-
/* This one returns an incorrect result. */
59+
/* This one used to return an incorrect result (see issue #68190). */
6060
T x = { .tag = A, .a = { ._0 = 1 } };
6161
T y = { .tag = A, .a = { ._0 = 10 } };
6262
uint64_t r = t_add(x, y);

src/test/run-make-fulldeps/pass-non-c-like-enum-to-c/nonclike.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![crate_type = "bin"]
2-
#![crate_name = "nonclike"]
3-
41
#[repr(C, u8)]
52
pub enum TT {
63
AA(u64, u64),

src/test/run-make-fulldeps/return-non-c-like-enum-from-c/nonclike.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![crate_type = "bin"]
2-
#![crate_name = "nonclike"]
3-
41
#[repr(C, u8)]
52
pub enum TT {
63
AA(u64, u64),

src/test/run-make-fulldeps/return-non-c-like-enum/nonclike.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![crate_type = "lib"]
2-
#![crate_name = "nonclike"]
3-
41
#[repr(C, u8)]
52
pub enum TT {
63
AA(u64, u64),

src/test/run-make-fulldeps/return-non-c-like-enum/test.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ int main(int argc, char *argv[]) {
5454
assert(10 == tt.aa._0);
5555
assert(20 == tt.aa._1);
5656

57-
/* This one segfaults. */
57+
/* This one used to segfault (see issue #68190). */
5858
T t = t_new(10);
5959
assert(A == t.tag);
6060
assert(10 == t.a._0);

src/test/ui/abi/abi-sysv64-arg-passing.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ mod tests {
139139
pub fn rust_dbg_abi_2(f: Floats) -> Floats;
140140
pub fn rust_dbg_new_some_u64u64(a: u64, b: u64) -> U8TaggedEnumOptionU64U64;
141141
pub fn rust_dbg_new_none_u64u64() -> U8TaggedEnumOptionU64U64;
142-
pub fn rust_dbg_unpack_option_u64u64(o: U8TaggedEnumOptionU64U64, a: *mut u64, b: *mut u64) -> i32;
142+
pub fn rust_dbg_unpack_option_u64u64(
143+
o: U8TaggedEnumOptionU64U64,
144+
a: *mut u64,
145+
b: *mut u64,
146+
) -> i32;
143147
pub fn rust_dbg_new_some_u64(some: u64) -> U8TaggedEnumOptionU64;
144148
pub fn rust_dbg_new_none_u64() -> U8TaggedEnumOptionU64;
145149
pub fn rust_dbg_unpack_option_u64(o: U8TaggedEnumOptionU64, v: *mut u64) -> i32;
@@ -371,14 +375,18 @@ mod tests {
371375

372376
let mut a: u64 = 0;
373377
let mut b: u64 = 0;
374-
let r = unsafe { rust_dbg_unpack_option_u64u64(some_u64u64, &mut a as *mut _, &mut b as *mut _) };
378+
let r = unsafe {
379+
rust_dbg_unpack_option_u64u64(some_u64u64, &mut a as *mut _, &mut b as *mut _)
380+
};
375381
assert_eq!(1, r);
376382
assert_eq!(10, a);
377383
assert_eq!(20, b);
378384

379385
let mut a: u64 = 0;
380386
let mut b: u64 = 0;
381-
let r = unsafe { rust_dbg_unpack_option_u64u64(none_u64u64, &mut a as *mut _, &mut b as *mut _) };
387+
let r = unsafe {
388+
rust_dbg_unpack_option_u64u64(none_u64u64, &mut a as *mut _, &mut b as *mut _)
389+
};
382390
assert_eq!(0, r);
383391
assert_eq!(0, a);
384392
assert_eq!(0, b);

0 commit comments

Comments
 (0)