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

Unit-like structs doc: Improve code sample #40144

Merged
merged 2 commits into from
Mar 2, 2017
Merged

Unit-like structs doc: Improve code sample #40144

merged 2 commits into from
Mar 2, 2017

Conversation

MajorBreakfast
Copy link
Contributor

r? @steveklabnik

BTW it seems that

let p = Proton {};

compiles without an error. That's why I didn't add it to the example. It's about consistency anyway.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@steveklabnik
Copy link
Member

@bors: r+ rollup

thanks! (not sure what's up with travis)

@bors
Copy link
Contributor

bors commented Feb 28, 2017

📌 Commit 3c5001f has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Feb 28, 2017
Unit-like structs doc: Improve code sample

r? @steveklabnik

BTW it seems that
```Rust
let p = Proton {};
```
compiles without an error. That's why I didn't add it to the example. It's about consistency anyway.
bors added a commit that referenced this pull request Feb 28, 2017
Rollup of 5 pull requests

- Successful merges: #40142, #40144, #40150, #40151, #40153
- Failed merges:
@frewsxcv
Copy link
Member

@durka
Copy link
Contributor

durka commented Feb 28, 2017

Can examples in the book be marked compile-fail? Otherwise that code block will need to be ignored, or the error demonstration line commented out.

@frewsxcv
Copy link
Member

Can examples in the book be marked compile-fail?

I think so:

https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/markdown.rs#L541-L562

@MajorBreakfast
Copy link
Contributor Author

MajorBreakfast commented Mar 1, 2017

@durka @frewsxcv Thx for the hint. I've added the tag. Now it should work. Let's wait for the tests to confirm it. :)

@frewsxcv
Copy link
Member

frewsxcv commented Mar 1, 2017

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 1, 2017

📌 Commit 8f1a0af has been approved by frewsxcv

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Mar 2, 2017
Unit-like structs doc: Improve code sample

r? @steveklabnik

BTW it seems that
```Rust
let p = Proton {};
```
compiles without an error. That's why I didn't add it to the example. It's about consistency anyway.
bors added a commit that referenced this pull request Mar 2, 2017
Rollup of 9 pull requests

- Successful merges: #40081, #40144, #40168, #40169, #40170, #40173, #40175, #40191, #40194
- Failed merges:
@bors bors merged commit 8f1a0af into rust-lang:master Mar 2, 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.

6 participants