]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoPort a bunch of code new-visitor; all of these ports were
Niko Matsakis [Tue, 17 Nov 2015 22:51:44 +0000 (17:51 -0500)]
Port a bunch of code new-visitor; all of these ports were
straightforward uses of `visit_all_items`. In some cases I had to remove
empty `visit_item` calls that were just to suppress visiting nested
items.

8 years agoRework the `IdVisitor` so that it only visits item contents (and doesn't
Niko Matsakis [Tue, 17 Nov 2015 22:47:51 +0000 (17:47 -0500)]
Rework the `IdVisitor` so that it only visits item contents (and doesn't
visit nested items). This is what all clients wanted anyhow.

8 years agoPort the `map` construction code to use the new visitor.
Niko Matsakis [Tue, 17 Nov 2015 22:38:23 +0000 (17:38 -0500)]
Port the `map` construction code to use the new visitor.

8 years agoRefactor the HIR so that items are stored in a map in the `Crate`,
Niko Matsakis [Tue, 17 Nov 2015 22:32:12 +0000 (17:32 -0500)]
Refactor the HIR so that items are stored in a map in the `Crate`,
rather being stored inline. Refactor (and rename) the visitor so that
(by default) it only visits the interior content of an item not nested
items.

This is a [breaking-change] for anyone who uses the HIR visitor. Besides
changing `visit::` to `intravisit::`, you need to refactor your visitor
in one of two ways, depending on what it requires:

1. If you just want to visit all items (most common), you should call
   `krate.visit_all_items(&mut visitor)`.

2. If you need to visit nested items in the middle of the parent items,
   you should override `visit_nested_item` with something like:
   `self.visit_item(self.tcx.map.expect_item(item.id))`, presuming you
   have access to a tcx (or at least a HIR map).

8 years agorefactorings of `lowering` that make it more amenable to using `&mut`
Niko Matsakis [Thu, 12 Nov 2015 17:31:05 +0000 (12:31 -0500)]
refactorings of `lowering` that make it more amenable to using `&mut`
instead of `Cell` (but stop short of actualling switching to `&mut`)

8 years agorename `_lctx` to `lctx` where appropriate
Niko Matsakis [Thu, 12 Nov 2015 17:30:52 +0000 (12:30 -0500)]
rename `_lctx` to `lctx` where appropriate

8 years agoRemove seemingly pointless case -- this customized variant avoided
Niko Matsakis [Sat, 31 Oct 2015 13:24:30 +0000 (09:24 -0400)]
Remove seemingly pointless case -- this customized variant avoided
walking the patterns in a type fn decl, but those patterns are ignored
by this visitor anyway.

8 years agoAuto merge of #29878 - wthrowe:libdir2, r=brson
bors [Wed, 18 Nov 2015 21:33:34 +0000 (21:33 +0000)]
Auto merge of #29878 - wthrowe:libdir2, r=brson

Rather than modifying the installer to disable directory rewriting,
this patch modifies the directory structure passed to the installer so
that the rewriting gives the correct results.  This means that if a
non-standard --libdir is passed to configure then the same --libdir
option (relative to the --prefix) must be passed to the install
script.  In the `make install` case this is handled automatically.
Binary distributions are generally generated using the default
--libdir and then have paths optionally rewritten by the installer,
which should continue to work.

This has the advantage of not complicating the installer interface
intended for end-user use.

Fixes #29561

8 years agoAuto merge of #29083 - petrochenkov:stability3, r=alexcrichton
bors [Wed, 18 Nov 2015 19:49:33 +0000 (19:49 +0000)]
Auto merge of #29083 - petrochenkov:stability3, r=alexcrichton

What this patch does:
- Stability annotations are now based on "exported items" supplied by rustc_privacy and not "public items". Exported items are as accessible for external crates as directly public items and should be annotated with stability attributes.
- Trait impls require annotations now.
- Reexports require annotations now.
- Crates themselves didn't require annotations, now they do.
- Exported macros are annotated now, but these annotations are not used yet.
- Some useless annotations are detected and result in errors
- Finally, some small bugs are fixed - deprecation propagates from stable deprecated parents, items in blocks are traversed correctly (fixes https://github.com/rust-lang/rust/issues/29034) + some code cleanup.

8 years agoFix buildbot failures
Vadim Petrochenkov [Wed, 18 Nov 2015 18:16:20 +0000 (21:16 +0300)]
Fix buildbot failures

8 years agoAuto merge of #29886 - michaelwoerister:mir-erase-regions, r=nikomatsakis
bors [Wed, 18 Nov 2015 18:06:30 +0000 (18:06 +0000)]
Auto merge of #29886 - michaelwoerister:mir-erase-regions, r=nikomatsakis

This change adds a `MirPass` erasing all early-bound regions from MIR, right before storing it in the MIR map. I've added some assertions at neuralgic points in `trans::mir` doing cheap checks whether region have actually been erased.

Here are some assumptions that I worked under:
- AdtDef references stay untouched. It's the `Substs` accompanying them that need to be handled (e.g. in `AggregateKind::Adt`).
- We can't really get rid of late-bound regions at this point because there is no version `BareFnTy` (for example) that comes without one. These still have to be handled on demand in trans.

Are this assumptions right?

r? @nikomatsakis

8 years agoMIR: Add pass that erases all regions right before trans
Michael Woerister [Mon, 16 Nov 2015 17:41:16 +0000 (18:41 +0100)]
MIR: Add pass that erases all regions right before trans

8 years agoAuto merge of #29906 - ranma42:doc-typo, r=steveklabnik
bors [Wed, 18 Nov 2015 15:54:28 +0000 (15:54 +0000)]
Auto merge of #29906 - ranma42:doc-typo, r=steveklabnik

8 years agoAuto merge of #29902 - huonw:smart-quotes, r=alexcrichton
bors [Wed, 18 Nov 2015 10:58:04 +0000 (10:58 +0000)]
Auto merge of #29902 - huonw:smart-quotes, r=alexcrichton

cc https://github.com/rust-lang/rust/pull/29837#issuecomment-157540449

8 years agoFix typo in libcore documentation
Andrea Canciani [Wed, 18 Nov 2015 10:35:29 +0000 (11:35 +0100)]
Fix typo in libcore documentation

8 years agoAuto merge of #29904 - Zoxc:ar_json, r=alexcrichton
bors [Wed, 18 Nov 2015 07:13:39 +0000 (07:13 +0000)]
Auto merge of #29904 - Zoxc:ar_json, r=alexcrichton

This allows targets to drop the dependency on AR.

8 years agoAdd some unicode aliases for ".
Huon Wilson [Tue, 17 Nov 2015 23:32:43 +0000 (10:32 +1100)]
Add some unicode aliases for ".

8 years agoAuto merge of #29897 - alexcrichton:process-wait-with-output, r=brson
bors [Wed, 18 Nov 2015 04:00:43 +0000 (04:00 +0000)]
Auto merge of #29897 - alexcrichton:process-wait-with-output, r=brson

Previously this function used channels but this isn't necessary any more now
that threads have return values. This also has the added bonus of appropriately
waiting for the thread to exit to ensure that the function doesn't still have
running threads once it returns.

8 years agoAuto merge of #29882 - devonhollowood:master, r=Manishearth
bors [Wed, 18 Nov 2015 02:02:00 +0000 (02:02 +0000)]
Auto merge of #29882 - devonhollowood:master, r=Manishearth

Implement #14615

8 years agoExpose archive_format to target specifications
John Kåre Alsaker [Wed, 18 Nov 2015 00:14:15 +0000 (01:14 +0100)]
Expose archive_format to target specifications

8 years agoAuto merge of #29900 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 17 Nov 2015 23:55:53 +0000 (23:55 +0000)]
Auto merge of #29900 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #29612, #29888, #29889, #29890, #29891, #29892
- Failed merges:

8 years agoRollup merge of #29892 - steveklabnik:doc_fromiterator, r=alexcrichton
Steve Klabnik [Tue, 17 Nov 2015 23:13:06 +0000 (18:13 -0500)]
Rollup merge of #29892 - steveklabnik:doc_fromiterator, r=alexcrichton

And modifying IntoIterator for consisntency with it.

Part of #29360

8 years agoRollup merge of #29891 - steveklabnik:gh29470, r=alexcrichton
Steve Klabnik [Tue, 17 Nov 2015 23:13:06 +0000 (18:13 -0500)]
Rollup merge of #29891 - steveklabnik:gh29470, r=alexcrichton

Fixes #29470

8 years agoRollup merge of #29890 - steveklabnik:gh29742, r=Manishearth
Steve Klabnik [Tue, 17 Nov 2015 23:13:06 +0000 (18:13 -0500)]
Rollup merge of #29890 - steveklabnik:gh29742, r=Manishearth

FIxes #29742

8 years agoRollup merge of #29889 - steveklabnik:gh29801, r=manishearth
Steve Klabnik [Tue, 17 Nov 2015 23:13:05 +0000 (18:13 -0500)]
Rollup merge of #29889 - steveklabnik:gh29801, r=manishearth

First, re-word the section on if let/while let to be more clear.

Second, actually call them let statements in the statement section

Fixes #29801

8 years agoRollup merge of #29888 - steveklabnik:gh29762, r=sanxiyn
Steve Klabnik [Tue, 17 Nov 2015 23:13:05 +0000 (18:13 -0500)]
Rollup merge of #29888 - steveklabnik:gh29762, r=sanxiyn

Fixes #29762

8 years agoRollup merge of #29612 - steveklabnik:gh29502, r=alexcrichton
Steve Klabnik [Tue, 17 Nov 2015 23:13:05 +0000 (18:13 -0500)]
Rollup merge of #29612 - steveklabnik:gh29502, r=alexcrichton

libcore does have a few deps, like noted in https://github.com/rust-lang/rust/issues/29390

Fixes #29502

r? @alexcrichton

8 years agoMore docs for FromIterator
Steve Klabnik [Tue, 17 Nov 2015 17:42:09 +0000 (12:42 -0500)]
More docs for FromIterator

And modifying IntoIterator for consisntency with it.

Part of #29360

8 years agoRemove claims of dependency-free libcore
Steve Klabnik [Thu, 5 Nov 2015 13:33:30 +0000 (14:33 +0100)]
Remove claims of dependency-free libcore

libcore does have a few deps, like noted in https://github.com/rust-lang/rust/issues/29390

Fixes #29502

8 years agoClear up the reference around let
Steve Klabnik [Tue, 17 Nov 2015 16:31:13 +0000 (11:31 -0500)]
Clear up the reference around let

First, re-word the section on if let/while let to be more clear.

Second, actually call them let statements in the statement section

Fixes #29801

8 years agoReview fixes
Vadim Petrochenkov [Mon, 16 Nov 2015 18:01:06 +0000 (21:01 +0300)]
Review fixes

8 years agoAdd missing annotations and some tests
Vadim Petrochenkov [Mon, 16 Nov 2015 16:54:28 +0000 (19:54 +0300)]
Add missing annotations and some tests

8 years agoRework stability annotation pass
Vadim Petrochenkov [Mon, 16 Nov 2015 16:53:41 +0000 (19:53 +0300)]
Rework stability annotation pass

8 years agoAuto merge of #29797 - oli-obk:remove-fromb, r=nikomatsakis
bors [Tue, 17 Nov 2015 22:12:07 +0000 (22:12 +0000)]
Auto merge of #29797 - oli-obk:remove-fromb, r=nikomatsakis

the const evaluator has a bool constant value, no need to use integers

the `fromb` function is very old. It took me a while of git-blame until i found where it was created. I think it was just a hack. All tests still pass.

I also forbade `&&` and `||` on integral types

8 years agostd: Use join() in Process::wait_with_output
Alex Crichton [Tue, 17 Nov 2015 21:37:44 +0000 (13:37 -0800)]
std: Use join() in Process::wait_with_output

Previously this function used channels but this isn't necessary any more now
that threads have return values. This also has the added bonus of appropriately
waiting for the thread to exit to ensure that the function doesn't still have
running threads once it returns.

8 years agoAdd changes to liblibc
Devon Hollowood [Tue, 17 Nov 2015 21:16:09 +0000 (13:16 -0800)]
Add changes to liblibc

8 years agoAuto merge of #29887 - sanxiyn:match-ref-pats, r=sfackler
bors [Tue, 17 Nov 2015 20:10:25 +0000 (20:10 +0000)]
Auto merge of #29887 - sanxiyn:match-ref-pats, r=sfackler

8 years agoAuto merge of #29766 - oli-obk:impl_item, r=nikomatsakis
bors [Tue, 17 Nov 2015 18:24:19 +0000 (18:24 +0000)]
Auto merge of #29766 - oli-obk:impl_item, r=nikomatsakis

[breaking change]

I'm not sure if those renames are ok. [TokenType::Tt* to TokenType::*](https://github.com/rust-lang/rust/pull/29582) was obvious, but for all those Item-enums it's less obvious to me what the right way forward is due to the underscore.

8 years agoFix up escapes in the reference
Steve Klabnik [Tue, 17 Nov 2015 16:54:20 +0000 (11:54 -0500)]
Fix up escapes in the reference

Fixes #29470

8 years agoClarify comment about structs and lifetimes
Steve Klabnik [Tue, 17 Nov 2015 16:42:17 +0000 (11:42 -0500)]
Clarify comment about structs and lifetimes

FIxes #29742

8 years agoMention libc from crates.io in TRPL: FFI
Steve Klabnik [Tue, 17 Nov 2015 16:12:57 +0000 (11:12 -0500)]
Mention libc from crates.io in TRPL: FFI

Fixes #29762

8 years agoAuto merge of #29531 - bltavares:issue-28586, r=sanxiyn
bors [Tue, 17 Nov 2015 15:39:10 +0000 (15:39 +0000)]
Auto merge of #29531 - bltavares:issue-28586, r=sanxiyn

Cloases #28586

8 years agoFix match_ref_pats flagged by Clippy
Seo Sanghyeon [Tue, 17 Nov 2015 14:24:49 +0000 (23:24 +0900)]
Fix match_ref_pats flagged by Clippy

8 years agoAuto merge of #29883 - Manishearth:rollup, r=Manishearth
bors [Tue, 17 Nov 2015 09:42:31 +0000 (09:42 +0000)]
Auto merge of #29883 - Manishearth:rollup, r=Manishearth

- Successful merges: #29868, #29873, #29874, #29875, #29876, #29880, #29881
- Failed merges:

8 years agoRollup merge of #29881 - jeanm:patch-1, r=Manishearth
Manish Goregaokar [Tue, 17 Nov 2015 09:42:15 +0000 (15:12 +0530)]
Rollup merge of #29881 - jeanm:patch-1, r=Manishearth

Change conditional perfect to past perfect.

8 years agoRollup merge of #29880 - dignati:fix-freebsd-libc, r=alexcrichton
Manish Goregaokar [Tue, 17 Nov 2015 09:42:15 +0000 (15:12 +0530)]
Rollup merge of #29880 - dignati:fix-freebsd-libc, r=alexcrichton

With this change the build on FreeBSD is almost working again.

8 years agoRollup merge of #29876 - cardoe:i586-build-fix, r=alexcrichton
Manish Goregaokar [Tue, 17 Nov 2015 09:42:15 +0000 (15:12 +0530)]
Rollup merge of #29876 - cardoe:i586-build-fix, r=alexcrichton

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 agoRollup merge of #29875 - steveklabnik:gh29784, r=Manishearth
Manish Goregaokar [Tue, 17 Nov 2015 09:42:15 +0000 (15:12 +0530)]
Rollup merge of #29875 - steveklabnik:gh29784, r=Manishearth

Fixes #29784

8 years agoRollup merge of #29874 - steveklabnik:gh29711, r=alexcrichton
Manish Goregaokar [Tue, 17 Nov 2015 09:42:14 +0000 (15:12 +0530)]
Rollup merge of #29874 - steveklabnik:gh29711, r=alexcrichton

in their API docs

Fixes #29711

8 years agoRollup merge of #29873 - steveklabnik:gh29493, r=nikomatsakis
Manish Goregaokar [Tue, 17 Nov 2015 09:42:14 +0000 (15:12 +0530)]
Rollup merge of #29873 - steveklabnik:gh29493, r=nikomatsakis

Fixes #29493

8 years agoRollup merge of #29868 - petrochenkov:gv, r=sanxiyn
Manish Goregaokar [Tue, 17 Nov 2015 09:42:14 +0000 (15:12 +0530)]
Rollup merge of #29868 - petrochenkov:gv, r=sanxiyn

r? @arielb1

8 years agoRemove unused imports
Devon Hollowood [Tue, 17 Nov 2015 09:14:55 +0000 (01:14 -0800)]
Remove unused imports

8 years agoRemove 'raw_pointer_derive' lint (#14615)
Devon Hollowood [Tue, 17 Nov 2015 04:52:30 +0000 (20:52 -0800)]
Remove 'raw_pointer_derive' lint (#14615)

8 years agoadd unit test for the new and the changed errors
Oliver Schneider [Tue, 17 Nov 2015 09:00:34 +0000 (10:00 +0100)]
add unit test for the new and the changed errors

8 years agoAuto merge of #29837 - Wafflespeanut:unicode_chars, r=Manishearth
bors [Tue, 17 Nov 2015 07:42:03 +0000 (07:42 +0000)]
Auto merge of #29837 - Wafflespeanut:unicode_chars, r=Manishearth

fixes #25957

8 years agoDetect confusing unicode characters and show the alternative
Ravi Shankar [Sat, 14 Nov 2015 21:07:49 +0000 (02:37 +0530)]
Detect confusing unicode characters and show the alternative

8 years agoAuto merge of #29870 - petrochenkov:typaren, r=nrc
bors [Tue, 17 Nov 2015 05:55:07 +0000 (05:55 +0000)]
Auto merge of #29870 - petrochenkov:typaren, r=nrc

Like https://github.com/nrc/rust/commit/d21bfff78cd949ce72be57d3528c4f6985190feb, but for the type grammar.

r? @nrc

8 years agoAuto merge of #29860 - steveklabnik:stackheapfixes, r=huonw
bors [Tue, 17 Nov 2015 04:08:11 +0000 (04:08 +0000)]
Auto merge of #29860 - steveklabnik:stackheapfixes, r=huonw

Fixes #29853
Fixes #29852

While these points are true, we're not going for 100% accuracy here,
this is introductory material. Changing these things would be more
confusing, but it is important to note that we're presenting an
abstraction here.

r? @huonw

8 years agoFix grammar
Jean Maillard [Tue, 17 Nov 2015 02:39:09 +0000 (02:39 +0000)]
Fix grammar

Change conditional perfect to past perfect.

8 years agoAuto merge of #29794 - semarie:openbsd-stdcpp-path, r=alexcrichton
bors [Tue, 17 Nov 2015 02:21:20 +0000 (02:21 +0000)]
Auto merge of #29794 - semarie:openbsd-stdcpp-path, r=alexcrichton

under openbsd, the library path of libstdc++ need to be explicit (due
to the fact the default linker `cc` is gcc-4.2, and not gcc-4.9).

but when a recent LLVM is installed, rustc compilation pikes the bad
LLVM version (which live in /usr/local/lib, which is same directory of
libestdc++.so for gcc-4.9).

this patch move the libstdc++ path from RUST_FLAGS_<target> to special
variable, and use it *after* LLVM_LIBDIR_RUSTFLAGS_<target> in
arguments.

r? @alexcrichton

8 years agoFix libc module name for FreeBSD
Ole Krüger [Tue, 17 Nov 2015 00:53:06 +0000 (01:53 +0100)]
Fix libc module name for FreeBSD

8 years agoAuto merge of #29297 - tbu-:pr_env_ignore_malformed, r=alexcrichton
bors [Tue, 17 Nov 2015 00:31:20 +0000 (00:31 +0000)]
Auto merge of #29297 - tbu-:pr_env_ignore_malformed, r=alexcrichton

Otherwise, the iterator and the functions for getting specific
environment variables might disagree, for environments like

    FOOBAR

8 years agoFix --libdir installs
William Throwe [Mon, 16 Nov 2015 23:35:17 +0000 (18:35 -0500)]
Fix --libdir installs

Rather than modifying the installer to disable directory rewriting,
this patch modifies the directory structure passed to the installer so
that the rewriting gives the correct results.  This means that if a
non-standard --libdir is passed to configure then the same --libdir
option (relative to the --prefix) must be passed to the install
script.  In the `make install` case this is handled automatically.
Binary distributions are generally generated using the default
--libdir and then have paths optionally rewritten by the installer,
which should continue to work.

This has the advantage of not complicating the installer interface
intended for end-user use.

Fixes #29561

8 years agoMake note about traits that can be derived
Steve Klabnik [Mon, 16 Nov 2015 21:57:37 +0000 (16:57 -0500)]
Make note about traits that can be derived

in their API docs

Fixes #29711

8 years agoIgnore malformed environment strings like glibc does
Tobias Bucher [Sun, 25 Oct 2015 12:05:34 +0000 (12:05 +0000)]
Ignore malformed environment strings like glibc does

Otherwise, the iterator and the functions for getting specific
environment variables might disagree, for environments like

    FOOBAR

Variable names starting with equals sign are OK:

glibc only interprets equals signs not in the first position as
separators between variable name and variable value. Instead of skipping
them entirely, a leading equals sign is interpreted to be part of the
variable name.

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 #29872 - steveklabnik:rollup, r=steveklabnik
bors [Mon, 16 Nov 2015 22:43:32 +0000 (22:43 +0000)]
Auto merge of #29872 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #29549, #29796, #29843, #29863, #29865
- Failed merges:

8 years agoRemove nomicon reference to copy_lifetime
Steve Klabnik [Mon, 16 Nov 2015 21:58:52 +0000 (16:58 -0500)]
Remove nomicon reference to copy_lifetime

Fixes #29784

8 years agoImprove UFCS example
Steve Klabnik [Mon, 16 Nov 2015 21:51:58 +0000 (16:51 -0500)]
Improve UFCS example

Fixes #29493

8 years agoRollup merge of #29865 - apasel422:mutex, r=alexcrichton
Steve Klabnik [Mon, 16 Nov 2015 21:22:48 +0000 (16:22 -0500)]
Rollup merge of #29865 - apasel422:mutex, r=alexcrichton

r? @alexcrichton

8 years agoRollup merge of #29863 - steveklabnik:gh29526, r=alexcrichton
Steve Klabnik [Mon, 16 Nov 2015 21:22:48 +0000 (16:22 -0500)]
Rollup merge of #29863 - steveklabnik:gh29526, r=alexcrichton

Fixes #29526

8 years agoRollup merge of #29843 - arcnmx:authors, r=brson
Steve Klabnik [Mon, 16 Nov 2015 21:22:48 +0000 (16:22 -0500)]
Rollup merge of #29843 - arcnmx:authors, r=brson

Duplicate entries removed. This doesn't quite completely allow for generating AUTHORS.txt from scratch but it's much closer now.

8 years agoRollup merge of #29796 - barosl:unresolved-import-extern-crate, r=steveklabnik
Steve Klabnik [Mon, 16 Nov 2015 21:22:48 +0000 (16:22 -0500)]
Rollup merge of #29796 - barosl:unresolved-import-extern-crate, r=steveklabnik

The command-line error message for E0432 does mention the possibility of missing the `extern crate` declaration, but the detailed error message for it doesn't.

Fixes #29517.

8 years agoRollup merge of #29549 - brson:docidx, r=steveklabnik
Steve Klabnik [Mon, 16 Nov 2015 21:22:47 +0000 (16:22 -0500)]
Rollup merge of #29549 - brson:docidx, r=steveklabnik

I noticed the nomicon was not listed!

I also removed links to racer and rustfmt since they were not *doc-specific* links, just links to tools, as well as pointed the cargo link directly at the docs.

Removed all the community stuff. There are lots of other places to find this now, including the website.

With pending website changes this page will continue to be pared back, reflecting only what's in-tree, not general Rust docs.

r? @steveklabnik

8 years agoAuto merge of #29862 - ranma42:const_min_max, r=alexcrichton
bors [Mon, 16 Nov 2015 20:53:59 +0000 (20:53 +0000)]
Auto merge of #29862 - ranma42:const_min_max, r=alexcrichton

They can be useful for constructing constant items.

8 years agoRemove `TyParen` from HIR
Vadim Petrochenkov [Mon, 16 Nov 2015 19:49:47 +0000 (22:49 +0300)]
Remove `TyParen` from HIR

8 years agoMinor tweaks to doc index
Brian Anderson [Mon, 16 Nov 2015 19:48:18 +0000 (11:48 -0800)]
Minor tweaks to doc index

8 years agoAuto merge of #29580 - alexbool:smart-pointer-conversion, r=alexcrichton
bors [Mon, 16 Nov 2015 19:06:52 +0000 (19:06 +0000)]
Auto merge of #29580 - alexbool:smart-pointer-conversion, r=alexcrichton

Sometimes when writing generic code you want to abstract over
owning/pointer type so that calling code isn't restricted by one
concrete owning/pointer type. This commit makes possible such code:
```rust
fn i_will_work_with_arc<T: Into<Arc<MyTy>>>(t: T) {
    let the_arc = t.into();
    // Do something
}

i_will_work_with_arc(MyTy::new());

i_will_work_with_arc(Box::new(MyTy::new()));

let arc_that_i_already_have = Arc::new(MyTy::new());
i_will_work_with_arc(arc_that_i_already_have);
```

Please note that this patch doesn't work with DSTs.
Also to mention, I made those impls stable, and I don't know whether they should be actually stable from the beginning. Please tell me if this should be feature-gated.

8 years agoDo not generate comparefoo.gv and simpleeq.gv during testing
Vadim Petrochenkov [Mon, 16 Nov 2015 18:16:44 +0000 (21:16 +0300)]
Do not generate comparefoo.gv and simpleeq.gv during testing

8 years agoCorrect comment in `Mutex` example
Andrew Paseltiner [Mon, 16 Nov 2015 17:56:18 +0000 (12:56 -0500)]
Correct comment in `Mutex` example

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 agoNomicon: mention tuple structs with repr(c)
Steve Klabnik [Mon, 16 Nov 2015 17:04:25 +0000 (12:04 -0500)]
Nomicon: mention tuple structs with repr(c)

Fixes #29526

8 years agoMake `min_value()` and `max_value()` const functions
Andrea Canciani [Mon, 16 Nov 2015 16:43:09 +0000 (17:43 +0100)]
Make `min_value()` and `max_value()` const functions

8 years agoReaffirm that this is an abstraction
Steve Klabnik [Mon, 16 Nov 2015 15:38:25 +0000 (10:38 -0500)]
Reaffirm that this is an abstraction

Fixes #29853
Fixes #29852

While these points are true, we're not going for 100% accuracy here,
this is introductory material. Changing these things would be more
confusing, but it is important to note that we're presenting an
abstraction here.

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 agorename `ast::ImplItem_::*ImplItem` to `ast::ImplItemKind::*`
Oliver Schneider [Fri, 13 Nov 2015 13:15:04 +0000 (14:15 +0100)]
rename `ast::ImplItem_::*ImplItem` to `ast::ImplItemKind::*`

8 years agoImplItem_ -> ImplItemKind rename
Oliver Schneider [Thu, 12 Nov 2015 14:57:51 +0000 (15:57 +0100)]
ImplItem_ -> ImplItemKind rename

8 years agorename ImplItem_::*ImplItem to ImplItem_::*
Oliver Schneider [Wed, 11 Nov 2015 09:37:25 +0000 (10:37 +0100)]
rename ImplItem_::*ImplItem to ImplItem_::*

[breaking change]

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 agoFix feature name
Alexander Bulaev [Mon, 16 Nov 2015 08:04:17 +0000 (11:04 +0300)]
Fix feature name

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