Commit Graph

48905 Commits

Author SHA1 Message Date
Ulrik Sverdrup
2a30f0ea41 nomicon: Mention contravariance 2015-12-12 06:14:06 +01:00
Jake Goulding
b8366b171a Correct reference to Box<Any> in Any docs 2015-12-11 18:44:11 -05:00
Robin Kruppe
c4230ea50c dec2flt: Remove unused macro argument
The argument was a remnant of an earlier, needlessly complicated implementation.
2015-12-12 00:10:15 +01:00
Robin Kruppe
2863a8ba7a dec2flt: Simplify imports and module surface
The import has been unnecessarily complicated since ParseFloatError::Invalid is not longer used unqualified.
The pfe_* functions do not need to be public any more since the only other use site, from_str_radix for floats, has been removed.
2015-12-12 00:07:42 +01:00
Robin Kruppe
6d87929bcb Remove an accent in a comment 2015-12-12 00:06:05 +01:00
Jeffrey Seyfried
de0de61dd4 Partially undo the fix of issue #30159 in PR #30294 to avoid breakage. 2015-12-11 21:21:13 +00:00
Brian Bowman
73615f7f8a Fix MIN, MAX links
The `MIN` link was broken. Reverts #29624.
2015-12-11 15:00:54 -06:00
Ori Avtalion
d01ec6ccca Add missing links to str docs 2015-12-11 22:52:28 +02:00
Manish Goregaokar
8bfdd993d0 Remove leftover debugging code (fixes #30336) 2015-12-11 15:12:50 -05:00
Dave Huseby
0c491e86f0 Fixes #30333 by removing the -arch i386 form the right spot 2015-12-11 10:53:04 -08:00
Ulrik Sverdrup
a0101624ad nomicon: Fix variance in example
&'b mut B was described incorrectly (just in this example, is correct in
the actual text).
2015-12-11 18:24:10 +01:00
Ori Avtalion
bb3360adde book: Add missing punctuation 2015-12-11 18:18:13 +02:00
Seo Sanghyeon
87405751ae Include type name in symbol for methods 2015-12-12 00:01:08 +09:00
Matt Brubeck
5b9dd6a016 Document bounds checking in the book 2015-12-11 06:18:18 -08:00
w00ns
43725dcb39 Fix for issue #27889: same field names in enum variants 2015-12-11 14:45:07 +01:00
bors
89ec45ced4 Auto merge of #30308 - tsion:typo, r=sanxiyn
r? @steveklabnik
2015-12-11 09:56:51 +00:00
Seo Sanghyeon
ecf2c25959 Do not include generics in suggestion to qualify enum variants 2015-12-11 17:43:04 +09:00
bors
81dd3824ff Auto merge of #30265 - oli-obk:const_val_trans, r=pnkfelix
r? @nagisa

