]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoRemove incorrect comment about `PartialEq` implementation
Tobias Bucher [Thu, 31 Mar 2016 19:19:17 +0000 (21:19 +0200)]
Remove incorrect comment about `PartialEq` implementation

8 years agoAuto merge of #32439 - jseyfried:visible_suggestions, r=nrc
bors [Thu, 31 Mar 2016 04:13:43 +0000 (21:13 -0700)]
Auto merge of #32439 - jseyfried:visible_suggestions, r=nrc

diagnostics: make paths to external items more visible

This PR changes the reported path for an external item so that it is visible from at least one local module (i.e. it does not use any inaccessible external modules) if possible. If the external item's crate was declared with an `extern crate`, the path is guarenteed to use the `extern crate`.

Fixes #23224, fixes #23355, fixes #26635, fixes #27165.

r? @nrc

8 years agoAuto merge of #32628 - Manishearth:rollup, r=Manishearth
bors [Wed, 30 Mar 2016 23:41:08 +0000 (16:41 -0700)]
Auto merge of #32628 - Manishearth:rollup, r=Manishearth

Rollup of 4 pull requests

- Successful merges: #32259, #32494, #32612, #32618
- Failed merges: #32562

8 years agoRollup merge of #32618 - ProgVal:patch-1, r=steveklabnik
Manish Goregaokar [Wed, 30 Mar 2016 23:34:59 +0000 (05:04 +0530)]
Rollup merge of #32618 - ProgVal:patch-1, r=steveklabnik

Book: Fix phrasing: “an associated type” → “an object with an associated type”.

From what I understood, `graph` is the object from which we create a trait object, and the associated types are `Graph::N` and `Graph::E`.

8 years agoRollup merge of #32612 - frewsxcv:unnecessary-coercions, r=alexcrichton
Manish Goregaokar [Wed, 30 Mar 2016 23:34:59 +0000 (05:04 +0530)]
Rollup merge of #32612 - frewsxcv:unnecessary-coercions, r=alexcrichton

Remove no longer necessary coercions to fn pointer types.

Originally added in 8fe9e4dff6d9d0fdd940835ae377edcb3754f8c1.

Everything appears to build fine without the coercions, so they can
presumably be removed.

8 years agoRollup merge of #32494 - pnkfelix:gate-parser-recovery-via-debugflag, r=nrc
Manish Goregaokar [Wed, 30 Mar 2016 23:34:59 +0000 (05:04 +0530)]
Rollup merge of #32494 - pnkfelix:gate-parser-recovery-via-debugflag, r=nrc

Gate parser recovery via debugflag

Gate parser recovery via debugflag

Put in `-Z continue_parse_after_error`

This works by adding a method, `fn abort_if_no_parse_recovery`, to the
diagnostic handler in `syntax::errors`, and calling it after each
error is emitted in the parser.

(We might consider adding a debugflag to do such aborts in other
places where we are currently attempting recovery, such as resolve,
but I think the parser is the really important case to handle in the
face of #31994 and the parser bugs of varying degrees that were
injected by parse error recovery.)

r? @nikomatsakis

8 years agoRollup merge of #32259 - oli-obk:move_const_eval, r=alexcrichton
Manish Goregaokar [Wed, 30 Mar 2016 23:34:59 +0000 (05:04 +0530)]
Rollup merge of #32259 - oli-obk:move_const_eval, r=alexcrichton

move `const_eval` and `check_match` out of `librustc` into their own crate

r? @arielb1

8 years agoFix fallout in tests
Jeffrey Seyfried [Sun, 20 Mar 2016 11:24:08 +0000 (11:24 +0000)]
Fix fallout in tests

8 years agoAdd method `visible_item_path` to `CStore`
Jeffrey Seyfried [Sat, 19 Mar 2016 09:01:29 +0000 (09:01 +0000)]
Add method `visible_item_path` to `CStore`

8 years agofix compile-fail and parse-fail tests by blindly opting back into
Felix S. Klock II [Sat, 26 Mar 2016 00:36:03 +0000 (01:36 +0100)]
fix compile-fail and parse-fail tests by blindly opting back into
parser recovery (so that expected errors match up)

I'm opting into parser recovery in all these cases out of expediency,
not because the error messages you get with recovery enabled are
actually all that usable in all cases listed.

8 years agoPut in `-Z continue-parse-after-error`
Felix S. Klock II [Fri, 25 Mar 2016 17:17:04 +0000 (18:17 +0100)]
Put in `-Z continue-parse-after-error`

