Commit Graph

47340 Commits

Author SHA1 Message Date
Manish Goregaokar
7be7ec300e Rollup merge of #29066 - dcarral:fix_issue_29063, r=steveklabnik
Regarding [#29063 _[Docs] Terminology inconsistency between 'iterator adapters' and 'iterator adaptors'_](https://github.com/rust-lang/rust/issues/29063) :

This PR replaces 'iterator adapters' appearances (in TRPL book) to 'iterator adaptors', thus embracing the terminology used along the API docs and achieving consistency between both sources.
2015-10-15 13:41:33 +05:30
Manish Goregaokar
677a9895a8 Rollup merge of #29062 - rgardner:rgardner-fix-book-comp-warning, r=alexcrichton
Before this commit, the first "A Rust library" code sample produced
the following compilation warning:
```
test.rs:7:22: 7:36 warning: unnecessary parentheses around `for` head
expression, #[warn(unused_parens)] on by default
test.rs:7             for _ in (0..5_000_000) {
```

This commit just removes the parens around the range 0..5_000_000 thereby removing the compilation warning.
2015-10-15 13:41:33 +05:30
Manish Goregaokar
596338b8ef Rollup merge of #29060 - tshepang:consistency, r=nikomatsakis 2015-10-15 13:41:33 +05:30
Manish Goregaokar
bcbad7ba8c Rollup merge of #29059 - tshepang:typo, r=nikomatsakis 2015-10-15 13:41:32 +05:30
Manish Goregaokar
2172d2a4ec Rollup merge of #29058 - tshepang:rename, r=steveklabnik
Shoud have been part of commit 0b13ee0ced
2015-10-15 13:41:32 +05:30
Manish Goregaokar
7d478f49f2 Rollup merge of #29047 - gkoz:doc_typo, r=steveklabnik
None
2015-10-15 13:41:32 +05:30
Manish Goregaokar
d90f8f912b Rollup merge of #29022 - apasel422:spell, r=steveklabnik
r? @steveklabnik
2015-10-15 13:41:32 +05:30
Manish Goregaokar
ad5159d52f Rollup merge of #28906 - tshepang:link, r=nikomatsakis 2015-10-15 13:41:31 +05:30
bors
fa9a421394 Auto merge of #28921 - petrochenkov:intconv, r=alexcrichton
Part of https://github.com/rust-lang/rfcs/pull/1218#issuecomment-146615171

r? @aturon
2015-10-15 07:11:33 +00:00
bors
99dc12472a Auto merge of #27017 - luqmana:25594-sysv-abi-ffi, r=bkoropoff
Fixes #25594.
2015-10-15 05:19:18 +00:00
Luqman Aden
5eb4de1a16 Update the comments for Win64 ABI in tests. 2015-10-15 01:07:22 -04:00
Luqman Aden
3c31841c72 rust_trans: struct argument over ffi were passed incorrectly in some situations on x86_64. 2015-10-15 01:06:57 -04:00
bors
785932f9d8 Auto merge of #28980 - nrc:unsafe-macros, r=@pnkfelix
This is a [breaking change].

@brson could you do a Crater run with this PR please?

Lets not land till Crater says its OK.

This was discussed at https://internals.rust-lang.org/t/does-anyone-use-the-push-pop-unsafe-macros/2702
2015-10-15 03:26:48 +00:00
Vadim Petrochenkov
6f3e84dbe9 Implement conversion traits for primitive integer types 2015-10-15 05:23:44 +03:00
Andrew Paseltiner
094f23e108 Remove unnecessary parentheses around range expressions 2015-10-14 21:43:05 -04:00
bors
eafe106ef3 Auto merge of #29012 - tari:issue-28676, r=luqmana
Fixes #28676.

There doesn't seem to be a good way to add a test for this, but I tested the repro in #28676 and confirmed it now yields the correct result.
2015-10-15 00:14:17 +00:00
Daniel Carral
6bff154b57 Replace 'adapters' to 'adaptors' in TRPL book
Regarding #29063: Replace 'iterator adapters' appearances to
'iterator adaptors', thus embracing the terminology used along the
API docs and achieving consistency between both sources.
2015-10-15 02:13:20 +02:00
Vadim Petrochenkov
704d598fac rustdoc: Report deprecation reason first 2015-10-15 01:28:38 +03:00
Tshepang Lekhonkhobe
18fa6d8dbc book: be consistent with preceding example 2015-10-15 00:19:47 +02:00
Tshepang Lekhonkhobe
5d5e62d7d8 book: fix typo 2015-10-15 00:16:13 +02:00
Tshepang Lekhonkhobe
ea37fadebb reference: 'struct' is more common that 'structure'
Shoud have been part of commit 0b13ee0ced
2015-10-15 00:09:08 +02:00
Nick Cameron
06b5a951a0 save-analysis: normalise node ids before emitting.
With this change, normalised node ids correspond to def id indices where they exist, or are made disjoint from def ids otherwise.
2015-10-15 10:58:12 +13:00
Tshepang Lekhonkhobe
0dbc2ef8a1 reference: add link to the symbols 2015-10-14 23:48:26 +02:00
Robert Gardner
c8b6c125d4 Resolve unused_parens compilation warning
Before this commit, the first "A Rust library" code sample produced
the following compilation warning:
```
test.rs:7:22: 7:36 warning: unnecessary parentheses around `for` head
expression, #[warn(unused_parens)] on by default
test.rs:7             for _ in (0..5_000_000) {
```

This commit just removes the parens around the range 0..5_000_000.
2015-10-14 17:38:56 -04:00
Peter Marheine
95721d3b13 Add test case for #28676. 2015-10-14 14:51:26 -06:00
bors
d20fe128a3 Auto merge of #29044 - Ms2ger:cleanup-log, r=alexcrichton 2015-10-14 19:54:47 +00:00
bors
56a14192e9 Auto merge of #29003 - tari:freebsd-current_exe-vec, r=alexcrichton
Fixes #28995.
2015-10-14 18:03:47 +00:00
Robin Kruppe
71dcd7f70c Reject "+" and "-" when parsing floats.
Fixes #29042
2015-10-14 19:55:59 +02:00
Jose Narvaez
00c4f06292 Manual fixups. 2015-10-14 18:43:36 +01:00
bors
18268bfd9e Auto merge of #29001 - arielb1:normalized-foreign, r=eddyb
This is needed as item types are allowed to be unnormalized.

Fixes an ICE that occurs when foreign function signatures contained
an associated type.

Fixes #28983
2015-10-14 16:12:51 +00:00
Gleb Kozyrev
b6659f54c3 Fix the link to Default trait in the prelude docs 2015-10-14 17:31:27 +03:00
bors
b28a550248 Auto merge of #28909 - GuillaumeGomez:patch-3, r=pnkfelix
r? @Manishearth
2015-10-14 13:04:53 +00:00
Ms2ger
695c9586fe Remove the unnecessary local variable in set_logger. 2015-10-14 14:17:06 +02:00
Ms2ger
b38b9e101a Use if-let rather than map() in parse_logging_spec. 2015-10-14 14:16:48 +02:00
bors
a668dd2a56 Auto merge of #28827 - thepowersgang:unsafe-const-fn-2, r=Aatch
This is the original test implementation, which works according to the tests I wrote, but might need a review.
2015-10-14 10:17:30 +00:00
bors
294ef5b158 Auto merge of #29039 - Manishearth:rollup, r=Manishearth
- Successful merges: #28991, #29004, #29006, #29013, #29016, #29024, #29027, #29028, #29029, #29032, #29035
- Failed merges:
2015-10-14 07:24:36 +00:00
Manish Goregaokar
66b58d19bd fix tidy 2015-10-14 12:52:14 +05:30
Manish Goregaokar
b330df2c6c Rollup merge of #29035 - rutsky:patch-6, r=steveklabnik
r? @steveklabnik

The link is broken here: <https://doc.rust-lang.org/std/io/#types>.

Looks like crate documentation generator uses only first paragraph of the module documentation and
so doesn't resolve the link defined below.

Probably this behaviour of the documentation generator should be considered as a bug and should be reported.
2015-10-14 12:50:58 +05:30
Manish Goregaokar
36a597c7b0 Rollup merge of #29032 - goyox86:goyox86/rusfmting-librustc_bitflags, r=alexcrichton
Hi Rustaceans!

This is the result of running latest rustfmt on librustc_bitflags!

//cc @nrc
2015-10-14 12:50:57 +05:30
Manish Goregaokar
cdd8ed26c4 Rollup merge of #29029 - steveklabnik:iter_function_docs, r=alexcrichton
Flesh the docs out with examples.
2015-10-14 12:50:57 +05:30
Manish Goregaokar
570756face Rollup merge of #29028 - Seeker14491:patch-1, r=Manishearth
Having this code section hidden is misleading because it makes it look like implementing Circle for Foo automatically makes Foo implement Shape.
2015-10-14 12:50:57 +05:30
Manish Goregaokar
30026629e7 Rollup merge of #29024 - mseri:patch-1, r=nrc
r? @nrc
2015-10-14 12:50:56 +05:30
Manish Goregaokar
3636c8bb3e Rollup merge of #29016 - sanxiyn:data-layout, r=alexcrichton 2015-10-14 12:50:56 +05:30
Manish Goregaokar
5dc2955f91 Rollup merge of #29013 - chrisccerami:fix_broken_lifetime_elision_link, r=alexcrichton
This link was added in #28842 but doesn't work at https://doc.rust-lang.org/nightly/book/lifetimes.html. What works in my markdown preview doesn't work live, and vice versa.
2015-10-14 12:50:55 +05:30
Manish Goregaokar
cdefef203b Rollup merge of #29006 - arielb1:callee-outlives-call, r=pnkfelix
This rather crucial requirement was not checked. In most cases, that
didn't cause any trouble because the argument types are required to
outlive the call and are subtypes of a subformula of the callee type.

However, binary ops are taken by ref only indirectly, without it being
marked in the argument types, which led to the argument types not being
constrained anywhere causing spurious errors (as these are basically
unconstrainable, I don't think this change can break code). Of course,
the old way was also incorrent with contravariance, but that is still
unsound for other reasons.

This also improves rustc::front to get RUST_LOG to *somewhat* work.

Fixes #28999. That issue is one of the several regression introduced by #28669.

r? @pnkfelix
2015-10-14 12:50:55 +05:30
Manish Goregaokar
8f3e05da85 Rollup merge of #29004 - frewsxcv:regression-test-22814, r=alexcrichton
Closes #22814
2015-10-14 12:50:55 +05:30
Manish Goregaokar
0e969d2889 Rollup merge of #28991 - goyox86:goyox86/rustfmting-liblog-II, r=alexcrichton
Hi Rustaceans!

This is the second version of running rustfmt on liblog https://github.com/rust-lang/rust/pull/28898. There are only rustfmt suggested changes. Because I think that some patterns here (that I fixed up in the prev PR need to be discussed in detail.

//cc @nrc
2015-10-14 12:50:54 +05:30
bors
293966694c Auto merge of #28816 - petrochenkov:unistruct, r=nrc
This patch uses the same data structures for structs and enum variants in AST and HIR. These changes in data structures lead to noticeable simplification in most of code dealing with them.
I didn't touch the top level, i.e. `ItemStruct` is still `ItemStruct` and not `ItemEnum` with one variant, like in the type checker.
As part of this patch, structures and variants get the `kind` field making distinction between "normal" structs, tuple structs and unit structs explicit instead of relying on the number of fields and presence of constructor `NodeId`. In particular, we can now distinguish empty tuple structs from unit structs, which was impossible before! Comprehensive tests for empty structs are added and some improvements to empty struct feature gates are made. Some tests don't pass due to issue https://github.com/rust-lang/rust/issues/28692 , they are still there for completeness, but are commented out.
This patch fixes issue mentioned in https://github.com/rust-lang/rust/issues/16819#issuecomment-139509861, now emptiness of tuple structs is checked after expansion.
It also touches https://github.com/rust-lang/rust/issues/28750 by providing span for visit_struct_def
cc https://github.com/rust-lang/rust/pull/28336

r? @nrc
2015-10-14 04:21:58 +00:00
bors
c0dc2cb81d Auto merge of #29026 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #28988, #28989, #28990, #28997, #29007, #29015
- Failed merges: #28906
2015-10-14 00:06:32 +00:00
Vladimir Rutsky
fda2f733c5 fix link on std::result::Result
The link is broken here: <https://doc.rust-lang.org/std/io/#types>.

Looks like crate documentation generator uses only first paragraph of the module documentation and 
so doesn't resolve the link defined below.
2015-10-14 02:17:31 +03:00