Commit Graph

51867 Commits

Author SHA1 Message Date
Seo Sanghyeon
b308a8c036 Avoid linking to itself in implementors section of trait page 2016-03-29 17:04:00 +09: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
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
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
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
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
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
bors
deee0f73da 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
2016-03-27 06:13:53 -07:00
Tang Chenglong
708c5d09d7 Update macros.md 2016-03-27 17:59:33 +08:00
bors
abb3a107e4 Auto merge of #32521 - Manishearth:paramitem, r=eddyb
Doc fixes for ParameterEnvironment

r? @eddyb
2016-03-27 02:36:26 -07:00
NODA, Kai
7b69ad9158
Type macro is tracked at rust-lang/rust#27245, not 27336
Signed-off-by: NODA, Kai <nodakai@gmail.com>
2016-03-27 16:48:57 +08:00
Manish Goregaokar
a3fdf327e8 from_item is the old name 2016-03-27 12:31:35 +05:30
Manish Goregaokar
157ba0038d Clarify that ParameterEnvironment::for_item can take impl/trait items too 2016-03-27 12:31:34 +05:30
bors
a18e12494f 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()`.
2016-03-26 23:00:00 -07:00
Alex Burka
1e67d8a570 deriving: factor out discriminant_value construction 2016-03-27 01:25:47 -04:00
Alex Burka
dd5972ee35 mk: add missing dep compiletest=>log 2016-03-27 01:25:47 -04:00
Alex Burka
b20e748ad8 mk: point target LD_LIBRARY_PATH at current stage 2016-03-27 01:25:46 -04:00
Alex Burka
c480b6a75d 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.
2016-03-27 01:25:46 -04:00
Alex Burka
01c0723ef2 add #[derive(Hash)] test for #21714 2016-03-27 01:25:46 -04:00
bors
68de28b309 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
2016-03-26 19:46:24 -07:00
Ted Horst
2bfc47075a Set source file name when setting breakpoints in lldb 2016-03-26 21:40:13 -05:00
bors
d5a91e6958 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.
2016-03-26 17:29:59 -07:00
Eduard Burtescu
035a645e64 rustc_trans: move the contents of the trans module to top-level. 2016-03-27 01:23:28 +02:00
mitaa
41916d8601 Drop cached sources to reduce memory usage 2016-03-27 00:21:01 +01:00
mitaa
8779e7baa4 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.
2016-03-27 00:21:01 +01:00
mitaa
6a76872d71 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
2016-03-27 00:21:00 +01:00
mitaa
d0f74b6059 Load struct-variant data correctly from metadata 2016-03-27 00:21:00 +01:00
mitaa
0e3a2c0167 Linkify associated types and constants 2016-03-27 00:21:00 +01:00
mitaa
1bd8183c15 Don't hardcode item-type anchor ids
These should always correspond to the values in `ItemType::to_static_str`
2016-03-27 00:21:00 +01:00
mitaa
3e33ef4c42 Correct anchor for links to associated trait items 2016-03-27 00:20:55 +01:00
Eduard Burtescu
98359283a4 rustc_trans: move save to librustc_save_analysis. 2016-03-27 01:05:54 +02:00
Eduard Burtescu
5efdde0de1 rustc: move cfg, infer, traits and ty from middle to top-level. 2016-03-27 01:05:54 +02:00
Eduard Burtescu
5647586ed3 rustc: move middle::subst into middle::ty. 2016-03-27 01:05:53 +02:00
bors
97ec69fb95 Auto merge of #32325 - alexcrichton:panic-once, r=aturon
std: Rewrite Once with poisoning

This commit rewrites the `std::sync::Once` primitive with poisoning in mind in
light of #31688. Currently a panic in the initialization closure will cause
future initialization closures to run, but the purpose of a Once is usually to
initialize some global state so it's highly likely that the global state is
corrupt if a panic happened. The same strategy of a mutex is taken where a panic
is propagated by default.

A new API, `call_once_force`, was added to subvert panics like is available on
Mutex as well (for when panicking is handled internally).

Adding this support was a significant enough change to the implementation that
it was just completely rewritten from scratch, primarily to avoid using a
`StaticMutex` which needs to have `destroy()` called on it at some point (a pain
to do).

Closes #31688
2016-03-26 15:14:29 -07:00