Skip to content

Rollup of 6 pull requests#26002

Merged
bors merged 17 commits into
rust-lang:masterfrom
Manishearth:rollup
Jun 4, 2015
Merged

Rollup of 6 pull requests#26002
bors merged 17 commits into
rust-lang:masterfrom
Manishearth:rollup

Conversation

lorenzb and others added 16 commits May 30, 2015 14:25
This was causing `rustdoc` to interpret the part starting with
`(A.) ...` as a code block based on its four-space indentation,
which then was treated by `rustdoc` as a *Rust* code snippet,
and thus was attempting (and failing) to parse my english as
Rust code. Thus causing the compiler-docs build to fail.

Independently, we should probably change `rustdoc` to not interpret
four-space indents as code that needs to be tested; it seems too
perilous to me at least.

(But the formatting here needed to be changed either way.)

cc Issue rust-lang#25699.
The API documentation is not explicit enough that because `try!` returns
`Err` early for you, you can only use it in functions that return
`Result`. The book mentions this, but if you come across `try!` outside
of the book and look it up in the docs, this restriction on the return
type of the function is not particularly clear.
…sakis

My main sources of information are [RFC401](https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md), the rust IRC channel, and a bunch of experiments to figure out what `rustc` currently supports.
Note that the RFC calls for some coercion behaviour that is not implemented yet (see rust-lang#18469).
The documentation in this PR mostly covers current behaviour of rust and doesn't document the future behaviour. I haven't written about receiver expression coercion.

I would be happy to rewrite/adapt the PR according to feedback.

r? @steveklabnik
…=Manishearth

Fix the dropck doc formatting to avoid hitting four-space indent.

This was causing `rustdoc` to interpret the part starting with `(A.) ...` as a code block based on its four-space indentation, which then was treated by `rustdoc` as a *Rust* code snippet, and thus was attempting (and failing) to parse my english as Rust code. Thus causing the compiler-docs build to fail.

Independently, we should probably change `rustdoc` to not interpret four-space indents as code that needs to be tested; it seems too perilous to me at least.

(But the formatting here needed to be changed either way.)

cc Issue rust-lang#25699.
The priority policy of RWLock is not specified, and the fact there is no policy should probably be specified.
The API documentation is not explicit enough that because `try!` returns
`Err` early for you, you can only use it in functions that return
`Result`. The book mentions this, but if you come across `try!` outside
of the book and look it up in the docs, this restriction on the return
type of the function is not particularly clear.

I seriously had this epiphany a few days ago after working with Rust for MONTHS, and after seeing [a friend have to come to the same realization](http://joelmccracken.github.io/entries/a-simple-web-app-in-rust-pt-2a/), I'd like to save more people from this confusion :) 💖
Issue: rust-lang#25969

Compare the span on the stable branch (correct) with the span on the nightly branch (incorrect) for the following example: http://is.gd/lTAo9c. This pull request fixes the regression.

@Manishearth has been kind enough to pitch some ideas for a regression test, mainly revolving around testing the span in compile-fail test, but this has proven unsuccessful. Other suggestions/ ideas would be much appreciated!
Added missing '>' at the end of my email address :)
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @pcwalton

(rust_highfive has picked a reviewer for you, use r? to override)

@Manishearth

Copy link
Copy Markdown
Member Author

@bors: r+ p=20 force

@bors

bors commented Jun 4, 2015

Copy link
Copy Markdown
Collaborator

📌 Commit 5ef7614 has been approved by Manishearth

@bors

bors commented Jun 4, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5ef7614 with merge f1b053e...

@bors

bors commented Jun 4, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-nopt-t

@Manishearth

Copy link
Copy Markdown
Member Author

@bors retry force

@Manishearth

Copy link
Copy Markdown
Member Author

@bors force

@bors

bors commented Jun 4, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 5ef7614 with merge 907153a...

@bors

bors commented Jun 4, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-opt

@Manishearth

Copy link
Copy Markdown
Member Author

@bors: r+ p=20 force

@bors

bors commented Jun 4, 2015

Copy link
Copy Markdown
Collaborator

📌 Commit fd3b6ca has been approved by Manishearth

@Manishearth

Copy link
Copy Markdown
Member Author

@bors force

@Manishearth

Copy link
Copy Markdown
Member Author

@bors: force

@bors

bors commented Jun 4, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit fd3b6ca with merge 8d25549...

@bors

bors commented Jun 4, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-win-gnu-64-nopt-t

@alexcrichton

Copy link
Copy Markdown
Member

@bors: retry

On Wed, Jun 3, 2015 at 11:02 PM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-win-gnu-64-nopt-t
http://buildbot.rust-lang.org/builders/auto-win-gnu-64-nopt-t/builds/192


Reply to this email directly or view it on GitHub
#26002 (comment).

@bors

bors commented Jun 4, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit fd3b6ca with merge 0aeb9f6...

bors added a commit that referenced this pull request Jun 4, 2015
@bors

bors commented Jun 4, 2015

Copy link
Copy Markdown
Collaborator

@bors bors merged commit fd3b6ca into rust-lang:master Jun 4, 2015
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR which is a rollup

Projects

None yet

Development

Successfully merging this pull request may close these issues.