Commit graph

48829 commits

Author SHA1 Message Date
Vadim Petrochenkov e3da2a9003 Improve OwnedSlice and use it in HIR 2015-12-19 04:20:11 +03:00
bors 29ea4eef9f Auto merge of #30374 - durka:issue-30371, r=alexcrichton
Fixes #30371.
2015-12-18 17:06:19 +00:00
bors 3391630778 Auto merge of #30457 - Manishearth:rollup, r=Manishearth
- Successful merges: #30272, #30286, #30365, #30381, #30384, #30398, #30406, #30408, #30420, #30431, #30447, #30452
- Failed merges:
2015-12-18 15:17:29 +00:00
Manish Goregaokar a8e424685c Rollup merge of #30452 - dotdash:24876_take_2, r=alexcrichton
LLVM doesn't really support reusing the same module to emit more than
one file. One bug this causes is that the IR is invalidated by the stack
coloring pass when emitting the first file, and then the IR verifier
complains by the time we try to emit the second file. Also, we get
different binaries with --emit=asm,link than with just --emit=link. In
some cases leading to segfaults.

Unfortunately, it seems that at this point in time, the most sensible
option to circumvent this problem is to just clone the whole llvm module
for the asm output if we need both, asm and obj file output.

Fixes #24876
Fixes #26235
2015-12-18 20:02:14 +05:30
Manish Goregaokar 4f8b32c96f Rollup merge of #30447 - Xmasreturns:Docu, r=steveklabnik
Added sentences for description of code and changed x in the example to an int
2015-12-18 20:02:14 +05:30
Manish Goregaokar e9166766bd Rollup merge of #30431 - mmcco:cleanup, r=alexcrichton
Remove a needless variable and simply a cfg().
2015-12-18 20:02:13 +05:30
Manish Goregaokar 9e953df6f0 Rollup merge of #30420 - petrochenkov:owned2, r=nrc
Part of https://github.com/rust-lang/rust/pull/30095 not causing mysterious segfaults.

r? @nrc
2015-12-18 20:02:12 +05:30
bors de62f9d885 Auto merge of #30286 - oli-obk:const_error_span, r=nikomatsakis
previously the error was erased and a `non-const path` error was emitted at the location of the field access instead of at the overflow location (as can be seen in the playground: http://is.gd/EuAF5F )
2015-12-18 12:23:54 +00:00
Manish Goregaokar 158a1bdd7d Rollup merge of #30406 - durka:patch-13, r=sanxiyn
The previous example had no chance of compiling in either form, due to the restrictive follow set for `ty`. This one has the desired behavior: http://is.gd/kYdw4g (well, I don't exactly desire this behavior at all, but it's true at least :p )
2015-12-18 16:47:38 +05:30
Manish Goregaokar 7eb7bc2e04 Rollup merge of #30398 - jwworth:pull-request-1450205451, r=sanxiyn
This fixes a double word typo, 'the'.
2015-12-18 16:47:38 +05:30
Manish Goregaokar c2902965cb Rollup merge of #30384 - nrc:diagnostics, r=@nikomatsakis
Should make it possible to add JSON or HTML errors. Also tidies up a lot.
2015-12-18 16:47:37 +05:30
Manish Goregaokar cb319fc84f Rollup merge of #30286 - oli-obk:const_error_span, r=nikomatsakis
previously the error was erased and a `non-const path` error was emitted at the location of the field access instead of at the overflow location (as can be seen in the playground: http://is.gd/EuAF5F )
2015-12-18 15:56:39 +05:30
bors f963eb2870 Auto merge of #30272 - tshepang:doc-drain, r=bluss
Second sentence actually repeats info from first sentence. "from start to end" also feels like it adds nothing.

I also extended Vec::drain example.
2015-12-18 05:05:09 +00:00
Björn Steinbrink 88ffb26cf5 Fix emitting asm and object file output at the same time
LLVM doesn't really support reusing the same module to emit more than
one file. One bug this causes is that the IR is invalidated by the stack
coloring pass when emitting the first file, and then the IR verifier
complains by the time we try to emit the second file. Also, we get
different binaries with --emit=asm,link than with just --emit=link. In
some cases leading to segfaults.

Unfortunately, it seems that at this point in time, the most sensible
option to circumvent this problem is to just clone the whole llvm module
for the asm output if we need both, asm and obj file output.

Fixes #24876
Fixes #26235
2015-12-18 04:14:52 +01:00
bors 27d551142f Auto merge of #30414 - alexcrichton:fix-cross-builds, r=brson
It looks like #27937 accidentally switched the llvmdeps file from the target to
the host by accident, so be sure to use the right llvmdeps file which is built
for the target when building rustc_llvm
2015-12-18 03:05:02 +00:00
bors 4eadabd9f8 Auto merge of #29907 - nagisa:mir-moar-constants, r=nikomatsakis
Still will not translate references to items like `X` or `Y::V` where

```
struct X;
enum Y { V }
```

but I must go work on university things so I’m PRing what I have.

r? @nikomatsakis
2015-12-18 00:24:05 +00:00
Xmasreturns 2a23e4a5b0 Clarified shadowing example
Added some additional descriptive sentences and changed x to an int in
the example
2015-12-17 14:31:31 -08:00
Vadim Petrochenkov 6c87b19158 Abstract away differences between Vec and ptr::P in HIR 2015-12-18 00:52:56 +03:00
Vadim Petrochenkov 0d298f9904 Deprecate name OwnedSlice and don't use it 2015-12-18 00:52:56 +03:00
Vadim Petrochenkov 09d4a436a7 libsyntax: Merge OwnedSlice into ptr::P 2015-12-18 00:51:10 +03:00
bors 48700be9cb Auto merge of #30445 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #30370, #30404, #30415, #30419, #30428, #30437, #30439, #30441, #30442, #30443
- Failed merges:
2015-12-17 20:08:48 +00:00
Steve Klabnik 7ad8fb9f3c Rollup merge of #30443 - tshepang:just-a-rename, r=steveklabnik 2015-12-17 14:47:14 -05:00
Steve Klabnik b3bf43cdb5 Rollup merge of #30442 - tshepang:typo, r=steveklabnik 2015-12-17 14:47:14 -05:00
Steve Klabnik e42f97dae3 Rollup merge of #30441 - tshepang:missing-comma, r=steveklabnik 2015-12-17 14:47:14 -05:00
Steve Klabnik 8cd237427c Rollup merge of #30439 - swooster:swooster-nomicon-patch-1, r=steveklabnik
The Rustonomicon's Lifetimes chapter uses the idiom "big ask", which is obscure compared to "tall order" (check [Google ngrams](https://books.google.com/ngrams/graph?content=big+ask%2C+tall+order&year_start=1800)). Also, it's easily mistaken for a typo; either "a big task" or "a big thing to ask" could plausibly work there.

r? @steveklabnik
2015-12-17 14:47:14 -05:00
Steve Klabnik 6565bc2fd4 Rollup merge of #30437 - tshepang:clarity, r=steveklabnik
The comma removes the sorface ambiguity
2015-12-17 14:47:13 -05:00
Steve Klabnik b84de0c083 Rollup merge of #30428 - steveklabnik:quickfix, r=apasel422 2015-12-17 14:47:13 -05:00
Steve Klabnik 6c065b65c9 Rollup merge of #30419 - shepmaster:rogue-I, r=alexcrichton
r? @steveklabnik
2015-12-17 14:47:13 -05:00
Steve Klabnik 7fa08d5d7a Rollup merge of #30415 - steveklabnik:remove_bad_stability_note, r=alexcrichton 2015-12-17 14:47:13 -05:00
Steve Klabnik 7963529b6b Rollup merge of #30404 - Shiney:ImprovedStackHeap, r=steveklabnik
…entation clearer

I could not use colors as suggested for #29854 because Github doesn't support these in markdown, however this solution may be better for color-blind readers.
2015-12-17 14:47:13 -05:00
Steve Klabnik dbec8c4624 Rollup merge of #30370 - zachreizner:patch-1, r=apasel422 2015-12-17 14:47:12 -05:00
Tshepang Lekhonkhobe 46e229661d doc: improve drain examples and remove secondary info from leading paragraph 2015-12-17 21:34:18 +02:00
Tshepang Lekhonkhobe e9c912a965 doc: no need to duplicate docs on renamed API 2015-12-17 21:10:57 +02:00
Simonas Kazlauskas 7dd95799c2 Test generic methods 2015-12-17 21:00:27 +02:00
Tshepang Lekhonkhobe bd4aa64f31 doc: fix typo 2015-12-17 20:57:14 +02:00
Tshepang Lekhonkhobe 6fdde01368 doc: add a missing comma 2015-12-17 20:55:20 +02:00
bors 6734dccc31 Auto merge of #30325 - jseyfried:fixes_30078, r=nrc
This fixes a bug in which unused imports can get wrongly marked as used when checking for unused qualifications in `resolve_path` (issue #30078), and it removes unused imports that were previously undetected because of the bug.
2015-12-17 18:21:25 +00:00
Steve Wooster fc862182c9 Change "big ask" to "tall order" in Rustonomicon.
The Rustonomicon's Lifetimes chapter uses the idiom "big ask", which is obscure compared to "tall order" (check Google ngrams). Also, it's easily mistaken for a typo; either "a big task" or "a big thing to ask" could plausibly work there.
2015-12-17 09:40:02 -08:00
Tshepang Lekhonkhobe 22b30fad96 doc: improve clarity by introducing a pause 2015-12-17 19:35:10 +02:00
Jeffrey Seyfried ba20a862d4 rustc_resolve: fix a bug in which unused imports can get wrongly marked as used when checking for unused qualifications in resolve_path (fixes #30078) 2015-12-17 05:43:44 +00:00
Jeffrey Seyfried 8364a6feef Remove unused imports 2015-12-17 05:43:27 +00:00
Michael McConville ccb218616b Trivial cleanup
Remove a needless variable and simply a cfg().
2015-12-17 00:36:31 -05:00
Steve Klabnik 4e2ec9a178 small fix to str doc example 2015-12-16 22:12:47 -05:00
bors 9687a8a969 Auto merge of #30354 - petrochenkov:defuse, r=sanxiyn
A relic of some old resolution algorithm?
2015-12-17 01:22:53 +00:00
bors 4af4278814 Auto merge of #30341 - pnkfelix:call-site-scope, r=nikomatsakis
Ensure borrows of fn/closure params do not outlive invocations.

Does this by adding a new CallSiteScope to the region (or rather code extent) hierarchy, which outlives even the ParameterScope (which in turn outlives the DestructionScope of a fn/closure's body).

Fix #29793

r? @nikomatsakis
2015-12-16 22:53:19 +00:00
Nick Cameron ff0c74f7d4 test errors 2015-12-17 10:00:16 +13:00
Shiney 62fa40f87a Used bold and italic in the markdown to make the stack and heap documentation clearer 2015-12-16 20:54:02 +00:00
Nick Cameron e2371518c4 A little more refactoring inside emitter.rs 2015-12-17 09:35:51 +13:00
Nick Cameron 7a0334944b Add the files I fogot about earlier
d'oh
2015-12-17 09:35:51 +13:00
Nick Cameron a478811822 Move a bunch of stuff from Session to syntax::errors
The intention here is that Session is a very thin wrapper over the error handling infra.
2015-12-17 09:35:51 +13:00