Skip to content

Fix various doc tests #4563

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 4 commits into from
Jan 21, 2013
Merged

Fix various doc tests #4563

merged 4 commits into from
Jan 21, 2013

Conversation

cpeterso
Copy link
Contributor

The manual's link attribute example code did not compile! For new users that copy and paste example code (like I did), this is pretty frustrating. The master and 0.5 branches have the same doc bug. Since this is a small fix for a frustrating problem, you might consider cherry picking this fix to those branches.

OpenSSL's SHA1() function takes a size_t, according the Darwin and Linux header files. The FFI tutorial was inconsistently using both uint and libc::c_uint.

Enable lint warnings for doc tests. I thought this would be a good way to ensure that the docs' example code uses the latest coding style. Is the big, multi-line """ ... """ string too ugly?

For lint warnings that many doc tests fail (e.g. deprecated_self, non_camel_case_types, structural_records), I just enabled them as #[ warn(...) ] as a reminder to possibly forbid them in the future.

Also fix some typos and remove some semicolons (!!) from the doc test generator Python script.

@catamorphism
Copy link
Contributor

Great, thanks!

catamorphism added a commit that referenced this pull request Jan 21, 2013
@catamorphism catamorphism merged commit c9c8d6f into rust-lang:incoming Jan 21, 2013
@catamorphism
Copy link
Contributor

Sorry, I had to revert the FFI tutorial patch because our Linux bot doesn't (I guess) have the right library installed -- http://buildbot.rust-lang.org/builders/incoming-full-linux/builds/342/steps/test/logs/stdio

@cpeterso
Copy link
Contributor Author

oops, sorry! make check worked on my Mac. <:)

@cpeterso cpeterso deleted the fix-doc-tests branch January 22, 2013 04:46
@catamorphism
Copy link
Contributor

No worries! Maybe it's our bot that's wrong and it should have that library? Then again, maybe we don't want to require all users to have it just to build the docs.

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.

2 participants