Commit Graph

49837 Commits

Author SHA1 Message Date
Tshepang Lekhonkhobe
012d68a92e doc: miscellaneous OpenOptions:append improvements 2016-01-24 07:44:55 +02:00
Dirk Gadsden
a469cef1ab Clarify when Cargo.lock is created by cargo build in the book
Also remove a "finally" in the section about building for release
to make it feel a bit friendlier.
2016-01-23 23:39:38 -05:00
Alex Burka
e1e0de86ec add [ to FOLLOW(ty) and FOLLOW(path)
Following RFC 1462 (amending 550). Closes #31135.
2016-01-23 16:37:14 -05:00
Alex Burka
276fae11ea thorough follow-set tests 2016-01-23 16:37:14 -05:00
bors
0486e12ad0 Auto merge of #31148 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #30997, #31019, #31031, #31035, #31045, #31050, #31054, #31055, #31061, #31088, #31090, #31111, #31113, #31128, #31130, #31136, #31145, #31146
- Failed merges: #30932
2016-01-23 16:21:07 +00:00
Steve Klabnik
feb2673654 Rollup merge of #31146 - angelsl:patch-1, r=steveklabnik 2016-01-23 09:38:44 -05:00
Steve Klabnik
4d99bad158 Rollup merge of #31145 - D101101:patch-1, r=steveklabnik
r? @steveklabnik
2016-01-23 09:38:44 -05:00
Steve Klabnik
b0b1df8425 Rollup merge of #31136 - mbrubeck:btree-doc, r=steveklabnik
Also change the examples to make this more obvious. Fixes #31129.
2016-01-23 09:38:44 -05:00
Steve Klabnik
9e5c8aa23f Rollup merge of #31130 - marcbowes:master, r=nrc
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.
2016-01-23 09:38:44 -05:00
Steve Klabnik
fc8ef6cae7 Rollup merge of #31128 - kamalmarhubi:book-trait-impl-clarify, r=steveklabnik 2016-01-23 09:38:44 -05:00
Steve Klabnik
c9c754990e Rollup merge of #31113 - steveklabnik:master, r=alexcrichton
r? @alexcrichton
2016-01-23 09:38:43 -05:00
Steve Klabnik
9bc29a9908 Rollup merge of #31111 - apasel422:issue-31103, r=steveklabnik
Closes #31103

r? @steveklabnik
2016-01-23 09:38:43 -05:00
Steve Klabnik
4fcefee654 Rollup merge of #31090 - tshepang:improve-sentence, r=brson 2016-01-23 09:38:43 -05:00
Steve Klabnik
9ed27a402d Rollup merge of #31088 - tshepang:grammar, r=brson 2016-01-23 09:38:43 -05:00
Steve Klabnik
b4311b70e1 Rollup merge of #31061 - brson:bib, r=steveklabnik 2016-01-23 09:38:42 -05:00
Steve Klabnik
b1e5af4872 Rollup merge of #31055 - steveklabnik:alt-tags, r=alexcrichton 2016-01-23 09:38:42 -05:00
Steve Klabnik
2581aace9c Rollup merge of #31054 - steveklabnik:a11y, r=alexcrichton
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/
2016-01-23 09:38:42 -05:00
Steve Klabnik
3f56b29715 Rollup merge of #31050 - apasel422:issue-31048, r=Manishearth
Closes #31048

r? @Manishearth
2016-01-23 09:38:42 -05:00
Steve Klabnik
82626b1ec8 Rollup merge of #31045 - Manishearth:diag-prim-shadow, r=steveklabnik
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? @steveklabnik

fixes #19477
2016-01-23 09:38:42 -05:00
Steve Klabnik
97f9e262fe Rollup merge of #31035 - nathankleyn:improve-visibility-of-entry-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 #29348.
2016-01-23 09:38:41 -05:00
Steve Klabnik
068fa97c4e Rollup merge of #31031 - brson:issue-30123, r=nikomatsakis
This was fixed in passing. Adding a regression test.
2016-01-23 09:38:41 -05:00
Steve Klabnik
03b4bf20f6 Rollup merge of #31019 - andreabedini:patch-1, r=alexcrichton
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 :)
2016-01-23 09:38:41 -05:00
Steve Klabnik
e598b43243 Rollup merge of #30997 - bluss:trait-default, r=nikomatsakis
Fix type parameter default error to mention type and trait definitions

Introduced in PR #30724, needs to mention that type parameter defaults
are legal in trait and type definitions too.
2016-01-23 09:38:41 -05:00
bors
b78b9ae7b3 Auto merge of #30997 - bluss:trait-default, r=nikomatsakis
Fix type parameter default error to mention type and trait definitions

Introduced in PR #30724, needs to mention that type parameter defaults
are legal in trait and type definitions too.
2016-01-23 14:31:26 +00:00
angelsl
ac27ec2a48 Semaphore not sempahore 2016-01-23 22:15:59 +08:00
bors
1571c690f0 Auto merge of #31121 - Manishearth:prim-link, r=alexcrichton
We currently nest `<a>` tags which is doubleplusungood. So, for example, `(u8, u8)` will show up
with the left paren linked to the tuple primitive page, and the right paren unlinked, which looks ugly.
2016-01-23 11:38:43 +00:00
Manish Goregaokar
5a26a52a54 Handle generics in raw pointers 2016-01-23 15:32:10 +05:30
bors
332e345240 Auto merge of #30958 - dhodder:master, r=brson
The COPYRIGHT file should be updated to note that Rust no longer ships with AUTHORS.txt.

    $ git log -1 -- AUTHORS.txt
    commit 402749c539
    Author: Brian Anderson <banderson@mozilla.com>
    Date:   Wed Dec 2 22:16:08 2015 +0000

        Remove AUTHORS.txt and add-authors.sh

        Keeping this file up to date requires hours of work every release,
        even with the script. It is a fool's errand and we shall not do it
        any longer.
2016-01-23 09:49:34 +00:00
Sergey Veselkov
6a6e9a987a Fix the missing line in the guessing-game.md
r? @steveklabnik
2016-01-23 12:19:11 +03:00
bors
228afd7251 Auto merge of #30807 - kolloch:patch-1, r=steveklabnik
When I read the book, the following sentence of the reference documentation helped me greatly to understand slices:

"Slices are a view into a block of memory represented as a pointer and a length."

In this commit, I tried to integrate the gist of that into the slice section inside of "primitive-types.md". I am not a native speaker, so feel very free to improve the wording.

r? @steveklabnik
2016-01-23 07:44:17 +00:00
bors
8ff48fea13 Auto merge of #31126 - arielb1:remote-errors, r=eddyb
Also removed an unused and similarly buggy error path.

Fixes #30535

r? @eddyb
2016-01-23 05:54:38 +00:00
bors
93d03edcb8 Auto merge of #31124 - dirk:dirk/display-and-error-impls-for-string-parse-error, r=alexcrichton
Fixes #31106.

- [ ] I wasn't sure of the correct `#[stable(...)]` definition to use here. Happy to fix it if it's incorrect.
- [ ] `ParseError` is sort of an ephemeral non-error, but do let me know if the implementation of `error::Error` for it should return something more descriptive than "parse error".
2016-01-23 04:04:26 +00:00
bors
d63b8e539f Auto merge of #31116 - bluss:expect-out-cold, r=alexcrichton
Use cold functions for panic formatting Option::expect, Result::unwrap, expect

These methods are marked inline, but insert a big chunk of formatting
code, as well as other error path related code, such as
deallocating a std::io::Error if you have one.

We can explicitly separate out that code path into a function that is
never inline, since the panicking case should always be rare.
2016-01-23 00:33:23 +00:00
Ali Clark
8e36b3ac4d revert an unrelated flag addition for freebsd 2016-01-22 23:41:59 +00:00
bors
c2740b6adb Auto merge of #31104 - nrc:save-fix-variant-data, r=alexcrichton 2016-01-22 22:42:33 +00:00
Matt Brubeck
f81a11b7b8 Document that BTreeMap iteration is in order
Also change the examples to make this more obvious. Fixes #31129.
2016-01-22 14:10:59 -08:00
bors
292937607d Auto merge of #31095 - alexcrichton:remove-old-files, r=brson
These are either not used at all today or they're super old and haven't been used in ages, so clean them out.
2016-01-22 20:51:38 +00:00
Marc Bowes
97f9cad569 E0210: Add a warning about type aliases
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.
2016-01-22 22:20:36 +02:00
Kamal Marhubi
a559577c2f Forward reference crates and modules chapter 2016-01-22 15:18:00 -05:00
Kamal Marhubi
9624b68207 book: Clarify that trait or type must be in same crate as impl 2016-01-22 14:37:37 -05:00
Dirk Gadsden
365deeb19a Simplify return for error::Error impl for string::ParseError 2016-01-22 14:34:39 -05:00
Ariel Ben-Yehuda
f78ce412ef astconv: don't use as_local_node_id for ids in a Def
Fixes #30535
2016-01-22 21:27:34 +02:00
Dirk Gadsden
49e27f1c5f Implement error::Error and fmt::Display for string::ParseError
Fixes #31106.
2016-01-22 14:01:29 -05:00
bors
cded89a3d1 Auto merge of #30917 - arthurprs:bs_bounds_check, r=alexcrichton
Avoid bounds checking for binary search. All calculated indexes are safe and the branch is useless.
2016-01-22 19:00:15 +00:00
Ulrik Sverdrup
257bff3192 Move cold panic functions in Option and Result
Move functions out of their impl blocks; avoids unnecessary
monomorphization by type parameters that are irrelevant to the message
output.
2016-01-22 19:07:11 +01:00
Ulrik Sverdrup
30be6a666d Use cold functions for panic formatting Option::expect, Result::unwrap etc
Option::expect, Result::unwrap, unwrap_err, expect

These methods are marked inline, but insert a big chunk of formatting
code, as well as other error path related code, such as deallocating
a std::io::Error if you have one.

We can explicitly separate out that code path into a function that is
never inline, since the panicking case should always be rare.
2016-01-22 19:06:20 +01:00
Manish Goregaokar
9a80bc8530 Correctly output links for primitive types which enclose their contents 2016-01-22 23:15:47 +05:30
bors
8f36038490 Auto merge of #31087 - nikomatsakis:incr-comp-fulfillment-cache, r=arielb1
This is a fix for #30741. It simplifies dep-graph tracking for trait matching. I was experimenting with having a greater resolution here, but decided to pare back to just have one dep node for "trait resolutions on trait `Foo`", which means that adding an impl to the trait `Foo` will invalidate all fns that had to do any trait matching at all on `Foo`. This seems like a reasonable starting place.

Independently, I realized I had neglected to record a dependency from trans on typeck -- this is obviously needed, since trans consumes a bunch of data structures that typeck produces (but which are not currently individually tracked) -- and because trans assumes that typeck has been done. Eventually those are going to go away and be replaced with MIR, which will be tracked, so this edge would presumably be derived automatically then, but it's an obvious enough thing to want for now.

r? @arielb1

cc @michaelwoerister -- this might indirectly fix the problem you observed with the trans cache, though it'd be nice to try and craft an independent test case for that.
2016-01-22 17:09:37 +00:00
arthurprs
7e5b9d7213 Avoid bounds check for slice binary search 2016-01-22 15:08:27 -02:00
Vincent Esche
2c7a19a10d Adjusted PR to better match project's coding style. 2016-01-22 17:13:17 +01:00