Commit Graph

43231 Commits

Author SHA1 Message Date
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
bors
cec980a1a7 Auto merge of #25645 - luqmana:lnr, r=eddyb
This micro-optimization actually led to generating broken IR in certain cases.

Fixes #18845.
Fixes #25497.
2015-05-20 13:58:10 +00:00
bors
bacd8bc4b7 Auto merge of #25615 - petrochenkov:issue25542, r=alexcrichton
Closes https://github.com/rust-lang/rust/issues/25542

r? @alexcrichton
2015-05-20 12:22:34 +00:00
Sébastien Marie
0cac79181b use posix command to extract first 8 chars
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.
2015-05-20 13:54:14 +02:00
bors
541fe5faf8 Auto merge of #25610 - mbrubeck:bufread-docs, r=alexcrichton
r? @steveklabnik
2015-05-20 10:47:44 +00:00
Ulrik Sverdrup
77dcaa5c58 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 12:27:09 +02:00
petrochenkov
7b1916d253 Fix panic in lint for out of range literals 2015-05-20 13:03:18 +03:00
bors
749cb1931f Auto merge of #25596 - Ms2ger:rbml-docs, r=alexcrichton
This leads to more idiomatic code in the callers.
2015-05-20 09:13:28 +00:00
Luqman Aden
54dbd0baad librustc_trans: Remove misoptimization in treating derefs of Box as rvalues. 2015-05-20 05:07:27 -04:00
Iven Hsu
2ca3dfd4ac
trpl: Remove tailing semicolon of an inner attribute
The syntax with tailing semicolon is deprecated and the compiler will
complain about it.
2015-05-20 16:55:38 +08:00
bors
6d718f236d Auto merge of #25595 - dotdash:issue25549, r=eddyb
When taking the address of an unsized field we generate a rvalue datum
for the field and then convert it to an lvalue datum. At that point,
cleanup is scheduled for the field, leading to multiple drop calls.

The problem is that we generate an rvalue datum for the field, since the
pointer does not own the data and there's already cleanup scheduled
elsewhere by the true owner. Instead, an lvalue datum must be created.

Thanks to @eddyb for identifying the underlying cause and suggesting the
correct fix.

Fixes #25549.
2015-05-20 07:38:45 +00:00
bors
720735b943 Auto merge of #25588 - bluss:doc-string-from, r=alexcrichton
Use stable code in doc examples (libcollections)

Main task is to change from String::from_str to String::from in examples for String
(the latter constructor is stable). While I'm at it, also remove redundant feature flags,
fix some other instances of unstable code in examples (in examples for stable
methods), and remove some use of usize in examples too.
2015-05-20 06:03:58 +00:00