This works by adding a boolean flag, `continue_after_error`, to
`syntax::errors::Handler` that can be imperatively set to `true` or
`false` via a new `fn set_continue_after_error`.

The flag starts off true (since we generally try to recover from
compiler errors, and `Handler` is shared across all phases).

Then, during the `phase_1_parse_input`, we consult the setting of the
`-Z continue-parse-after-error` debug flag to determine whether we
should leave the flag set to `true` or should change it to `false`.

----

(We might consider adding a debugflag to do such aborts in other
places where we are currently attempting recovery, such as resolve,
but I think the parser is the really important case to handle in the
face of #31994 and the parser bugs of varying degrees that were
injected by parse error recovery.)

8 years agoAuto merge of #32621 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 30 Mar 2016 18:33:31 +0000 (11:33 -0700)]
Auto merge of #32621 - steveklabnik:rollup, r=steveklabnik

Rollup of 7 pull requests

- Successful merges: #32580, #32591, #32603, #32605, #32606, #32607, #32608
- Failed merges:

8 years agoBook: Fix phrasing: “an associated type” → “a trait with an associated type”.
Valentin Lorentz [Wed, 30 Mar 2016 17:34:53 +0000 (19:34 +0200)]
Book: Fix phrasing: “an associated type” → “a trait with an associated type”.

8 years agoRollup merge of #32608 - tshepang:grammar, r=aturon
Steve Klabnik [Wed, 30 Mar 2016 17:16:55 +0000 (10:16 -0700)]
Rollup merge of #32608 - tshepang:grammar, r=aturon

doc: "of the" seems more correct than "to the"

It's also less ambiguous

8 years agoRollup merge of #32607 - tshepang:we-gots-intoiterator, r=apasel422
Steve Klabnik [Wed, 30 Mar 2016 17:16:55 +0000 (10:16 -0700)]
Rollup merge of #32607 - tshepang:we-gots-intoiterator, r=apasel422

doc: no need for an explicit iter()

8 years agoRollup merge of #32606 - tshepang:typo, r=bluss
Steve Klabnik [Wed, 30 Mar 2016 17:16:55 +0000 (10:16 -0700)]
Rollup merge of #32606 - tshepang:typo, r=bluss

doc: fix typo

8 years agoRollup merge of #32605 - tshepang:not-needed, r=Manishearth
Steve Klabnik [Wed, 30 Mar 2016 17:16:54 +0000 (10:16 -0700)]
Rollup merge of #32605 - tshepang:not-needed, r=Manishearth

doc: "mut" not needed for the examples

8 years agoRollup merge of #32603 - tshepang:capitalise, r=bluss
Steve Klabnik [Wed, 30 Mar 2016 17:16:54 +0000 (10:16 -0700)]
Rollup merge of #32603 - tshepang:capitalise, r=bluss

doc: first letter should be upper case

8 years agoRollup merge of #32591 - CryZe:patch-1, r=steveklabnik
Steve Klabnik [Wed, 30 Mar 2016 17:16:54 +0000 (10:16 -0700)]
Rollup merge of #32591 - CryZe:patch-1, r=steveklabnik

Fix panic_fmt in the Book

While implementing panic_fmt for the GameCube I noticed that the parameters given to it were completely broken. Turns out that panic_fmt requires the C ABI to work correctly. This should be fixed in the documentation, so that others don't make the same mistake. Thanks to mbrubeck in the IRC for helping me figure this out.

Not specifying extern for lang_items correctly should potentially also be a compiler error.

8 years agoRollup merge of #32580 - durka:patch-17, r=steveklabnik
Steve Klabnik [Wed, 30 Mar 2016 17:16:54 +0000 (10:16 -0700)]
Rollup merge of #32580 - durka:patch-17, r=steveklabnik

verb agreement in core::convert docs

8 years agoRemove no longer necessary coercions to fn pointer types.
Corey Farwell [Wed, 30 Mar 2016 13:35:38 +0000 (09:35 -0400)]
Remove no longer necessary coercions to fn pointer types.

Originally added in 8fe9e4dff6d9d0fdd940835ae377edcb3754f8c1.

Everything appears to build fine without the coercions, so they can
presumably be removed.

8 years agoAuto merge of #32603 - tshepang:capitalise, r=bluss
bors [Wed, 30 Mar 2016 13:18:59 +0000 (06:18 -0700)]
Auto merge of #32603 - tshepang:capitalise, r=bluss

doc: first letter should be upper case

