Skip to content
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

rustdoc: "FormatMessage failure" on Windows #13073

Closed
liigo opened this issue Mar 22, 2014 · 5 comments · Fixed by #13078
Closed

rustdoc: "FormatMessage failure" on Windows #13073

liigo opened this issue Mar 22, 2014 · 5 comments · Fixed by #13078
Labels
O-windows Operating system: Windows T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@liigo
Copy link
Contributor

liigo commented Mar 22, 2014

upstream/master:

rustdoc: doc/index.html
i686-pc-mingw32/stage2/bin/rustdoc.exe --markdown-css rust.css --markdown-before-content=doc/version_info.html --markdown-in-header=doc/favicon.inc --markdown-after-content=doc/footer.inc  /home/LIIGO/rust/rust/src/doc/index.md
rustdoc: doc/tutorial.html
i686-pc-mingw32/stage2/bin/rustdoc.exe --markdown-css rust.css --markdown-before-content=doc/version_info.html --markdown-in-header=doc/favicon.inc --markdown-after-content=doc/footer.inc  /home/LIIGO/rust/rust/src/doc/tutorial.md
task '<main>' failed at '[15100] FormatMessage failure', D:\MinGW\msys\1.0\home\LIIGO\rust\rust\src\libstd\os.rs:743
make: *** [doc/tutorial.html] Error 101
@liigo liigo changed the title rustdoc: FormatMessage failure rustdoc: "FormatMessage failure" on Windows Mar 22, 2014
@huonw
Copy link
Member

huonw commented Mar 22, 2014

Does that build include the fix in #13043?

@liigo
Copy link
Contributor Author

liigo commented Mar 22, 2014

Yes, include.
2014年3月22日 下午6:45于 "Huon Wilson" notifications@github.com写道:

Does that build include the fix in #13043#13043
?


Reply to this email directly or view it on GitHubhttps://github.com//issues/13073#issuecomment-38348271
.

@huonw
Copy link
Member

huonw commented Mar 22, 2014

Thanks for confirming.

cc @alexcrichton

@klutzy
Copy link
Contributor

klutzy commented Mar 22, 2014

Reproduced on revision 092afdb. Note that I'm using win 8.1 with non-english locale which probably causes issues.

Quick investigation:
FormatMessage is called by std::os::last_os_error(), which gets system error code then convert the code into string. It seems that FormatMessage failed with 15100: ERROR_MUI_FILE_NOT_FOUND.

@klutzy
Copy link
Contributor

klutzy commented Mar 22, 2014

So the issue is broken into two parts: 1. why rustdoc failed and called last_os_error()? 2. why FormatMessage failed?

bors added a commit that referenced this issue Mar 22, 2014
`FormatMessageW()` is called by `std::os::last_os_error()` to convert
errno into string, but the function may fail on non-english locale.
I don't know why it fails, but anyway it's better to return errno
than to `fail!()` in the case.

Fixes #13075
Fixes #13073
@bors bors closed this as completed in cffe9e0 Mar 22, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Aug 8, 2024
Fix `redundant_closure` false positive with closures has return type contains  `'static`

Fix rust-lang#13073 .

Please enable "ignore white-space change" settings in github UI for easy reviewing.

HACK: The third commit contains a hack to check if a type `T: 'static` when `fn() -> U where U: 'static`.
I don't have a clean way to check for it.

changelog: [`redundant_closure`] Fix false positive with closures has return type contains  `'static`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants