Commit Graph

51995 Commits

Author SHA1 Message Date
bors
a48c9a11a6 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.
2016-03-29 21:25:52 -07:00
bors
b678600ac9 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
2016-03-29 18:03:35 -07:00
Alex Crichton
7668b4bec2 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.
2016-03-29 16:43:49 -07:00
bors
ec666a5977 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
2016-03-29 14:43:51 -07:00
Christopher Serr
e9b1c3ccb5 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.
2016-03-29 22:28:17 +02:00
bors
8f5c3f1fcf 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
2016-03-29 11:10:39 -07:00
Tshepang Lekhonkhobe
cd92e9f966 doc: "mut" not needed for the examples 2016-03-29 19:59:55 +02:00
Tshepang Lekhonkhobe
05d0aa6dcc doc: fix typo 2016-03-29 19:48:46 +02:00
Eduard Burtescu
f22ec2992b mk: move rustc_const_eval to RUSTC_CRATES where it belongs. 2016-03-29 19:36:02 +03:00
Eduard Burtescu
0abd3139db rustc_platform_intrinsics: remove unused rustc dependency. 2016-03-29 19:36:01 +03:00
Eduard Burtescu
352b44d1fa Remove unnecessary dependencies on rustc_llvm. 2016-03-29 19:36:01 +03:00
Alex Burka
0af3e70842 verb agreement in core::convert docs 2016-03-29 12:23:09 -04:00
Alex Crichton
694d88394b 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
2016-03-29 08:24:02 -07:00
bors
0c07a3cc59 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
2016-03-29 08:05:20 -07:00
Björn Steinbrink
22f4587586 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
2016-03-29 16:44:54 +02:00
bors
641204a408 Auto merge of #32564 - frewsxcv:patch-27, r=alexcrichton
Prefer HTTPS when linking to 131002.net.
2016-03-29 03:36:50 -07:00
bors
161c541afd Auto merge of #32541 - troplin:chain-bufread, r=alexcrichton
Implement BufRead for Chain

Addresses #32536
2016-03-29 01:21:30 -07:00
bors
21a4d8098f 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`.
2016-03-28 23:06:09 -07:00
Masood Malekghassemi
8cd0f0cc3a Refactor s.t. TypeRelation implementors don't escape InferCtxt 2016-03-28 22:10:26 -07:00
Masood Malekghassemi
f10a12c49f Remove some dead code 2016-03-28 22:10:15 -07:00
bors
a11129701c 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.
2016-03-28 20:50:42 -07:00
bors
cad964a626 Auto merge of #32461 - mitaa:rdoc-anchors, r=alexcrichton
rustdoc: Correct anchor for links to associated trait items

fixes #28478

r? @alexcrichton
2016-03-28 18:34:50 -07:00
Tshepang Lekhonkhobe
cc762c29f3 doc: first letter should be upper case 2016-03-29 00:56:11 +02:00
bors
44a77f6769 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
2016-03-28 15:08:49 -07:00
Corey Farwell
3bc9157240 Prefer HTTPS when linking to 131002.net. 2016-03-28 18:08:00 -04:00
Tobias Müller
f611e44662 Fix formatting 2016-03-28 22:40:46 +02:00
bors
221c940bf3 Auto merge of #32561 - steveklabnik:rollup, r=steveklabnik
Rollup of 7 pull requests

- Successful merges: #32177, #32235, #32472, #32504, #32507, #32509, #32534
- Failed merges:
2016-03-28 12:52:03 -07:00
Tobias Müller
6489fb40de Use ? instead of try!, add some basic tests 2016-03-28 21:37:36 +02:00
Guillaume Gomez
5b08ab50f7 Add doc examples on pointer types 2016-03-28 21:05:39 +02:00
Kamal Marhubi
93569acdbe 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`.
2016-03-28 13:59:38 -04:00
Steve Klabnik
9eea1d7494 Rollup merge of #32534 - xtian:patch-1, r=steveklabnik
Getting Started: "copy" -> "move"
2016-03-28 13:48:29 -04:00
Steve Klabnik
5e02fd3727 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.~~
2016-03-28 13:48:29 -04:00
Steve Klabnik
5695aea473 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
2016-03-28 13:48:28 -04:00
Steve Klabnik
982d9591e1 Rollup merge of #32504 - tclfs:patch-1, r=steveklabnik
Docs: a tiny modification
2016-03-28 13:48:28 -04:00
Steve Klabnik
5ac3b19d94 Rollup merge of #32472 - GuillaumeGomez:patch-3, r=steveklabnik
Add an example for E0034

r? @steveklabnik

cc @mbrubeck
2016-03-28 13:48:28 -04:00
Steve Klabnik
56bb7b64c8 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.
2016-03-28 13:48:28 -04:00
Steve Klabnik
f2c6b51dc0 Rollup merge of #32177 - srinivasreddy:remove_integer_suffixes, r=steveklabnik
first round of removal of integer suffixes
2016-03-28 13:48:28 -04:00
bors
1f131fbe77 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
2016-03-28 10:37:30 -07:00
Alex Crichton
6908e4e10d 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.
2016-03-28 09:19:25 -07:00
bors
53a03b5ed2 Auto merge of #32522 - tedhorst:lldb-filename, r=michaelwoerister
Set source file name when setting breakpoints in lldb.

Addresses first part of #32520
2016-03-28 07:56:23 -07:00
mitaa
4e0abdb021 Add FIXME for linkchecker whitlists 2016-03-28 16:07:07 +02:00
mitaa
b01da7282d 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.
2016-03-28 16:00:34 +02:00
Tobias Bucher
4ddbd6b5b0 Remove unsafe qualifier from RefCell::as_unsafe_cell
This method is no longer unsafe because the field of `UnsafeCell` is no
longer public.
2016-03-28 15:29:15 +02:00
bors
3602f34e9c Auto merge of #32548 - Hoops:patch-1, r=apasel422
Small typo in concurrency.md

Typo "las time" -> "last time"
2016-03-28 04:06:06 -07:00
Andrew Horton
60a1aa7147 Update concurrency.md
Typo "las time" -> "last time"
2016-03-28 10:35:46 +01:00
bors
f738dc1fe4 Auto merge of #32529 - Manishearth:concurrency-fx, r=steveklabnik
Improve concurrency chapter

Incorporate feedback from HN

r? @steveklabnik
2016-03-27 16:34:10 -07:00
Tobias Müller
373f93a629 Implement BufRead for Chain 2016-03-28 01:28:03 +02:00
bors
e1080dca01 Auto merge of #32516 - nodakai:fix-type-macro-feat-gate, r=alexcrichton
Type macro is tracked at rust-lang/rust#27245, not 27336
2016-03-27 14:10:39 -07:00
Christian Wesselhoeft
dd08804f0a Getting Started: "copy" -> "move" 2016-03-27 12:15:31 -06:00
Manish Goregaokar
5954fce848 Improve concurrency chapter 2016-03-27 22:05:58 +05:30