8 years agomove `const_eval` and `check_match` out of `librustc`
Oliver Schneider [Wed, 30 Mar 2016 11:43:36 +0000 (13:43 +0200)]
move `const_eval` and `check_match` out of `librustc`

8 years agodoc: no need for an explicit iter()
Tshepang Lekhonkhobe [Mon, 28 Mar 2016 22:55:04 +0000 (00:55 +0200)]
doc: no need for an explicit iter()

8 years agorename `rustc_const_eval` to `rustc_const_math`
Oliver Schneider [Tue, 15 Mar 2016 11:33:13 +0000 (12:33 +0100)]
rename `rustc_const_eval` to `rustc_const_math`

8 years agoAuto merge of #32581 - GuillaumeGomez:patch-3, r=steveklabnik
bors [Wed, 30 Mar 2016 07:53:57 +0000 (00:53 -0700)]
Auto merge of #32581 - GuillaumeGomez:patch-3, r=steveklabnik

Add doc examples on pointer types

r? @steveklabnik

Fixes #29336

8 years agodoc: "of the" seems more correct than "to the"
Tshepang Lekhonkhobe [Wed, 30 Mar 2016 07:01:21 +0000 (09:01 +0200)]
doc: "of the" seems more correct than "to the"

It's also less ambiguous

8 years agoAuto merge of #32593 - alexcrichton:fix-i586-msvc, r=brson
bors [Wed, 30 Mar 2016 04:25:52 +0000 (21:25 -0700)]
Auto merge of #32593 - alexcrichton:fix-i586-msvc, r=brson

mk: A few build fixes for i586-pc-windows-msvc

Detect the triple in the configure script for probing MSVC shenanigans and also
be sure to use `llvm-config` from the build host and not the target when
configuring compiler-rt.

8 years agoAuto merge of #32576 - alexcrichton:metadata-for-our-crates, r=brson
bors [Wed, 30 Mar 2016 01:03:35 +0000 (18:03 -0700)]
Auto merge of #32576 - alexcrichton:metadata-for-our-crates, r=brson

mk: Fix cross-host builds

The change in b20e748 had the unintended consequence of breaking cross-host
builds as we apparently relied on the incorrect definition of this variable in
the makefiles. That change, however, was required to get tests passing so we
couldn't just revert it.

This commit fixes the underlying bug by leaving the "more correct" definition of
`LD_LIBRARY_PATH_ENV_TARGETDIR` (also fixing it with a hardcoded reference to
`CFG_BUILD`) and updating the `RPATH_VAR` definition below. Turned out we
already had special-casing logic for passing `--cfg stage1` during the
well-we-print-this-as-stage0 build of a cross-host. That logic was just updated
to pull from a different variable as opposed to relying on the definition of
that variable to accommodate this.

Closes #32568

8 years agomk: A few build fixes for i586-pc-windows-msvc
Alex Crichton [Tue, 29 Mar 2016 16:33:08 +0000 (09:33 -0700)]
mk: A few build fixes for i586-pc-windows-msvc

Detect the triple in the configure script for probing MSVC shenanigans and also
be sure to use `llvm-config` from the build host and not the target when
configuring compiler-rt.

8 years agoAuto merge of #32571 - eddyb:llvm-back-to-back, r=alexcrichton
bors [Tue, 29 Mar 2016 21:43:51 +0000 (14:43 -0700)]
Auto merge of #32571 - eddyb:llvm-back-to-back, r=alexcrichton

Weed out dependencies on librustc_llvm and librustc.

Found while working on #32570. cc @nikomatsakis

8 years agoFix panic_fmt in the Book
Christopher Serr [Tue, 29 Mar 2016 20:28:17 +0000 (22:28 +0200)]
Fix panic_fmt in the Book

While implementing panic_fmt for the GameCube I noticed that the parameters given to it were completely broken. Turns out that panic_fmt requires the C ABI to work correctly. This should be fixed in the documentation, so that others don't make the same mistake. Thanks to mbrubeck in the IRC for helping me figure this out.

Not specifying extern for lang_items correctly should potentially also be a compiler error.

8 years agoAuto merge of #32557 - dotdash:issue-32518, r=nikomatsakis
bors [Tue, 29 Mar 2016 18:10:39 +0000 (11:10 -0700)]
Auto merge of #32557 - dotdash:issue-32518, r=nikomatsakis

Use weak_odr linkage when reusing definitions across codegen units

When reuing a definition across codegen units, we obviously cannot use
internal linkage, but using external linkage means that we can end up
with multiple conflicting definitions of a single symbol across
multiple crates. Since the definitions should all be equal
semantically, we can use weak_odr linkage to resolve the situation.

