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

More questionmarks in doctests #62663

Merged
merged 1 commit into from
Aug 2, 2019
Merged

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Jul 13, 2019

This removes the other unwraps in the macro doctests, replacing them with ?. For now, we need to specify the main function including the return type, we can get rid of that once the return type suggestion for fn main() { .. } works correctly.

r? @QuietMisdreavus

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 13, 2019
@Alexendoo
Copy link
Member

Ping from triage, any updates? @QuietMisdreavus

@Alexendoo
Copy link
Member

r? @GuillaumeGomez

@pietroalbini
Copy link
Member

Just trying stuff.

r? @pietroalbini

@Alexendoo
Copy link
Member

r? @GuillaumeGomez

@pietroalbini
Copy link
Member

r? @pietroalbini

Even more highfive testing.

@pietroalbini
Copy link
Member

r? @GuillaumeGomez

@pietroalbini
Copy link
Member

Hopefully the last test! Sorry for hijacking this PR.

r? @pietroalbini

@pietroalbini
Copy link
Member

r? @GuillaumeGomez

/// fn main() -> Result<(), Box<dyn std::error::Error>> {
/// let mut s = String::new();
/// let mut v = Vec::new();
/// writeln!(&mut s, "{} {}", "abc", 123)?; // uses fmt::Write::write_fmt
Copy link
Member

Choose a reason for hiding this comment

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

Old C habit but maybe add an empty line before this one? Totally not mandatory but I think it'd make the reading a bit easier.

@GuillaumeGomez
Copy link
Member

r=me once comment addressed (same if you prefer not to address it haha).

@llogiq llogiq force-pushed the more-questionmark-docs branch from 862512c to cbac781 Compare August 1, 2019 15:33
@llogiq
Copy link
Contributor Author

llogiq commented Aug 1, 2019

@GuillaumeGomez adressed the comment (I also found a second instance).

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Aug 2, 2019

📌 Commit cbac781 has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 2, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 2, 2019
…illaumeGomez

More questionmarks in doctests

This removes the other `unwrap`s in the macro doctests, replacing them with `?`. For now, we need to specify the main function including the return type, we can get rid of that once the return type suggestion for `fn main() { .. }` works correctly.

r? @QuietMisdreavus
bors added a commit that referenced this pull request Aug 2, 2019
Rollup of 7 pull requests

Successful merges:

 - #62663 (More questionmarks in doctests)
 - #62969 (Changing the structure of `mir::interpret::InterpError`)
 - #63153 (Remove redundant method with const variable resolution)
 - #63189 (Doc improvements)
 - #63198 (Allow trailing comma in macro 2.0 declarations.)
 - #63202 (Fix ICE in #63135)
 - #63203 (Make is_mutable use PlaceRef instead of it's fields)

Failed merges:

r? @ghost
@bors bors merged commit cbac781 into rust-lang:master Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants