Commit Graph

43041 Commits

Author SHA1 Message Date
Steven Allen
f21655ec02 Allow patterns to be followed by if and in.
Needed to support:

match X {
  pattern if Y ...
}

for pattern in Y {}
2015-05-22 12:47:52 -04:00
Matej Ľach
e790db7518 better describe the stdlib 2015-05-22 16:42:57 +01:00
Manish Goregaokar
6bc5a92484 Let MultiItemDecorator take &Annotatable (fixes #25683) 2015-05-22 21:10:27 +05:30
Felix S. Klock II
deaa1172cf Remove error diagnostics uniqueness check and .json generation.
This is meant to be a temporary measure to get the builds to be
reliable again; see also Issue #25705.
2015-05-22 15:40:12 +02:00
Eduard Burtescu
5dc03a8246 Lazy-load filemaps from external crates. 2015-05-22 16:15:21 +03:00
Niko Matsakis
82ded3cd03 Two more small fixes. 2015-05-22 08:45:05 -04:00
Pascal Hertleif
94b6ddc37c Rustdoc Search: Increase Relevance of Primitives 2015-05-22 14:15:35 +02:00
Pascal Hertleif
a713867c74 Rustdoc: Clean Up Some JS
There are more possible optimizations left (cached length in loops) as
well as some possible bugs (shadowed variables) to fix. This is mostly
syntactic.
2015-05-22 14:14:28 +02:00
Geoffrey Thomas
dfacdcf25d configure: Fix printing of commands from run
The `run` function passed its argument to `msg` via `"$@"`, but `msg`
only printed its first argument. I think the intention was for `msg` to
print all its arguments. (If not, `run` should only `msg "$1"`.)
2015-05-22 00:39:24 -04:00
Geoffrey Thomas
1e180b809f configure: Clarify error message about missing dependencies
Took me a moment to figure out that the appropriate response to
"need program file" was to install the program named "file", not
to think "If I didn't need the program file, why would I be
compiling things?".
2015-05-22 00:38:49 -04:00
Sean Patrick Santos
8db699d18d Add diagnostic code for generic associated const error. 2015-05-21 21:12:49 -06:00
Matt Brubeck
54b1608b2d Document the debug_assertions cfg option 2015-05-21 16:34:26 -07:00
bors
c3d60aba6c Auto merge of #25669 - GuillaumeGomez:typo-fix, r=Manishearth
r? @steveklabnik
2015-05-21 19:41:18 +00:00
Tshepang Lekhonkhobe
5263d628b1 doc: miscellaneous improvements to std::path::Path examples 2015-05-21 21:31:38 +02:00
Guillaume Gomez
86a821e5d1 Replace "more later" by "later" 2015-05-21 20:30:15 +02:00
Tamir Duberstein
cf11c261f0 Standardize on $t:ty 2015-05-21 14:04:13 -04:00
Tamir Duberstein
3241b487fd Use Self to simplify 2015-05-21 14:01:44 -04:00
bors
7044f4a394 Auto merge of #25601 - ericye16:master, r=steveklabnik 2015-05-21 17:01:51 +00:00
Steve Klabnik
65ead717a7 she -> they in Dining Philosophers
Also, when checking for common gendered words elsewhere, I found one 'he', moved to 'they' as well.

https://github.com/rust-lang/rust/pull/25640#issuecomment-104304643
2015-05-21 11:53:45 -04:00
Niko Matsakis
df93deab10 Make various fixes:
- add feature gate
- add basic tests
- adjust parser to eliminate conflict between `const fn` and associated
constants
- allow `const fn` in traits/trait-impls, but forbid later in type check
- correct some merge conflicts
2015-05-21 11:47:30 -04:00
Eduard Burtescu
fb206bf34a rustc_trans: evaluate const fn function and method calls. 2015-05-21 11:47:30 -04:00
Eduard Burtescu
1bd420555e rustc: const-qualify const fn function and method calls. 2015-05-21 11:47:30 -04:00
Eduard Burtescu
af3795721c syntax: parse const fn for free functions and inherent methods. 2015-05-21 11:47:30 -04:00
bors
59ba55ddbd Auto merge of #25473 - doomrobo:patch-3, r=steveklabnik
Added `Deref` to the "Special Traits" section
2015-05-21 15:24:16 +00:00
bors
bc6318d2be Auto merge of #25676 - dmgawel:patch-1, r=huonw
Earlier created vector `["Hello", "world"]` has two elements and we try to add a third element.
2015-05-21 13:00:04 +00:00
dmgawel
e30c6d131f Introduction vector example elements counting fix
Earlier created vector `["Hello", "world"]` has two elements and we try to add a third element.
2015-05-21 14:30:32 +02:00
Ulrik Sverdrup
093e18d184 rustdoc: Skip types in impls in search index
For a trait *implementation* there are typedefs which are the types for
that particular trait and implementor. Skip these in the search index.

There were lots of dud items in the search index due to this (search for
Item, Iterator's associated type).

Add a boolean to clean::TypedefItem so that it tracks whether the it is
a type alias on its own, or if it's a `type` item in a trait impl.

Fixes #22442
2015-05-21 14:17:37 +02:00
bors
7bd3bbd78e Auto merge of #25552 - GuillaumeGomez:left-hand-error, r=pnkfelix
Part of #24407.
2015-05-21 10:00:04 +00:00
Björn Steinbrink
a3c4ce4444 Fix ICE trying to pass DST to C functions
Fixes #25581
2015-05-21 10:46:30 +02:00
bors
d3543099d6 Auto merge of #25671 - Manishearth:rollup, r=Manishearth
- Successful merges: #25648, #25659, #25661, #25665
- Failed merges:
2015-05-21 08:19:17 +00:00
Manish Goregaokar
06d343b691 Rollup merge of #25665 - OlegTsyba:fix_documentation, r=Gankro
fix a small typo in the official tutorial. "coerce" instead of "coerece"
r? @steveklabnik
2015-05-21 13:38:26 +05:30
Manish Goregaokar
1fb2102498 Rollup merge of #25661 - Stebalien:macro, r=Gankro
They don't have to be followed by anything.
2015-05-21 13:38:26 +05:30
Manish Goregaokar
8007eada79 Rollup merge of #25659 - tshepang:improve-rendering, r=steveklabnik 2015-05-21 13:38:26 +05:30
Manish Goregaokar
02bce96e7b Rollup merge of #25648 - semarie:head-cut, r=luqmana
the "-c" option of head isn't a posix option, and it isn't supported
under openbsd.

prefer the use of cut -c 1-8 (which is posix) to extract the first 8
chars.

r? @alexcrichton
2015-05-21 13:38:26 +05:30
bors
4423748eb8 Auto merge of #25656 - tshepang:spell-em-out, r=brson 2015-05-21 05:37:01 +00:00
bors
d7e4d6351e Auto merge of #25644 - iven:fix_doc_warning, r=steveklabnik
The syntax with tailing semicolon is deprecated and the compiler will
complain about it.

r? @steveklabnik
2015-05-21 04:02:10 +00:00
bors
00b89831a9 Auto merge of #25631 - taiyaeisforks:master, r=steveklabnik
Saw one, decided to fix a few more :) Had to Google supercede because it looked funny, turns out it's a really common misspelling!
2015-05-21 02:26:46 +00:00
Brian Campbell
945c50d974 Fix stability and deprecation markers on soft_link and symlink
The change to split up soft_link to OS-specific symlink, symlink_file,
and symlink_dir didn't actually land in 1.0.0.  Update the stability and
deprecation attributes to correctly indicate that these changes happend
in 1.1.0.
2015-05-20 21:59:21 -04:00
bors
9ee4eadb6f Auto merge of #25612 - petrochenkov:lintabs, r=@alexcrichton
Reported here https://github.com/rust-lang/rust/pull/25441#issuecomment-103513930
2015-05-21 00:52:27 +00:00
OlegTsyba
c5c508621d Fix the typo in The Rust Programming Language book, 5.18. Strings 2015-05-21 01:40:23 +03:00
bors
c575885e25 Auto merge of #25625 - bluss:doc-slice-order, r=Gankro
collections: Reorder slice methods to improve API docs

We have an evolutionary history whose traces are still visible in the
slice docs today.

Some heuristics:

* Group method and method_mut together
* Group method and method_by together
* Group by use case, here we have roughly:

  Basic interrogators (len)
  Mutation (swap)
  Iterators (iter)
  Segmentation (split)
  Searching (contains)
  Permutations (permutations)
  Misc (clone_from_slice)
2015-05-20 22:16:54 +00:00
Guillaume Gomez
db9b435749 Typo fix on E0067 2015-05-20 23:46:37 +02:00
Steven Allen
74fadfaeea Change "must" to "may only" in macro future proofing rules.
They don't have to be followed by anything.
2015-05-20 17:19:57 -04:00
Tshepang Lekhonkhobe
b55f0497db doc: that did not render well, so make it fit in one line 2015-05-20 23:09:49 +02:00
bors
82dc34a762 Auto merge of #25652 - arielb1:free-self, r=nikomatsakis
This is needed because `Self` can be substituted to a type with
lifetime parameters.

Fixes #24308
Fixes #25071
Fixes #25259
Fixes #25279
2015-05-20 20:42:22 +00:00
Tshepang Lekhonkhobe
edb21189e2 doc: 'reader' and 'writer' are nicer to read than 'r' and 'w' 2015-05-20 22:02:46 +02:00
Ariel Ben-Yehuda
7b1e8446d1 Substitute free lifetimes when Self is used within a method body
This is needed because `Self` can be substituted to a type with
lifetime parameters.

Fixes #24308
Fixes #25071
Fixes #25259
Fixes #25279
2015-05-20 21:23:41 +03:00
bors
d7185dcff1 Auto merge of #25571 - hirschenberger:master, r=nrc
It is hard to find the actual unstable feature which caused the error when using a list of stable and unstable features as the span marks the whole line

```
src/k8055.rs:22:1: 22:64 error: unstable feature
src/k8055.rs:22 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

This PR spawns an error for each unstable feature in the list:

```
est.rs:1:12: 1:26 error: unstable feature [-D unstable-features]
test.rs:1 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                     ^~~~~~~~~~~~~~
test.rs:1:28: 1:41 error: unstable feature [-D unstable-features]
test.rs:1 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                                     ^~~~~~~~~~~~~
test.rs:1:43: 1:47 error: unstable feature [-D unstable-features]
test.rs:1 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                                                    ^~~~
test.rs:1:49: 1:56 error: unstable feature [-D unstable-features]
test.rs:1 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                                                          ^~~~~~~
test.rs:1:58: 1:62 error: unstable feature [-D unstable-features]
test.rs:1 #![feature(slice_patterns, rustc_private, core, convert, libc)]
                                                                   ^~~~
```
2015-05-20 18:08:40 +00:00
Guillaume Gomez
c795406e19 Add error explanation for E0070 2015-05-20 18:53:02 +02:00
bors
cfceecafc6 Auto merge of #25390 - eddyb:typeck-pub, r=nrc
Needed for driving parts of type-checking manually.
2015-05-20 15:32:58 +00:00