Fixes #32518

r? @nikomatsakis

8 years agodoc: "mut" not needed for the examples
Tshepang Lekhonkhobe [Tue, 29 Mar 2016 17:59:55 +0000 (19:59 +0200)]
doc: "mut" not needed for the examples

8 years agodoc: fix typo
Tshepang Lekhonkhobe [Tue, 29 Mar 2016 17:48:46 +0000 (19:48 +0200)]
doc: fix typo

8 years agomk: move rustc_const_eval to RUSTC_CRATES where it belongs.
Eduard Burtescu [Tue, 29 Mar 2016 10:51:46 +0000 (13:51 +0300)]
mk: move rustc_const_eval to RUSTC_CRATES where it belongs.

8 years agorustc_platform_intrinsics: remove unused rustc dependency.
Eduard Burtescu [Tue, 29 Mar 2016 10:50:58 +0000 (13:50 +0300)]
rustc_platform_intrinsics: remove unused rustc dependency.

8 years agoRemove unnecessary dependencies on rustc_llvm.
Eduard Burtescu [Tue, 29 Mar 2016 10:50:17 +0000 (13:50 +0300)]
Remove unnecessary dependencies on rustc_llvm.

8 years agoverb agreement in core::convert docs
Alex Burka [Tue, 29 Mar 2016 16:23:09 +0000 (12:23 -0400)]
verb agreement in core::convert docs

8 years agomk: Fix cross-host builds
Alex Crichton [Tue, 29 Mar 2016 15:24:02 +0000 (08:24 -0700)]
mk: Fix cross-host builds

The change in b20e748 had the unintended consequence of breaking cross-host
builds as we apparently relied on the incorrect definition of this variable in
the makefiles. That change, however, was required to get tests passing so we
couldn't just revert it.

This commit fixes the underlying bug by leaving the "more correct" definition of
`LD_LIBRARY_PATH_ENV_TARGETDIR` (also fixing it with a hardcoded reference to
`CFG_BUILD`) and updating the `RPATH_VAR` definition below. Turned out we
already had special-casing logic for passing `--cfg stage1` during the
well-we-print-this-as-stage0 build of a cross-host. That logic was just updated
to pull from a different variable as opposed to relying on the definition of
that variable to accommodate this.

Closes #32568

8 years agoAuto merge of #32567 - soltanmm:clean-up, r=nikomatsakis
bors [Tue, 29 Mar 2016 15:05:20 +0000 (08:05 -0700)]
Auto merge of #32567 - soltanmm:clean-up, r=nikomatsakis

Refactor s.t. TypeRelation implementors in `infer` don't escape InferCtxt

Some clean-up so that we can go back to the future of #31867 as opposed to #32542.

r? @nikomatsakis

8 years agoUse weak_odr linkage when reusing definitions across codegen units
Björn Steinbrink [Mon, 28 Mar 2016 15:57:31 +0000 (17:57 +0200)]
Use weak_odr linkage when reusing definitions across codegen units

When reuing a definition across codegen units, we obviously cannot use
internal linkage, but using external linkage means that we can end up
with multiple conflicting definitions of a single symbol across
multiple crates. Since the definitions should all be equal
semantically, we can use weak_odr linkage to resolve the situation.

Fixes #32518

8 years agoAuto merge of #32564 - frewsxcv:patch-27, r=alexcrichton
bors [Tue, 29 Mar 2016 10:36:50 +0000 (03:36 -0700)]
Auto merge of #32564 - frewsxcv:patch-27, r=alexcrichton

Prefer HTTPS when linking to 131002.net.

8 years agoAuto merge of #32541 - troplin:chain-bufread, r=alexcrichton
bors [Tue, 29 Mar 2016 08:21:30 +0000 (01:21 -0700)]
Auto merge of #32541 - troplin:chain-bufread, r=alexcrichton

Implement BufRead for Chain

Addresses #32536

8 years agoAuto merge of #32438 - kamalmarhubi:intoiterator-example, r=steveklabnik
bors [Tue, 29 Mar 2016 06:06:09 +0000 (23:06 -0700)]
Auto merge of #32438 - kamalmarhubi:intoiterator-example, r=steveklabnik

style: Use `iter` for IntoIterator parameter names

This commit standardizes the codebase on `iter` for parameters with
IntoIterator bounds.

Previously about 40% of IntoIterator parameters were named `iterable`,
with most of the rest being named `iter`. There was a single place where
it was named `iterator`.

8 years agoRefactor s.t. TypeRelation implementors don't escape InferCtxt
Masood Malekghassemi [Tue, 29 Mar 2016 04:56:19 +0000 (21:56 -0700)]
Refactor s.t. TypeRelation implementors don't escape InferCtxt

8 years agoRemove some dead code
Masood Malekghassemi [Sun, 27 Mar 2016 22:06:11 +0000 (15:06 -0700)]
Remove some dead code

8 years agoAuto merge of #32479 - eddyb:eof-not-even-twice, r=nikomatsakis
bors [Tue, 29 Mar 2016 03:50:42 +0000 (20:50 -0700)]
Auto merge of #32479 - eddyb:eof-not-even-twice, r=nikomatsakis

Prevent bumping the parser past the EOF.

Makes `Parser::bump` after EOF into an ICE, forcing callers to avoid repeated EOF bumps.
This ICE is intended to break infinite loops where EOF wasn't stopping the loop.

For example, the handling of EOF in `parse_trait_items`' recovery loop fixes #32446.
But even without this specific fix, the ICE is triggered, which helps diagnosis and UX.

This is a `[breaking-change]` for plugins authors who eagerly eat multiple EOFs.
See https://github.com/docopt/docopt.rs/pull/171 for such an example and the necessary fix.

8 years agoAuto merge of #32461 - mitaa:rdoc-anchors, r=alexcrichton
bors [Tue, 29 Mar 2016 01:34:50 +0000 (18:34 -0700)]
Auto merge of #32461 - mitaa:rdoc-anchors, r=alexcrichton

rustdoc: Correct anchor for links to associated trait items

fixes #28478

r? @alexcrichton

8 years agodoc: first letter should be upper case
Tshepang Lekhonkhobe [Mon, 28 Mar 2016 22:56:11 +0000 (00:56 +0200)]
doc: first letter should be upper case

8 years agoAuto merge of #32267 - durka:inclusive-range-error, r=nrc
bors [Mon, 28 Mar 2016 22:08:49 +0000 (15:08 -0700)]
Auto merge of #32267 - durka:inclusive-range-error, r=nrc

melt the ICE when lowering an impossible range

Emit a fatal error instead of panicking when HIR lowering encounters a range with no `end` point.

This involved adding a method to wire up `LoweringContext::span_fatal`.

Fixes #32245 (cc @nodakai).

r? @nrc

8 years agoPrefer HTTPS when linking to 131002.net.
Corey Farwell [Mon, 28 Mar 2016 22:08:00 +0000 (18:08 -0400)]
Prefer HTTPS when linking to 131002.net.

8 years agoFix formatting
Tobias Müller [Mon, 28 Mar 2016 20:40:46 +0000 (22:40 +0200)]
Fix formatting

8 years agoAuto merge of #32561 - steveklabnik:rollup, r=steveklabnik
bors [Mon, 28 Mar 2016 19:52:03 +0000 (12:52 -0700)]
Auto merge of #32561 - steveklabnik:rollup, r=steveklabnik

Rollup of 7 pull requests

- Successful merges: #32177, #32235, #32472, #32504, #32507, #32509, #32534
- Failed merges:

8 years agoUse ? instead of try!, add some basic tests
Tobias Müller [Mon, 28 Mar 2016 19:37:36 +0000 (21:37 +0200)]
Use ? instead of try!, add some basic tests

8 years agoAdd doc examples on pointer types
Guillaume Gomez [Tue, 29 Mar 2016 16:46:18 +0000 (18:46 +0200)]
Add doc examples on pointer types

8 years agostyle: Use `iter` for IntoIterator parameter names
Kamal Marhubi [Mon, 28 Mar 2016 17:55:47 +0000 (13:55 -0400)]
style: Use `iter` for IntoIterator parameter names

This commit standardizes the codebase on `iter` for parameters with
IntoIterator bounds.

Previously about 40% of IntoIterator parameters were named `iterable`,
with most of the rest being named `iter`. There was a single place where
it was named `iterator`.

8 years agoRollup merge of #32534 - xtian:patch-1, r=steveklabnik
Steve Klabnik [Mon, 28 Mar 2016 17:48:29 +0000 (13:48 -0400)]
Rollup merge of #32534 - xtian:patch-1, r=steveklabnik

Getting Started: "copy" -> "move"

8 years agoRollup merge of #32509 - tclfs:patch-2, r=steveklabnik
Steve Klabnik [Mon, 28 Mar 2016 17:48:29 +0000 (13:48 -0400)]
Rollup merge of #32509 - tclfs:patch-2, r=steveklabnik

docs: make some text changes on Section `Macros`

(1) In contrast to `that`, `so that` expresses `result` indicated by the sentence, not `reason`;
(2) `block` is an expression, and may be have an expression, so I add `optionally an expression` to make more precise;
~~(3) When I read here, I was confused with what `the child` referred to. After modification, it would be better.~~

8 years agoRollup merge of #32507 - klingtnet:master, r=steveklabnik
Steve Klabnik [Mon, 28 Mar 2016 17:48:28 +0000 (13:48 -0400)]
Rollup merge of #32507 - klingtnet:master, r=steveklabnik

Fix missing console output in `Barrier` example

The `println!` calls in the previous version were never shown (at least
not in the playpen) because the main thread is finished before all the
spawned child threads were synchronized. This commit adds a join for
each thread handle to wait in the main thread until all child threads
are finished.

r? @steveklabnik

8 years agoRollup merge of #32504 - tclfs:patch-1, r=steveklabnik
Steve Klabnik [Mon, 28 Mar 2016 17:48:28 +0000 (13:48 -0400)]
Rollup merge of #32504 - tclfs:patch-1, r=steveklabnik

Docs: a tiny modification

8 years agoRollup merge of #32472 - GuillaumeGomez:patch-3, r=steveklabnik
Steve Klabnik [Mon, 28 Mar 2016 17:48:28 +0000 (13:48 -0400)]
Rollup merge of #32472 - GuillaumeGomez:patch-3, r=steveklabnik

Add an example for E0034

r? @steveklabnik

cc @mbrubeck

8 years agoRollup merge of #32235 - fbergr:trailing_whitespace, r=sanxiyn
Steve Klabnik [Mon, 28 Mar 2016 17:48:28 +0000 (13:48 -0400)]
Rollup merge of #32235 - fbergr:trailing_whitespace, r=sanxiyn

Remove trailing whitespace at the end of lines

According the rules of styling Rust code there should not be trailing whitespace at the end of lines or files. I thought that it might be good to remove trailing whitespace from other files also, if it does not break anything.

8 years agoRollup merge of #32177 - srinivasreddy:remove_integer_suffixes, r=steveklabnik
Steve Klabnik [Mon, 28 Mar 2016 17:48:28 +0000 (13:48 -0400)]
Rollup merge of #32177 - srinivasreddy:remove_integer_suffixes, r=steveklabnik

 first round of removal of integer suffixes

8 years agoAuto merge of #32560 - alexcrichton:metadata-for-our-crates, r=nikomatsakis
bors [Mon, 28 Mar 2016 17:37:30 +0000 (10:37 -0700)]
Auto merge of #32560 - alexcrichton:metadata-for-our-crates, r=nikomatsakis

mk: Add `-C metadata` for compiling crates we ship

This should re-enable all external builds of crates with the same name. Right
now Cargo doesn't pass `-C metadata` for the top-level library being compiled,
so if that library is called `libc`, for example, then it won't be able to link
to the standard library which *also* has a `libc` library compiled without `-C
metadata`. This can result in naming conflicts which need to be resolved.

By passing `-C metadata` to the in-tree crates we ship it should add some extra
salt to all symbol names to ensure that they don't collide.

Closes #32532

8 years agomk: Add `-C metadata` for compiling crates we ship
Alex Crichton [Mon, 28 Mar 2016 16:19:25 +0000 (09:19 -0700)]
mk: Add `-C metadata` for compiling crates we ship

This should re-enable all external builds of crates with the same name. Right
now Cargo doesn't pass `-C metadata` for the top-level library being compiled,
so if that library is called `libc`, for example, then it won't be able to link
to the standard library which *also* has a `libc` library compiled without `-C
metadata`. This can result in naming conflicts which need to be resolved.

By passing `-C metadata` to the in-tree crates we ship it should add some extra
salt to all symbol names to ensure that they don't collide.

8 years agoAuto merge of #32522 - tedhorst:lldb-filename, r=michaelwoerister
bors [Mon, 28 Mar 2016 14:56:23 +0000 (07:56 -0700)]
Auto merge of #32522 - tedhorst:lldb-filename, r=michaelwoerister

Set source file name when setting breakpoints in lldb.

Addresses first part of #32520

8 years agoAdd FIXME for linkchecker whitlists
mitaa [Mon, 28 Mar 2016 13:41:22 +0000 (15:41 +0200)]
Add FIXME for linkchecker whitlists

8 years agoDon't check(=cache) redirect pages
mitaa [Mon, 28 Mar 2016 12:31:57 +0000 (14:31 +0200)]
Don't check(=cache) redirect pages

Checking a redirect page during tree traversal before trying to actually
follow the redirect leads to retrieval of the redirect pages source
instead.

8 years agoAuto merge of #32548 - Hoops:patch-1, r=apasel422
bors [Mon, 28 Mar 2016 11:06:06 +0000 (04:06 -0700)]
Auto merge of #32548 - Hoops:patch-1, r=apasel422

Small typo in concurrency.md

Typo "las time" -> "last time"

8 years agoUpdate concurrency.md
Andrew Horton [Mon, 28 Mar 2016 09:35:46 +0000 (10:35 +0100)]
Update concurrency.md

Typo "las time" -> "last time"

8 years agoAuto merge of #32529 - Manishearth:concurrency-fx, r=steveklabnik
bors [Sun, 27 Mar 2016 23:34:10 +0000 (16:34 -0700)]
Auto merge of #32529 - Manishearth:concurrency-fx, r=steveklabnik

Improve concurrency chapter

Incorporate feedback from HN

r? @steveklabnik

8 years agoImplement BufRead for Chain
Tobias Müller [Sun, 27 Mar 2016 23:28:03 +0000 (01:28 +0200)]
Implement BufRead for Chain

8 years agoAuto merge of #32516 - nodakai:fix-type-macro-feat-gate, r=alexcrichton
bors [Sun, 27 Mar 2016 21:10:39 +0000 (14:10 -0700)]
Auto merge of #32516 - nodakai:fix-type-macro-feat-gate, r=alexcrichton

Type macro is tracked at rust-lang/rust#27245, not 27336

8 years agoGetting Started: "copy" -> "move"
Christian Wesselhoeft [Sun, 27 Mar 2016 18:15:31 +0000 (12:15 -0600)]
Getting Started: "copy" -> "move"

8 years agoImprove concurrency chapter
Manish Goregaokar [Sun, 27 Mar 2016 16:35:58 +0000 (22:05 +0530)]
Improve concurrency chapter

8 years agoAuto merge of #32252 - durka:derive-21714, r=alexcrichton
bors [Sun, 27 Mar 2016 13:13:53 +0000 (06:13 -0700)]
Auto merge of #32252 - durka:derive-21714, r=alexcrichton

derive: use discriminant_value in #[derive(Hash)]

derive: use discriminant_value in #[derive(Hash)]

Fixes #21714.

Spawned from #32139.

r? @alexcrichton

8 years agoUpdate macros.md
Tang Chenglong [Sun, 27 Mar 2016 09:59:33 +0000 (17:59 +0800)]
Update macros.md

8 years agoAuto merge of #32521 - Manishearth:paramitem, r=eddyb
bors [Sun, 27 Mar 2016 09:36:26 +0000 (02:36 -0700)]
Auto merge of #32521 - Manishearth:paramitem, r=eddyb

Doc fixes for ParameterEnvironment

r? @eddyb

8 years agoType macro is tracked at rust-lang/rust#27245, not 27336
NODA, Kai [Sat, 26 Mar 2016 21:29:05 +0000 (05:29 +0800)]
Type macro is tracked at rust-lang/rust#27245, not 27336

Signed-off-by: NODA, Kai <nodakai@gmail.com>
8 years agofrom_item is the old name
Manish Goregaokar [Sun, 27 Mar 2016 00:35:00 +0000 (06:05 +0530)]
from_item is the old name

8 years agoClarify that ParameterEnvironment::for_item can take impl/trait items too
Manish Goregaokar [Sun, 27 Mar 2016 00:34:50 +0000 (06:04 +0530)]
Clarify that ParameterEnvironment::for_item can take impl/trait items too

8 years agoAuto merge of #32510 - nodakai:libstd-sys-net-error-check, r=alexcrichton
bors [Sun, 27 Mar 2016 06:00:00 +0000 (23:00 -0700)]
Auto merge of #32510 - nodakai:libstd-sys-net-error-check, r=alexcrichton

libstd/sys/*/net: clean up API error checks.

1. Slightly improve `cvt_gai()` and `cvt()`.
2. Remove now redundant `cvt_r()`.

8 years agoderiving: factor out discriminant_value construction
Alex Burka [Thu, 10 Mar 2016 05:31:19 +0000 (00:31 -0500)]
deriving: factor out discriminant_value construction

8 years agomk: add missing dep compiletest=>log
Alex Burka [Tue, 22 Mar 2016 22:18:30 +0000 (18:18 -0400)]
mk: add missing dep compiletest=>log

8 years agomk: point target LD_LIBRARY_PATH at current stage
Alex Burka [Tue, 22 Mar 2016 22:17:57 +0000 (18:17 -0400)]
mk: point target LD_LIBRARY_PATH at current stage

8 years agofix #21714 by using discriminant_value in #[derive(Hash)]
Alex Burka [Mon, 7 Mar 2016 18:05:12 +0000 (13:05 -0500)]
fix #21714 by using discriminant_value in #[derive(Hash)]

This is the same approach taken in #24270, except that this
should not be a breaking change because it only changes the output
of hash functions, which nobody should be relying on.

8 years agoadd #[derive(Hash)] test for #21714
Alex Burka [Sat, 5 Mar 2016 19:51:24 +0000 (14:51 -0500)]
add #[derive(Hash)] test for #21714

8 years agoAuto merge of #32513 - japaric:try-test, r=alexcrichton
bors [Sun, 27 Mar 2016 02:46:24 +0000 (19:46 -0700)]
Auto merge of #32513 - japaric:try-test, r=alexcrichton

add regression test for try!

Our widespread internal use of `try` was like a regression test. Now that most of `try!`s have been converted to `?`, lets add a proper regression test.

cc @bstrie

8 years agoSet source file name when setting breakpoints in lldb
Ted Horst [Sun, 27 Mar 2016 02:40:13 +0000 (21:40 -0500)]
Set source file name when setting breakpoints in lldb

8 years agoAuto merge of #32432 - eddyb:dock-service, r=nikomatsakis
bors [Sun, 27 Mar 2016 00:29:59 +0000 (17:29 -0700)]
Auto merge of #32432 - eddyb:dock-service, r=nikomatsakis

Flatten rustc and rustc_trans module hierarchy slightly.

The following moves were made, in the name of sanity/simplicity:
* `rustc::middle::{cfg, infer, traits, ty}` to `rustc::{cfg, infer, traits, ty}`
* `rustc::middle::subst` to `rustc::ty::subst`
* `rustc_trans::trans::*` to `rustc_trans::*`
* `rustc_trans::save` to `rustc_save_analysis` (cc @nrc)

I've rebased a larger WIP branch on top of this and the only conflicts were in imports, but YMMV.

8 years agorustc_trans: move the contents of the trans module to top-level.
Eduard Burtescu [Tue, 22 Mar 2016 17:23:36 +0000 (19:23 +0200)]
rustc_trans: move the contents of the trans module to top-level.

8 years agoDrop cached sources to reduce memory usage
mitaa [Sat, 26 Mar 2016 20:11:15 +0000 (21:11 +0100)]
Drop cached sources to reduce memory usage

8 years agoDon't initialize id-map when rendering md files
mitaa [Sat, 26 Mar 2016 15:42:38 +0000 (16:42 +0100)]
Don't initialize id-map when rendering md files

Adding these "known" values to the table of used ids is only required
when embedding markdown into a rustdoc  html page and may yield
unexpected results when rendering a standalone `*.md` file.

8 years agoExtend linkchecker with anchor checking
mitaa [Sat, 26 Mar 2016 10:59:30 +0000 (11:59 +0100)]
Extend linkchecker with anchor checking

This adds checks to ensure that:
* link anchors refer to existing id's on the target page
* id's are unique within an html document
* page redirects are valid

8 years agoLoad struct-variant data correctly from metadata
mitaa [Fri, 25 Mar 2016 01:18:57 +0000 (02:18 +0100)]
Load struct-variant data correctly from metadata

8 years agoLinkify associated types and constants
mitaa [Thu, 24 Mar 2016 23:10:15 +0000 (00:10 +0100)]
Linkify associated types and constants

8 years agoDon't hardcode item-type anchor ids
mitaa [Thu, 24 Mar 2016 05:16:23 +0000 (06:16 +0100)]
Don't hardcode item-type anchor ids

These should always correspond to the values in `ItemType::to_static_str`

8 years agoCorrect anchor for links to associated trait items
mitaa [Thu, 24 Mar 2016 05:10:52 +0000 (06:10 +0100)]
Correct anchor for links to associated trait items

8 years agorustc_trans: move save to librustc_save_analysis.
Eduard Burtescu [Tue, 22 Mar 2016 16:40:24 +0000 (18:40 +0200)]
rustc_trans: move save to librustc_save_analysis.