-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fixed XFailed test x86stdcall #10363
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
Conversation
Could you also rebase this into a single commit? Also feel free to ping this pull request when you update it because sadly github doesn't send out any notifications about pull request force-pushes. |
@alexcrichton Rebased into one commit. :) |
#[cfg(target_os = "win32")] | ||
extern "stdcall" mod kernel32 { | ||
#[cfg(windows)] | ||
#[cfg(target_arch = "x86")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[cfg(target_arch = "x86")]
lines are not necessary since extern "system"
also covers x86_64. Same for line 24.
In fact, they caused test failure since #[cfg(windows)] #[cfg(target_arch = "x86")]
is "or" relation. (you can write #[cfg(windows), target_arch = "x86")]
if you want "and" relation.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@alexcrichton @klutzy Thanks! I've removed the target_arch lines now. |
I think the (The |
@huonw thanks! Fixed and rebased. |
I don't know how to test that this runs locally, since I don't have a win32 machine. =/ The test fails because kernel32::SetLastEroor and kernel32::GetLastError are private. I assume that implies that I need to put the |
That should do the trick! |
There was a syntax error because the `extern "stdcall"` was outside the module instead of inside it. * moved `extern` inside module * change `extern "stdcall"` to `extern "system"` * change `cfg(target_os="win32")` to `cfg(windows)` * updated copyright dates * changed log(error, ...) => info!(....) * added `pub` keyword to kernel32 functions
@alexcrichton Ok, fixed [again]. |
* moved `extern` inside module * changed `extern "stdcall"` to `extern "system"` * changed `cfg(target_os="win32")` to `cfg(windows)` * only run on Windows && x86, (not x86_64) * updated copyright dates
[significant_drop_tightening] Ignore inexpensive statements Not all statements that follow the last use of a lock guard are expensive and can therefore be ignored by the lint. ```rust pub fn foo() -> i32 { let mutex = Mutex::new(1); let lock = mutex.lock().unwrap(); let rslt = *lock; let another = rslt; another } ``` --- changelog: [`significant_drop_tightening`]: No longer lints for inexpensive statements after the lock guard [rust-lang#10363](rust-lang/rust-clippy#10363) <!-- changelog_checked -->
extern
inside moduleextern "stdcall"
toextern "system"
cfg(target_os="win32")
tocfg(windows)