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

Rollup of 10 pull requests #25340

Merged
merged 44 commits into from
May 13, 2015
Merged

Rollup of 10 pull requests #25340

merged 44 commits into from
May 13, 2015

Conversation

tbelaire and others added 30 commits April 25, 2015 14:09
This isn't quite right, but it's interesting.
Still compiling, but I think I have it!
I don't this we need to print the definition of the
imported value too, though it's quite possible.
Corrected "Ownership":

- [`Variable bindings`] link was not processed properly.
- Changed the paragraph about move semantics with two vectors, because it was confusing.
- Removed "So it may not be as inefficient as it initially seems", because there is nothing that seems inefficient in copying pointers only.
- Other text corrections.

Fixed copied-and-pasted text mistakes.

Revised the paragraph about moving a vector (taking into account suggestions by echochamber).

Fixed markdown.

Fixes requested by steveklabnik.

Brought back a sentence about supposed inefficiency.
core::slice was originally written to tolerate overflow (notably, with
slices of zero-sized elements), but it was never updated to use wrapping
arithmetic when overflow traps were added.

Also correctly handle the case of calling .nth() on an Iter with a
zero-sized element type. The iterator was assuming that the pointer
value of the returned reference was meaningful, but that's not true for
zero-sized elements.

Fixes rust-lang#25016.
The previous assumptions were not valid for slices of zero-sized
elements.
core::slice::Iter.ptr can be null when iterating a slice of zero-sized
elements, but the pointer value used for the slice itself cannot. Handle
this case by always returning a dummy pointer for slices of zero-sized
elements.
`if` can be a statement or also an expression.
…ake it clear that it only populates inherent impls.
This isn't quite right, but it's interesting.
The loop to load all the known impls from external crates seems to have been used because `ty::populate_implementations_for_trait_if_necessary` wasn't doing its job, and solely relying on it resulted in loading only impls in the same crate as the trait.

Coherence for `librustc` was reduced from 18.310s to 0.610s, from stage1 to stage2.
Interestingly, type checking also went from 46.232s to 42.003s, though that could be noise or unrelated improvements.

On a smaller scale, `fn main() {}` now spends 0.003s in coherence instead of 0.368s, which fixes rust-lang#22068.
It also peaks at only 1.2MB, instead of 16MB of heap usage.
These two traits are commonly confused. As such, explain the difference.

Fixes rust-lang#24163

r? @aturon
…bnik

I corrected some pretty obvious textual mistakes. One thing requires more attention - the paragraph at line 133 in Ownership. It was confusing, so I changed it, but I am no sure if this is what the author had in mind.
Add diagnostic message for E0317, E0154, E0259 and E0260; part of rust-lang#24407.

About E0317, I was unsure if I should add an example of what could be wrong, such as `struct i64`, `enum char { A, B }` or `type isize = i64`. I decided against it, since the diagnostic message looks clear enough to me.

What do you think?
`if` can be a statement or also an expression.
…anishearth

At the moment, http://doc.rust-lang.org/error-index.html isn't linked to from anywhere (except Reddit). This should allow search engines to find error codes!

I also capitalised "The Standard Library" and neatened a few bits of grammar.

Also fixed: `#[main]` inside one of the error descriptions.
…anual, r=steveklabnik

I did a read through of the manual. This commit corrects various small points and expands some sections, while avoiding too much detail.

r? @steveklabnik
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

@Manishearth
Copy link
Member Author

@bors: r+ p=10

@bors
Copy link
Contributor

bors commented May 12, 2015

📌 Commit 2581565 has been approved by Manishearth

@bors
Copy link
Contributor

bors commented May 12, 2015

⌛ Testing commit 2581565 with merge c2b30b8...

bors added a commit that referenced this pull request May 12, 2015
@bors
Copy link
Contributor

bors commented May 12, 2015

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

@steveklabnik
Copy link
Member

@bors: retry force

@bors
Copy link
Contributor

bors commented May 12, 2015

@bors
Copy link
Contributor

bors commented May 12, 2015

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

@steveklabnik
Copy link
Member

@bors: retry force

@steveklabnik
Copy link
Member

@bors: retry

@steveklabnik
Copy link
Member

@bors: force

@bors
Copy link
Contributor

bors commented May 12, 2015

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.