Skip to content
Merged
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
12 changes: 0 additions & 12 deletions src/test/run-pass/dst-field-align.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ struct Baz<T: ?Sized> {
a: T
}

#[repr(packed)]
struct Packed<T: ?Sized> {
a: u8,
b: T
}

struct HasDrop<T: ?Sized> {
ptr: Box<usize>,
data: T
Expand All @@ -55,12 +49,6 @@ fn main() {
// The pointers should be the same
assert_eq!(ptr1, ptr2);

// Test that packed structs are handled correctly
let p : Packed<usize> = Packed { a: 0, b: 13 };
assert_eq!(p.b.get(), 13);
let p : &Packed<Bar> = &p;
assert_eq!(p.b.get(), 13);

// Test that nested DSTs work properly
let f : Foo<Foo<usize>> = Foo { a: 0, b: Foo { a: 1, b: 17 }};
assert_eq!(f.b.b.get(), 17);
Expand Down