I'm going to need the `ConstVal` -> `ValueRef` translation to start removing trans/consts piece by piece. If you need anything implemented in the translation, feel free to assign an issue to me.
2015-12-11 08:12:41 +00:00
Nick Cameron
18b4fe0e3e Make name resolution errors non-fatal 2015-12-11 21:00:15 +13:00
bors
01e5c48656 Auto merge of #30248 - petevine:master, r=brson
Running `/usr/bin/time -v make` to build rust (using local llvm) shows the maximum memory usage at 715 megabytes on 32-bit x86 (on arm linux it's even less @ 580M).

Reworded according to @brson's [input](https://github.com/rust-lang/rust/pull/30196#issuecomment-162088921).
2015-12-11 06:29:06 +00:00
bors
672a3d93e3 Auto merge of #30294 - jseyfried:fix_shadowed_use_visibility, r=nrc
This fixes a bug in which the visibility of a use declaration defining a name in one namespace (e.g. the value namespace) is overridden by a later use declaration defining the same name in the other namespace (e.g. the type namespace). For example,
```rust
fn f() {}
pub mod bar {}

mod foo {
    use f; // This import should not be visible outside `foo`,
    pub use bar as f; // but it visible outside of `foo` because of this import.
}

fn main() { foo::f(); }
```
As the example demonstrates, this is a [breaking-change], but it looks unlikely to cause breakage in practice, and any breakage can be fixed by correcting visibility modifiers.
2015-12-11 04:27:53 +00:00
bors
ae5d09551e Auto merge of #30307 - pnkfelix:fix-issue-26656, r=alexcrichton
Long awaited regression test for dropck on trait object method.

Fix #26656.
2015-12-11 02:44:21 +00:00
Jeffrey Seyfried
ada87fae5f Rename (Ns)ImportResolution 2015-12-11 01:38:13 +00:00
bors
7ce713961c Auto merge of #30301 - michaelwoerister:mir-to-metadata2, r=nikomatsakis
This PR makes `Mir` `RustcEncodable` and `RustcDecodable` and stores it in crate metadata for inlinable items.

Some other things in here:
- `mir::visit::Visitor` is extended to also visit `Literals`, `Spans` and `DefIds`.
- It also adds `mir::visit::MutVisitor` which allows to mutate the visited `Mir` structure in place.
- Some numbers on how big MIR is in metadata (total metadata size in bytes):

|                | w/ MIR     | w/o MIR     | Rel. Size |
|----------------|-----------:|------------:|:---------:|
| libcore        | 17,695,473 |  14,263,377 |  124%     |
| liblibc        | 411,440   |  404,382    | 102%      |
| libcollections |  4,537,975 |   3,526,933 |   129%    |
| libserialize   |  2,574,769 |   2,060,798 |   125%    |
| libsyntax      | 15,262,894 |  12,075,574 |  126%     |
| librustc       | 16,984,537 |  13,692,168 |  124%     |

So, adding MIR to metadata makes it about 25% bigger. It could be worse, considering that it still uses the inefficient RBML encoding. Still, the question is whether we should put MIR emission behind a `-Z` flag.
2015-12-11 00:59:48 +00:00
Florian Hahn
15743919dc Add name of initializer to missing field message, closes #30299 2015-12-11 00:25:08 +01:00
bors
0d3684063b Auto merge of #30148 - steveklabnik:doc_string, r=alexcrichton
Part of #29376
2015-12-10 23:18:07 +00:00
Sean McArthur
025f97a1de std: improve io error descriptions 2015-12-10 14:25:11 -08:00
Steve Klabnik
072dd6fabd Improve documentation on String's methods
Part of #29376
2015-12-10 17:04:08 -05:00
Michael Woerister
5addc31adb Make MIR encodable and store it in crate metadata. 2015-12-10 16:59:31 -05:00
Michael Woerister
8eee116cb8 Add a MIR visitor that allows to mutate the visited data 2015-12-10 16:50:33 -05:00
Michael Woerister
bd1ce30ccb Add visit_defid(), visit_span(), and visit_literal() to MIR visitor 2015-12-10 16:42:32 -05:00
Michael Woerister
70398d5ad0 MIR: Make Mir take ownership of InlineAsm values. 2015-12-10 16:39:17 -05:00
bors
611e8b447c Auto merge of #30303 - mitaa:htmldocck, r=brson
This changes the error output and behaviour to:
* not emit python backtraces
* run all checks
* include a context line per error
* move the offending line-number to the start of the line

fixes #21455
2015-12-10 21:36:08 +00:00
Michael Woerister
33d29700b3 MIR: Refactor mir::Terminator to use tuples instead of a fixed-size arrays. 2015-12-10 15:46:40 -05:00
Michael Woerister
d62de4c066 Add TupleSlice trait to rustc_data_structures. 2015-12-10 14:56:18 -05:00
bors
47cd3a4ae7 Auto merge of #30182 - alexcrichton:remove-deprecated, r=aturon
This is a standard "clean out libstd" commit which removes all 1.5-and-before
deprecated functionality as it's now all been deprecated for at least one entire
cycle.
2015-12-10 19:54:15 +00:00
Alex Crichton
453375b4d2 book: Update Tier 2 platforms
We've got lots of new automation set up in the past few months, so these
platforms are now all tier 2 as we're building artifacts and gating on them.
2015-12-10 11:50:20 -08:00
Scott Olson
96b3fc203c Correct 'bye' to 'byte' in str docs. 2015-12-10 13:49:04 -06:00
Alex Crichton
da50f7c288 std: Remove deprecated functionality from 1.5
This is a standard "clean out libstd" commit which removes all 1.5-and-before
deprecated functionality as it's now all been deprecated for at least one entire
cycle.
2015-12-10 11:47:55 -08:00
Felix S. Klock II
58c099770f Long await regression test for dropck on trait object method.
Fix #26656.
2015-12-10 19:59:20 +01:00
bors
ce132752c6 Auto merge of #30267 - alexcrichton:tls-init-oh-my, r=nikomatsakis
Due to #30228 it's not currently sound to do `*ptr = Some(value)`, so instead
use `mem::replace` which fixes the soundness hole for now.
2015-12-10 18:11:32 +00:00
mitaa
cf81e1aba8 Improve htmldocck.py error messages 2015-12-10 17:34:54 +01:00
bors
41a33852b8 Auto merge of #30298 - Letheed:docpatch, r=sanxiyn
Missing Panics tag and missing period in the documentation of `fn expect(…)` for `Option` and `Result`.
2015-12-10 16:28:53 +00:00
bors
ae1cf9815f Auto merge of #30194 - brson:relnotes, r=brson
[Rendered](https://github.com/brson/rust/blob/relnotes/RELEASES.md).

cc @aturon
2015-12-10 14:43:54 +00:00
Letheed
af4414bd30 fix missing Panics tag and missing period 2015-12-10 14:20:32 +01:00
bors
dc37e9f096 Auto merge of #30297 - oli-obk:doc/fix_intravisit, r=sanxiyn
r? @steveklabnik
2015-12-10 11:57:17 +00:00
Oliver Schneider
8e346f217a adjust documentation to mention intravisit instead of visit 2015-12-10 10:52:32 +01:00
bors
8eee0efd1f Auto merge of #30293 - steveklabnik:fixes, r=brson
I meant to double check the work in https://github.com/rust-lang/rust/issues/29429, but due to Mozlando, forgot. Here are two small fixes.

r? @brson I would like to get this backported to beta as well, sorry :( I don't generally want doc backports, but feel this is exceptional and worth it.
2015-12-10 06:38:06 +00:00
bors
ee597a8ee1 Auto merge of #30292 - Xmasreturns:patch-3, r=steveklabnik
Updated structs.md in the book
2015-12-10 04:54:03 +00:00
bors
f97e4d3342 Auto merge of #30291 - Xmasreturns:patch-2, r=steveklabnik
Updated enums.md in the book
2015-12-10 03:09:27 +00:00