Skip to content

Rollup of 18 pull requests - #31148

Merged
bors merged 39 commits into
rust-lang:masterfrom
steveklabnik:rollup
Jan 23, 2016
Merged

Rollup of 18 pull requests#31148
bors merged 39 commits into
rust-lang:masterfrom
steveklabnik:rollup

Conversation

andreabediniand others added 30 commits January 19, 2016 16:29
Documentation of `CStr::from_ptr` suggests using `str::from_utf8(slice.to_bytes()).unwrap()`
to obtain a `&str` but `CStr` has `CStr::to_str` that does exactly that.
Introduced in PR rust-lang#30724, needs to mention that type parameter defaults
are legal in trait and type definitions too.
Responding to [a thread of discussion on the Rust
subreddit](https://www.reddit.com/r/rust/comments/3racik/mutable_lifetimes_are_too_long_when_matching_an/),
it was identified that the presence of the Entry API is not duly
publicised. This commit aims to add some reasonable examples of
common usages of this API to the main example secion of the `HashMap`
documentation.
This is part of issue rust-lang#29348.
E0210 explains about orphan rules and suggests using a local type as a
workaround. It wasn't obvious to me that I couldn't use a type
alias, so I added a note.
Also change the examples to make this more obvious. Fixesrust-lang#31129.
Fix type parameter default error to mention type and trait definitions
Introduced in PR rust-lang#30724, needs to mention that type parameter defaults
are legal in trait and type definitions too.
Documentation of `CStr::from_ptr` suggests using `str::from_utf8(slice.to_bytes()).unwrap()`
to obtain a `&str` but `CStr` has `CStr::to_str` that does exactly that.
(First PR, be nice :)
This was fixed in passing. Adding a regression test.
…ntry-api, r=steveklabnik
Responding to [a thread of discussion on the Rust subreddit](https://www.reddit.com/r/rust/comments/3racik/mutable_lifetimes_are_too_long_when_matching_an/),
it was identified that the presence of the Entry API is not duly
publicised. This commit aims to add some reasonable examples of
common usages of this API to the main example secion of the `HashMap`
documentation.
This is part of issue rust-lang#29348.
…veklabnik
I tried to add an inline `span_suggestion()` to the error as well, but since generics don't have their own span it becomes too fragile/complicated to work.
r? @steveklabnikfixesrust-lang#19477
I've been interested in the accessibility of Rustdoc's output, but never did anything about it. Today, I ran a tool, and it suggested adjusting some colors.
Here's some screen shots. Before:
![2016-01-20-114944_443x199_scrot](https://cloud.githubusercontent.com/assets/27786/12455979/d84d7ae8-bf6b-11e5-9aea-0602fb1a8cfa.png)
After:
![2016-01-20-114516_453x204_scrot](https://cloud.githubusercontent.com/assets/27786/12455841/36a55d14-bf6b-11e5-8014-239594c12e46.png)
As you can see, the link text is just a _shade_ darker.
Browsable: http://www.steveklabnik.com/rust-a11y-doc-testing/doc/std/
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @pnkfelix

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

@steveklabnik

Copy link
Copy Markdown
ContributorAuthor

@bors: r+ p=1

@bors

bors commented Jan 23, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit feb2673 has been approved by steveklabnik

@bors
bors merged commit feb2673 into rust-lang:masterJan 23, 2016
@CentrilCentril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

17 participants

@steveklabnik@rust-highfive@bors@txdv@pnkfelix@Centril@andreabedini@bluss@brson@nathankleyn@Manishearth@apasel422@tshepang@kamalmarhubi@marcbowes@mbrubeck@vessd