Commit Graph

47357 Commits

Author SHA1 Message Date
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
Marcello Seri
1454b426f0 Revert "fixups"
This reverts commit 5b8335ede4.
2015-10-13 23:21:05 +01:00
Jose Narvaez
19a2a769a5 Rustfmt-ing librustc_bitflags. 2015-10-13 23:14:32 +01:00
Steve Klabnik
70c70b739f Document the free functions of std::iter
Flesh the docs out with examples.
2015-10-13 14:46:17 -04:00
Seeker14491
12224bec21 Unhide some code from the Traits section
Having this code section hidden is misleading because it makes it look like implementing Circle for Foo automatically makes Foo implement Shape.
2015-10-13 13:45:10 -05:00
Steve Klabnik
1537545133 Rollup merge of #29015 - dripton:master, r=alexcrichton
Just a single-character typo fix.
2015-10-13 13:09:53 -04:00
Steve Klabnik
53bec74bc5 Rollup merge of #29007 - dnwade:patch-2, r=alexcrichton
r? @steveklabnik
2015-10-13 13:09:53 -04:00
Steve Klabnik
7868fbd824 Rollup merge of #28997 - bezelga:master, r=steveklabnik
Fixing some words in the beginning of the Ownership system chapters.
2015-10-13 13:09:53 -04:00
Steve Klabnik
be76fb6410 Rollup merge of #28990 - ahmedcharles:libarena, r=nrc 2015-10-13 13:09:53 -04:00
Steve Klabnik
749e93d313 Rollup merge of #28989 - ahmedcharles:liballoc_system, r=nrc 2015-10-13 13:09:52 -04:00
Steve Klabnik
5ae9456629 Rollup merge of #28988 - ahmedcharles:liballoc_jemalloc, r=nrc 2015-10-13 13:09:52 -04:00
Guillaume Gomez
4618aada4d Add E0511 error explanation 2015-10-13 17:42:17 +02:00
Oliver Schneider
09d3adf52e implement RFC 1229
const eval errors outside of true constant enviroments are not reported anymore, but instead forwarded to a lint.
2015-10-13 17:01:03 +02:00
Marcello Seri
5b8335ede4 fixups 2015-10-13 15:12:34 +01:00
Marcello Seri
1bdf4ad8dc rustfmt libfmt_macros 2015-10-13 15:10:51 +01:00
Vadim Petrochenkov
03468330bd Some additional tests 2015-10-13 17:00:47 +03:00
Andrew Paseltiner
1162b3752c Correct spelling in docs 2015-10-13 09:44:11 -04:00
Vadim Petrochenkov
607b8c3892 Comment on the purpose(s) of NodeId in VariantData 2015-10-13 16:18:33 +03:00
Vadim Petrochenkov
46750d0409 Merge VariantData and VariantData_ 2015-10-13 15:19:27 +03:00
Vadim Petrochenkov
a5225cbe92 Fix rebase 2 2015-10-13 15:19:26 +03:00
Vadim Petrochenkov
40aa09e4c9 Merge struct fields and struct kind 2015-10-13 15:19:25 +03:00
Vadim Petrochenkov
30af54dede Dict -> Struct, StructDef -> VariantData, def -> data 2015-10-13 15:19:24 +03:00
Vadim Petrochenkov
f4e3851aa7 Fix rebase 2015-10-13 15:19:22 +03:00
Vadim Petrochenkov
b404ded15b Fix failing privacy test 2015-10-13 15:19:21 +03:00
Vadim Petrochenkov
8a12c19171 Test and gate empty structures and variants better 2015-10-13 15:19:20 +03:00
Vadim Petrochenkov
beda1f88a7 Provide span for visit_struct_def + remove some dead code 2015-10-13 15:19:19 +03:00
Vadim Petrochenkov
877c35e8a2 Remove now redundant NodeId from Variant 2015-10-13 15:19:18 +03:00
Vadim Petrochenkov
495566ee61 Decouple structure kinds from NodeIds 2015-10-13 15:19:17 +03:00
Vadim Petrochenkov
2314ab29c2 Unify structures and enum variants in HIR 2015-10-13 15:19:16 +03:00
Vadim Petrochenkov
ea47c2b6b3 Unify structures and enum variants in AST 2015-10-13 15:19:15 +03:00
Ben S
b40163beb9 Make the Metadata struct Clone
This commit adds #[derive(Clone)] to std::fs::Metadata, making that struct
cloneable. Although the exact contents of that struct differ between OSes,
they all have it contain only value types, meaning that the data can be re-used without repercussions.

It also adds #[derive(Clone)] to every type used by that struct across all
OSes, including the various Unix `stat` structs and Windows's
`WIN32_FILE_ATTRIBUTE_DATA`.
2015-10-13 13:06:00 +01:00
Jose Narvaez
82ec34332f Rustfmt-ing libarena. 2015-10-13 10:53:57 +01:00
Jose Narvaez
94946db60d Manually alligned comments. 2015-10-13 10:46:41 +01:00
Jose Narvaez
5943af31e7 Re-running updated rustfmt on liblog. 2015-10-13 10:44:09 +01:00