Skip to content

codegen: Improve the assertion message of failing layout tests. #487

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 2 commits into from
Feb 8, 2017

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Feb 7, 2017

@emilio
Copy link
Contributor Author

emilio commented Feb 7, 2017

Actually, @flier, wanna review this? :)

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't go through the expectations' diff, but this looks great to me :)

r=me (travis CI matrix changes ok as follow up, or split out from this PR)

@@ -2745,7 +2745,7 @@ mod utils {
}

pub fn fnsig_return_ty(ctx: &BindgenContext,
sig: &super::FunctionSig)
sig: &FunctionSig)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are going to support older rustc, we should add the oldest supported version to our travis ci matrix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only temporary until Gecko updates is rustc version anyway, should be <1week

@emilio
Copy link
Contributor Author

emilio commented Feb 7, 2017

@bors-servo r=fitzgen

@bors-servo
Copy link

📌 Commit 193a103 has been approved by fitzgen

@bors-servo
Copy link

⌛ Testing commit 193a103 with merge 16cc5bf...

bors-servo pushed a commit that referenced this pull request Feb 7, 2017
 codegen: Improve the assertion message of failing layout tests.

r? @fitzgen

cc @flier
assert_eq!($size_of_expr, $size,
concat!("Size of template specialization: ", stringify!($ident)));
assert_eq!($align_of_expr, $align,
concat!("Alignment of template specialization: ", stringify!($ident)));
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch is good to me, something else observed.

Do we need check the field offset for the template specialization?

It seems be different to VTable case, should have potential layout issue. Anyway, I haven't user cases in wild

@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: fitzgen
Pushing 16cc5bf to master...

@bors-servo bors-servo merged commit 193a103 into rust-lang:master Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants