]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agomk/platform: support i486 and i586 target CHOST
Doug Goldstein [Mon, 16 Nov 2015 23:01:58 +0000 (17:01 -0600)]
mk/platform: support i486 and i586 target CHOST

On distros that use i486 or i586 in their CHOST, Rust will fail to build
because it is not handling i486 or i586 like i686 is handled. This
changes the match to do work for all instances of i?86 instead of just
i686. The Yocto Project still uses i586 as a target.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
8 years agoAuto merge of #29805 - norcalli:patch-1, r=steveklabnik
bors [Mon, 16 Nov 2015 17:18:21 +0000 (17:18 +0000)]
Auto merge of #29805 - norcalli:patch-1, r=steveklabnik

Fixes #29730

8 years agoAuto merge of #29830 - petrochenkov:mapdoc, r=alexcrichton
bors [Mon, 16 Nov 2015 11:08:50 +0000 (11:08 +0000)]
Auto merge of #29830 - petrochenkov:mapdoc, r=alexcrichton

r? @steveklabnik

8 years agoAuto merge of #29851 - shahn:hashset_doc_fix, r=steveklabnik
bors [Mon, 16 Nov 2015 09:22:51 +0000 (09:22 +0000)]
Auto merge of #29851 - shahn:hashset_doc_fix, r=steveklabnik

insert() returns bool, but it was wrongly stated that if the set had the
key already present, that key would be returned (this was probably
copied from the HashMap docs). Also remove a reference to the
module-level documentation, which doesn't make sense as it doesn't give
any more context.

r? @steveklabnik

8 years agoAuto merge of #29845 - wthrowe:libdir, r=alexcrichton
bors [Mon, 16 Nov 2015 07:34:05 +0000 (07:34 +0000)]
Auto merge of #29845 - wthrowe:libdir, r=alexcrichton

This should get `--libdir` working as well as it was a couple of weeks ago.  (That is, it still rewrites paths incorrectly but it no longer fails during `make install`.)

Fixes gentoo/gentoo-rust#28 and gentoo/gentoo-rust#29.

8 years agoAuto merge of #29828 - sanxiyn:check-macro, r=nrc
bors [Mon, 16 Nov 2015 05:48:35 +0000 (05:48 +0000)]
Auto merge of #29828 - sanxiyn:check-macro, r=nrc

Fix #27409.

8 years agoFix docs for HashSet::insert
Sebastian Hahn [Mon, 16 Nov 2015 05:32:58 +0000 (06:32 +0100)]
Fix docs for HashSet::insert

insert() returns bool, but it was wrongly stated that if the set had the
key already present, that key would be returned (this was probably
copied from the HashMap docs). Also remove a reference to the
module-level documentation, which doesn't make sense as it doesn't give
any more context.

8 years agoPrepare to the correct directory with --libdir
William Throwe [Sun, 15 Nov 2015 04:59:35 +0000 (23:59 -0500)]
Prepare to the correct directory with --libdir

This is to handle the case where CFG_LIBDIR is not a direct child of
CFG_PREFIX (in other words, where CFG_LIBDIR_RELATIVE has more than
one component).

8 years agoAuto merge of #29788 - mitaa:module_name, r=arielb1
bors [Sun, 15 Nov 2015 23:58:26 +0000 (23:58 +0000)]
Auto merge of #29788 - mitaa:module_name, r=arielb1

f357d55 caused a regression by retrieving item names from metadata, while previously using the last element of its absolute path (which in the case of a root module is the prefixed crate name since the stored path in metadata is empty)

fixes #28927

8 years agoAuto merge of #29387 - little-dude:rustfmt_librustc_resolve, r=nrc
bors [Sun, 15 Nov 2015 22:07:12 +0000 (22:07 +0000)]
Auto merge of #29387 - little-dude:rustfmt_librustc_resolve, r=nrc

Another rustfmt PR.
I ran rustfmt, then split the changes in multiple commits. First commit are the non-problematic changed. The others are all the little weirdness that caught my attention and could be discussed.

8 years agoAuto merge of #29836 - eefriedman:normalize-fn, r=arielb1
bors [Sun, 15 Nov 2015 20:19:57 +0000 (20:19 +0000)]
Auto merge of #29836 - eefriedman:normalize-fn, r=arielb1

Fixes #23406.
Fixes #23958.
Fixes #29832.

CC @arielb1

8 years agoAuto merge of #29209 - arielb1:exponential-evaluation, r=nmatsakis
bors [Sun, 15 Nov 2015 18:26:18 +0000 (18:26 +0000)]
Auto merge of #29209 - arielb1:exponential-evaluation, r=nmatsakis

This fixes an exponential worst-case and also provides an additional 1% perf improvement.

r? @nikomatsakis

8 years agoaddress review comments
Ariel Ben-Yehuda [Sun, 15 Nov 2015 18:11:42 +0000 (20:11 +0200)]
address review comments

8 years agofix pretty
Ariel Ben-Yehuda [Thu, 22 Oct 2015 15:25:02 +0000 (18:25 +0300)]
fix pretty

8 years agofix remaining bugs
Ariel Ben-Yehuda [Wed, 21 Oct 2015 16:01:58 +0000 (19:01 +0300)]
fix remaining bugs

8 years agoadd a global evaluation cache
Ariel Ben-Yehuda [Wed, 21 Oct 2015 11:50:38 +0000 (14:50 +0300)]
add a global evaluation cache

8 years agointroduce evaluate_obligation_conservatively and use it
Ariel Ben-Yehuda [Tue, 20 Oct 2015 16:14:05 +0000 (19:14 +0300)]
introduce evaluate_obligation_conservatively and use it

8 years agoevaluate projections outside the outer probe in recursive evaluation
Ariel Ben-Yehuda [Tue, 20 Oct 2015 15:23:46 +0000 (18:23 +0300)]
evaluate projections outside the outer probe in recursive evaluation

8 years agoput projections in RFC447 order
Ariel Ben-Yehuda [Tue, 20 Oct 2015 14:15:58 +0000 (17:15 +0300)]
put projections in RFC447 order

8 years agosimplify and reduce the size of EvaluationResult
Ariel Ben-Yehuda [Sun, 18 Oct 2015 16:15:57 +0000 (19:15 +0300)]
simplify and reduce the size of EvaluationResult

8 years agoAuto merge of #29846 - JanLikar:#29823, r=steveklabnik
bors [Sun, 15 Nov 2015 15:33:23 +0000 (15:33 +0000)]
Auto merge of #29846 - JanLikar:#29823, r=steveklabnik

Fix #29823 by further explaining `&str` and pointing out the
difference between `&str` and `&'static str`.

8 years agoFix a typo
Jan Likar [Sun, 15 Nov 2015 13:21:13 +0000 (14:21 +0100)]
Fix a typo

8 years agoImprove Strings chapter
Jan Likar [Sun, 15 Nov 2015 07:14:46 +0000 (08:14 +0100)]
Improve Strings chapter

8 years agoUpdate 'Strings' chapter of the book
Jan Likar [Sun, 15 Nov 2015 05:55:30 +0000 (06:55 +0100)]
Update 'Strings' chapter of the book

Fix #29823 by further explaining `&str` and pointing out the
difference between `&str` and `&'static str`.

8 years agoAuto merge of #29840 - gereeter:move-error-no-refcell, r=sanxiyn
bors [Sun, 15 Nov 2015 05:09:45 +0000 (05:09 +0000)]
Auto merge of #29840 - gereeter:move-error-no-refcell, r=sanxiyn

8 years agoStop using dynamic borrowing in MoveErrorCollector
Jonathan S [Sat, 14 Nov 2015 23:23:31 +0000 (17:23 -0600)]
Stop using dynamic borrowing in MoveErrorCollector

8 years agoConsistently normalize fn types after erasing lifetimes.
Eli Friedman [Sat, 14 Nov 2015 20:12:12 +0000 (12:12 -0800)]
Consistently normalize fn types after erasing lifetimes.

Fixes #23406.
Fixes #23958.
Fixes #29832.

8 years agorustfmt librustc_resolve
corentih [Mon, 26 Oct 2015 19:31:11 +0000 (20:31 +0100)]
rustfmt librustc_resolve

8 years agodocs: Clarify insertion behavior for maps
Vadim Petrochenkov [Sat, 14 Nov 2015 12:05:20 +0000 (15:05 +0300)]
docs: Clarify insertion behavior for maps

8 years agoAuto merge of #29827 - Manishearth:diag-fn-field, r=eddyb
bors [Sat, 14 Nov 2015 12:02:20 +0000 (12:02 +0000)]
Auto merge of #29827 - Manishearth:diag-fn-field, r=eddyb

Fixes #29043

8 years agoCheck macro definition and do not expand invalid macros
Seo Sanghyeon [Sat, 14 Nov 2015 10:50:46 +0000 (19:50 +0900)]
Check macro definition and do not expand invalid macros

8 years agoReindent code
Seo Sanghyeon [Sat, 14 Nov 2015 10:18:32 +0000 (19:18 +0900)]
Reindent code

8 years agoStore TokenTree in MacroRulesMacroExpander
Seo Sanghyeon [Sat, 14 Nov 2015 10:11:40 +0000 (19:11 +0900)]
Store TokenTree in MacroRulesMacroExpander

8 years agoFix diagnostics for calling indirect extern function pointer field
Manish Goregaokar [Sat, 14 Nov 2015 05:14:57 +0000 (10:44 +0530)]
Fix diagnostics for calling indirect extern function pointer field

Fixes #29043

8 years agoAuto merge of #29819 - mdinger:block-comments, r=steveklabnik
bors [Sat, 14 Nov 2015 09:55:32 +0000 (09:55 +0000)]
Auto merge of #29819 - mdinger:block-comments, r=steveklabnik

These really aren't documented well at all. The fact that doc comments end on a `*/` is really weird. I'm not sure if this is a mistake or not though.

None of the block comments are even mentioned in the [book nightly](http://doc.rust-lang.org/nightly/book/comments.html). Probably should be fixed.

8 years agoAuto merge of #29825 - KyleMayes:move-parse-panic, r=sanxiyn
bors [Sat, 14 Nov 2015 08:03:14 +0000 (08:03 +0000)]
Auto merge of #29825 - KyleMayes:move-parse-panic, r=sanxiyn

Since these functions are only used by the AST quoting syntax extensions, they should be there instead of in the parser.

8 years agoAuto merge of #29817 - michaelwoerister:mir-ty-closure-fields, r=nikomatsakis
bors [Sat, 14 Nov 2015 06:08:09 +0000 (06:08 +0000)]
Auto merge of #29817 - michaelwoerister:mir-ty-closure-fields, r=nikomatsakis

Add a missing case in LvalueTy::projection_ty() that popped up earlier today.

cc @rust-lang/compiler @nikomatsakis

8 years agoAuto merge of #29820 - wthrowe:makefile-fixes, r=brson
bors [Sat, 14 Nov 2015 04:14:22 +0000 (04:14 +0000)]
Auto merge of #29820 - wthrowe:makefile-fixes, r=brson

The first commit fixes the "jobserver unavailable" warning reported at gentoo/gentoo-rust#29.  I don't think the warning is related to the compilation failure shown there.

The remaining commits are minor fixes I noticed while investigating the jobserver warning.

8 years agoMove the panicking parse functions out of the parser
Kyle Mayes [Sat, 14 Nov 2015 03:18:59 +0000 (22:18 -0500)]
Move the panicking parse functions out of the parser

Since these functions are only used by the AST quoting syntax extensions, they should be there instead of in the parser.

8 years agoAuto merge of #29816 - nikomatsakis:incr-comp-visitor-refactor-hir-folder, r=nrc
bors [Sat, 14 Nov 2015 02:05:05 +0000 (02:05 +0000)]
Auto merge of #29816 - nikomatsakis:incr-comp-visitor-refactor-hir-folder, r=nrc

Simplify HIR folder so that it only maps 1 item to 1 item, removing a bunch of asserts. This is a small refactoring on the way to my larger branch for moving items out of line in the tree and isolating attempts to access them.

r? @nrc

8 years agosimplify HIR folder so that it only maps 1 item to 1 item,
Niko Matsakis [Fri, 13 Nov 2015 16:38:45 +0000 (11:38 -0500)]
simplify HIR folder so that it only maps 1 item to 1 item,
removing a bunch of asserts

8 years agoAuto merge of #29781 - arielb1:mir-casts, r=nikomatsakis
bors [Sat, 14 Nov 2015 00:10:28 +0000 (00:10 +0000)]
Auto merge of #29781 - arielb1:mir-casts, r=nikomatsakis

I am also planning to implement casts, but I will probably do it in a separate PR.

r? @nikomatsakis

8 years agoAuto merge of #29808 - aphistic:trait-debug-example-fix, r=steveklabnik
bors [Fri, 13 Nov 2015 22:12:51 +0000 (22:12 +0000)]
Auto merge of #29808 - aphistic:trait-debug-example-fix, r=steveklabnik

The example given for the manual implementation of the core::fmt::Debug trait doesn't match the output after the code sample. This updates it so it matches.

8 years agoaddress review comments
Ariel Ben-Yehuda [Thu, 12 Nov 2015 22:12:50 +0000 (00:12 +0200)]
address review comments

8 years agoimplement coercions in MIR
Ariel Ben-Yehuda [Wed, 11 Nov 2015 20:02:51 +0000 (22:02 +0200)]
implement coercions in MIR

8 years agoDocument block doc comments better
mdinger [Fri, 13 Nov 2015 21:06:00 +0000 (16:06 -0500)]
Document block doc comments better

8 years agorustc_mir: don't miss the autoref when doing an unsize
Ariel Ben-Yehuda [Tue, 10 Nov 2015 22:07:34 +0000 (00:07 +0200)]
rustc_mir: don't miss the autoref when doing an unsize

8 years agoimplement lvalue_len
Ariel Ben-Yehuda [Tue, 10 Nov 2015 20:26:59 +0000 (22:26 +0200)]
implement lvalue_len

no tests - sorry

8 years agorepresent fat ptr operands as 2 separate pointers
Ariel Ben-Yehuda [Tue, 10 Nov 2015 20:05:11 +0000 (22:05 +0200)]
represent fat ptr operands as 2 separate pointers

this does add some complexity, but to do otherwise would require unsized
lvalues to have their own allocas, which would be ugly.

8 years agoMIR: implement fat raw pointer comparisons
Ariel Ben-Yehuda [Mon, 9 Nov 2015 00:16:19 +0000 (02:16 +0200)]
MIR: implement fat raw pointer comparisons

The implementation itself only requires changes to trans, but
a few additional bugs concerning the handling of fat pointers
had to be fixed.

8 years agoAuto merge of #29806 - tsion:compile-state-mir_map, r=nikomatsakis
bors [Fri, 13 Nov 2015 20:18:18 +0000 (20:18 +0000)]
Auto merge of #29806 - tsion:compile-state-mir_map, r=nikomatsakis

This allows "rustc drop-in replacement" programs like https://github.com/nrc/stupid-stats to access the MIR map.

Working toy example: https://gist.github.com/tsion/288423389e32eb73bb39

r? @nikomatsakis

8 years agoRemove extra eval call in snap.mk
William Throwe [Fri, 13 Nov 2015 20:13:05 +0000 (15:13 -0500)]
Remove extra eval call in snap.mk

8 years agoClean up some "suspicious" whitespace in target.mk
William Throwe [Fri, 13 Nov 2015 20:01:07 +0000 (15:01 -0500)]
Clean up some "suspicious" whitespace in target.mk

Emacs warns that makefile lines that start with spaces followed by
tabs are "suspicious".  These were harmless since they were
continuation lines, but getting rid of the warning is nice and this
version looks better.

8 years agoEscape some variables in llvm.mk
William Throwe [Fri, 13 Nov 2015 19:54:25 +0000 (14:54 -0500)]
Escape some variables in llvm.mk

The important one is $(MAKE).  make handles recipes containing the
literal string "$(MAKE)" specially, so it is important to make sure it
isn't evaluated until recipe invocation time.

8 years agoAuto merge of #29759 - nagisa:mir-static, r=nikomatsakis
bors [Fri, 13 Nov 2015 17:10:25 +0000 (17:10 +0000)]
Auto merge of #29759 - nagisa:mir-static, r=nikomatsakis

Fixes #29578

r? @nikomatsakis

My own observations are posted inline as comments.

8 years agoMIR: Support closure up-vars in LvalueTy::projection_ty()
Michael Woerister [Fri, 13 Nov 2015 16:01:37 +0000 (17:01 +0100)]
MIR: Support closure up-vars in LvalueTy::projection_ty()

8 years agoAuto merge of #29811 - bluss:binary-heap-sift-less, r=gankro
bors [Fri, 13 Nov 2015 14:28:57 +0000 (14:28 +0000)]
Auto merge of #29811 - bluss:binary-heap-sift-less, r=gankro

BinaryHeap: Simplify sift down

Sift down was doing all too much work: it can stop directly when the
current element obeys the heap property in relation to its children.

In the old code, sift down didn't compare the element to sift down at
all, so it was maximally sifted down and relied on the sift up call to
put it in the correct location.

This should speed up heapify and .pop().

Also rename Hole::removed() to Hole::element()

8 years agoBinaryHeap: Simplify sift down
Ulrik Sverdrup [Fri, 13 Nov 2015 00:54:33 +0000 (01:54 +0100)]
BinaryHeap: Simplify sift down

Sift down was doing all too much work: it can stop directly when the
current element obeys the heap property in relation to its children.

In the old code, sift down didn't compare the element to sift down at
all, so it was maximally sifted down and relied on the sift up call to
put it in the correct location.

This should speed up heapify and .pop().

Also rename Hole::removed() to Hole::element()

8 years agoAuto merge of #29761 - eefriedman:rename-nopanic, r=sanxiyn
bors [Fri, 13 Nov 2015 10:28:25 +0000 (10:28 +0000)]
Auto merge of #29761 - eefriedman:rename-nopanic, r=sanxiyn

Just `sed s/_nopanic//g`.  Hopefully makes libsyntax a bit more
readable.

8 years agoAuto merge of #29800 - Detegr:master, r=nikomatsakis
bors [Fri, 13 Nov 2015 08:41:50 +0000 (08:41 +0000)]
Auto merge of #29800 - Detegr:master, r=nikomatsakis

Fundamental attribute was missing a feature gate test.

8 years agoStore a valid name for the root module in metadata
mitaa [Wed, 11 Nov 2015 21:10:21 +0000 (22:10 +0100)]
Store a valid name for the root module in metadata

8 years agoAuto merge of #29675 - bluss:merge-sort-fastpath, r=huonw
bors [Fri, 13 Nov 2015 01:44:58 +0000 (01:44 +0000)]
Auto merge of #29675 - bluss:merge-sort-fastpath, r=huonw

sort: Fast path for already sorted data

When merging two sorted blocks `left` and `right` if the last element in
`left` is <= the first in `right`, the blocks are already in sorted order.

Add this as an additional fast path by simply copying the whole left
block into the output and advancing the left pointer. The right block is
then treated the same way by the already present logic in the merge
loop.

Can reduce runtime of .sort() to less than 50% of the previous, if the data
was already perfectly sorted. Sorted data with a few swaps are also
sorted quicker than before. The overhead of one comparison per merge
seems to be negligible.

8 years agoAuto merge of #29807 - nrc:op_span, r=brson
bors [Thu, 12 Nov 2015 23:48:56 +0000 (23:48 +0000)]
Auto merge of #29807 - nrc:op_span, r=brson

cc @nagisa

8 years agoFix the manual implementation example for the Debug trait so it matches the given...
Erik Davidson [Thu, 12 Nov 2015 21:03:36 +0000 (15:03 -0600)]
Fix the manual implementation example for the Debug trait so it matches the given output

8 years agoFix a bad span for binops
Nick Cameron [Thu, 12 Nov 2015 20:34:41 +0000 (09:34 +1300)]
Fix a bad span for binops

8 years agoAuto merge of #29780 - KyleMayes:quote-ext, r=nrc
bors [Thu, 12 Nov 2015 20:31:12 +0000 (20:31 +0000)]
Auto merge of #29780 - KyleMayes:quote-ext, r=nrc

This is my first code contribution to Rust, so I'm sure there are some issues with the changes I've made.

I've added the `quote_arg!`, `quote_block!`, `quote_path!`, and `quote_meta_item!` quasiquoting macros. From my experience trying to build AST in compiler plugins, I would like to be able to build any AST piece with a quasiquoting macro (e.g., `quote_struct_field!` or `quote_variant!`) and then use those AST pieces in other quasiquoting macros, but this pull request just adds some of the low-hanging fruit.

I'm not sure if these additions are desirable, and I'm sure these macros can be implemented in an external crate if not.

8 years agoMake the mir_map available to the after_analysis CompileController step.
Scott Olson [Thu, 12 Nov 2015 20:18:11 +0000 (14:18 -0600)]
Make the mir_map available to the after_analysis CompileController step.

8 years agoUpdate references and borrowing (Fixes #29730)
Ashkan Kiani [Thu, 12 Nov 2015 18:35:53 +0000 (10:35 -0800)]
Update references and borrowing (Fixes #29730)

Fixes #29730

8 years agoAuto merge of #29712 - Toby-S:patch-1, r=steveklabnik
bors [Thu, 12 Nov 2015 18:00:27 +0000 (18:00 +0000)]
Auto merge of #29712 - Toby-S:patch-1, r=steveklabnik

Adds `Example` sections to the rest of the integer methods.

cc @steveklabnik

8 years agoAuto merge of #29757 - dotdash:mir_simplify_cfg, r=nikomatsakis
bors [Thu, 12 Nov 2015 15:48:34 +0000 (15:48 +0000)]
Auto merge of #29757 - dotdash:mir_simplify_cfg, r=nikomatsakis

For now, this pass does some easy transformations, like eliminating
empty blocks that just jump to another block, some trivial
conversion of If terminators into Gotos and removal of dead blocks.

r? @nikomatsakis

8 years agoAdd feature gate test for #[fundamental] attribute
Antti Keränen [Thu, 12 Nov 2015 14:03:55 +0000 (16:03 +0200)]
Add feature gate test for #[fundamental] attribute

8 years agoAdd a MIR pass to simplify the control flow graph
Björn Steinbrink [Tue, 10 Nov 2015 20:38:36 +0000 (21:38 +0100)]
Add a MIR pass to simplify the control flow graph

For now, this pass does some easy transformations, like eliminating
empty blocks that just jump to another block, some trivial
conversion of If terminators into Gotos and removal of dead blocks.

8 years agoAuto merge of #29544 - Ryman:reduce_doc_warnings, r=steveklabnik
bors [Thu, 12 Nov 2015 13:07:45 +0000 (13:07 +0000)]
Auto merge of #29544 - Ryman:reduce_doc_warnings, r=steveklabnik

Did this alphabetically, so I didn't see [how `std` was doing things](https://dxr.mozilla.org/rust/source/src/libstd/lib.rs#215) till I was nearly finished. If you prefer to add crate-level-whitelists like std instead of test-level, I can rebase with that strategy.

A number of these commits can probably be dropped as the crates don't have much to test, and are deprecated. Let me know which if any to drop! (can also squash after review if desired)

r? @steveklabnik

8 years agoAuto merge of #29770 - ollie27:assert_eq_unsized, r=alexcrichton
bors [Thu, 12 Nov 2015 10:38:48 +0000 (10:38 +0000)]
Auto merge of #29770 - ollie27:assert_eq_unsized, r=alexcrichton

`format_args!` doesn't support none Sized types so we should just pass it the references to `left_val` and `right_val`.

The following works:
```rust
assert!([1, 2, 3][..] == vec![1, 2, 3][..])
```
So I would expect this to as well:
```rust
assert_eq!([1, 2, 3][..], vec![1, 2, 3][..])
```
But it fails with "error: the trait `core::marker::Sized` is not implemented for the type `[_]` [E0277]"
I don't know if this change will have any nasty side effects I don't understand.

8 years agoAuto merge of #29795 - Manishearth:rollup, r=Manishearth
bors [Thu, 12 Nov 2015 08:02:43 +0000 (08:02 +0000)]
Auto merge of #29795 - Manishearth:rollup, r=Manishearth

- Successful merges: #29776, #29785, #29786, #29787
- Failed merges:

8 years agoFixup #29785
Manish Goregaokar [Thu, 12 Nov 2015 07:50:48 +0000 (13:20 +0530)]
Fixup #29785

8 years agoFixup #29776
Manish Goregaokar [Thu, 12 Nov 2015 07:50:16 +0000 (13:20 +0530)]
Fixup #29776

8 years agoRollup merge of #29787 - dbrgn:docs-fix, r=steveklabnik
Manish Goregaokar [Thu, 12 Nov 2015 07:48:51 +0000 (13:18 +0530)]
Rollup merge of #29787 - dbrgn:docs-fix, r=steveklabnik

Fix usage of wrong article in `Result` docs.

This is my first rust PR, if something about the process is wrong let me know.

As this is a documentation change, I believe the correct highfive line to use is the following:

r? @steveklabnik

8 years agoRollup merge of #29786 - steveklabnik:stage0fix, r=brson
Manish Goregaokar [Thu, 12 Nov 2015 07:48:51 +0000 (13:18 +0530)]
Rollup merge of #29786 - steveklabnik:stage0fix, r=brson

8 years agoRollup merge of #29785 - steveklabnik:doc_prelude, r=nikomatsakis
Manish Goregaokar [Thu, 12 Nov 2015 07:48:51 +0000 (13:18 +0530)]
Rollup merge of #29785 - steveklabnik:doc_prelude, r=nikomatsakis

This mostly brings them in line with existing linking convention, but
also has some minor re-wording.

The text at the top has been re-focused, by starting out with what the
prelude does, rather than starting from injecting std.

Also, it now mentions that other preludes exist.

Part of https://github.com/rust-lang/rust/issues/29369

8 years agoRollup merge of #29776 - nikomatsakis:mir-29740, r=nrc
Manish Goregaokar [Thu, 12 Nov 2015 07:48:51 +0000 (13:18 +0530)]
Rollup merge of #29776 - nikomatsakis:mir-29740, r=nrc

In previous PRs, I changed the match desugaring to generate more efficient code for ints/chars and the like. But this doesn't help when you're matching strings, ranges, or other crazy complex things (leading to #29740). This commit restructures match desugaring *yet again* to handle that case better -- basically we now degenerate to an if-else-if chain in such cases.

~~Note that this builds on https://github.com/rust-lang/rust/pull/29763 which will hopefully land soon. So ignore the first few commits.~~ landed now

r? @Aatch since he's been reviewing the other commits in this series

8 years agotrpl: add a small section outlining doctest configuration
Kevin Butler [Tue, 3 Nov 2015 16:42:25 +0000 (16:42 +0000)]
trpl: add a small section outlining doctest configuration

8 years agolibtest: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:37:29 +0000 (16:37 +0000)]
libtest: deny warnings in doctests

8 years agolibterm: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:35:33 +0000 (16:35 +0000)]
libterm: deny warnings in doctests

8 years agolibsyntax: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:34:11 +0000 (16:34 +0000)]
libsyntax: deny warnings in doctests

8 years agolibserialize: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:17:57 +0000 (16:17 +0000)]
libserialize: deny warnings in doctests

8 years agolibrustc_unicode: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:12:25 +0000 (16:12 +0000)]
librustc_unicode: deny warnings in doctests

8 years agolibrbml: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:06:02 +0000 (16:06 +0000)]
librbml: deny warnings in doctests

8 years agolibrand: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:04:40 +0000 (16:04 +0000)]
librand: deny warnings in doctests

8 years agoliblog: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:03:06 +0000 (16:03 +0000)]
liblog: deny warnings in doctests

8 years agolibgraphviz: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 15:33:58 +0000 (15:33 +0000)]
libgraphviz: deny warnings in doctests

8 years agolibgetopts: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 15:32:48 +0000 (15:32 +0000)]
libgetopts: deny warnings in doctests

8 years agolibfmt_macros: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 15:30:14 +0000 (15:30 +0000)]
libfmt_macros: deny warnings in doctests

8 years agolibflate: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 15:28:58 +0000 (15:28 +0000)]
libflate: deny warnings in doctests

8 years agolibcore: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 15:27:03 +0000 (15:27 +0000)]
libcore: deny warnings in doctests

8 years agolibcollections: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 14:49:33 +0000 (14:49 +0000)]
libcollections: deny warnings in doctests

8 years agolibarena: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 14:03:22 +0000 (14:03 +0000)]
libarena: deny warnings in doctests

8 years agoliballoc: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 14:02:48 +0000 (14:02 +0000)]
liballoc: deny warnings in doctests

8 years agoAuto merge of #29764 - nrc:stats, r=nikomatsakis
bors [Thu, 12 Nov 2015 04:06:48 +0000 (04:06 +0000)]
Auto merge of #29764 - nrc:stats, r=nikomatsakis

Emits loc, and node count - before and after expansion.

E.g.,

```
rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore
Lines of code:             32060
Pre-expansion node count:  120205
Post-expansion node count: 482749
```

r? @nikomatsakis

8 years agoAuto merge of #29616 - nagisa:mir-repeat, r=nikomatsakis
bors [Thu, 12 Nov 2015 02:24:06 +0000 (02:24 +0000)]
Auto merge of #29616 - nagisa:mir-repeat, r=nikomatsakis

r? @nikomatsakis

I went ahead and replaced repeat count with a `Constant`, because it cannot be non-constant to the best of my knowledge.