Commit Graph

52134 Commits

Author SHA1 Message Date
Jeffrey Seyfried
588e0f9873 Remove the implicit binder from VecPerParamSpace 2016-03-27 03:26:28 +00: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
NODA, Kai
bf94aefd5a libstd/sys/*/net: very minor clean up of cvt*() utility functions.
Signed-off-by: NODA, Kai <nodakai@gmail.com>
2016-03-27 05:19:10 +08:00
bors
13bfd5c0b7 Auto merge of #32240 - jseyfried:cleanup_resolve, r=nikomatsakis
Cleanup resolve

This is a collection of small refactorings and improvements in `resolve`, most of which could stand alone.
r? @nikomatsakis
2016-03-26 12:40:53 -07:00
Eduard Burtescu
221d0fbad0 syntax: Stop the bump loop for trait items at } and EOF. 2016-03-26 21:37:53 +02:00
Eduard Burtescu
6abab49029 syntax: Prevent bumping the parser EOF to stop infinite loops. 2016-03-26 21:03:49 +02:00
Jeffrey Seyfried
e011ae5ea9 Cleanup trait search 2016-03-26 18:23:57 +00:00
Jeffrey Seyfried
60a836fc93 Remove unnecessary pubs 2016-03-26 18:23:56 +00:00
Jeffrey Seyfried
227cc5cd26 Remove an if statement with an condition that is always false 2016-03-26 18:23:56 +00:00
Jeffrey Seyfried
3e7a22e3bc Remove outdated comment 2016-03-26 18:23:55 +00:00
Jeffrey Seyfried
4b6b506ef4 Improve the error message for paths with too many initial supers 2016-03-26 18:23:54 +00:00
Jeffrey Seyfried
8988c4538e Refactor away resolve_import_for_module 2016-03-26 18:23:53 +00:00
Jeffrey Seyfried
43dffc3294 Avoid passing around the current module as an argument in resolve_imports 2016-03-26 18:23:52 +00:00
Jeffrey Seyfried
bb09ae28c0 Refactor away resolve_name_in_lexical_scope and resolve_identifier_in_local_ribs. 2016-03-26 18:23:45 +00:00
Jeffrey Seyfried
73417853e4 Refactor out the common functionality of
`resolve_item_in_lexical_scope` and `resolve_identifier_in_local_ribs` into
a new function `resolve_ident_in_lexical_scope`.
2016-03-26 18:22:42 +00:00
Jeffrey Seyfried
07fecf8098 Replace uses of DefLike with Def (only the DlDef variant of DefLike was being used) 2016-03-26 18:22:41 +00:00
Jeffrey Seyfried
1744f55ad7 Refactor away GraphBuilder 2016-03-26 18:22:40 +00:00
Jeffrey Seyfried
0bed9aea2d Make populate_module_if_necessary a method of resolver 2016-03-26 18:22:37 +00:00
Jeffrey Seyfried
77f0f4a624 Avoid repeating parent 2016-03-26 18:22:34 +00:00
Jeffrey Seyfried
ff014a3a10 Refactor away populate_external_module 2016-03-26 18:22:33 +00:00
Jeffrey Seyfried
7bc6c75d0f Refactor away handle_external_def 2016-03-26 18:22:31 +00:00
Alex Crichton
c966c330c9 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 10:33:14 -07:00
bors
65bc9d7730 Auto merge of #32503 - dotdash:llvm_attrs, r=eddyb
Fix building on ARM
2016-03-26 10:25:03 -07:00
Jorge Aparicio
064ec35c18 add regression test for try! 2016-03-26 12:10:16 -05:00
Jorge Aparicio
a440c4a10c fix ? expansion in comment 2016-03-26 12:10:05 -05:00
Tang Chenglong
bbba872dde 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 `optional 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-26 23:59:16 +08:00
bors
8f34053f76 Auto merge of #32508 - Manishearth:rollup, r=Manishearth
Rollup of 6 pull requests

- Successful merges: #32383, #32387, #32440, #32470, #32478, #32492
- Failed merges:
2016-03-26 08:07:42 -07:00
Manish Goregaokar
90f2b69cdd Rollup merge of #32492 - xitep:master, r=alexcrichton
Avoid page reload upon hitting "S" when browsing documentation in local mode

The problem seems to have been introduced with commit 2910c00206
2016-03-26 20:35:49 +05:30
Manish Goregaokar
2c4d039b76 Rollup merge of #32478 - xevix:docs/strings-str-unsized-types, r=steveklabnik
Add note on `str` being an unsized type in strings section of book

The book section on Rust strings mentions `&str` and `String` but does not address why `str` is not used directly. This adds a short blurb and a link to the unsized types chapter. The second draft of the book will go more in-depth on this, but this should help a bit for now. Thanks #rust for clarifying this point, and let me know if it needs rewording or different placement 😄.

CC @steveklabnik @Kimundi
2016-03-26 20:35:49 +05:30
Manish Goregaokar
dcfcbaa009 Rollup merge of #32470 - rust-lang:steveklabnik-patch-1, r=alexcrichton
remove broken config

Fixes #32412
2016-03-26 20:35:49 +05:30
Manish Goregaokar
887e927e7b Rollup merge of #32440 - tshepang:compact, r=steveklabnik
doc: remove needless bindings

The extra syntax is more noise than help in simple examples like this
2016-03-26 20:35:49 +05:30
Manish Goregaokar
f8869394bb Rollup merge of #32387 - alexcrichton:ascii-test, r=aturon
std: Add regression test for #32074

Just to make sure we don't accidentally break this in the future.
2016-03-26 20:35:49 +05:30
Manish Goregaokar
4a1e19990f Rollup merge of #32383 - aidanhs:aphs-heap-move-guarantee, r=alexcrichton
Document heap allocation location guarantee

```
14:25 < aidanhs> is there any guarantee that boxes will not move the value on the heap when they are moved?
14:26 <@steveklabnik> aidanhs: ... i'm not sure if it's a guarantee, but it follows, generally
14:26 <@steveklabnik> aidanhs: moves mean memcpy, so you're memcpying the structure of the box itself, which is copying the pointer
14:26 <@steveklabnik> so the pointer won't be updated
14:26 <@steveklabnik> moves cannot do complex things like move the memory around on the heap
14:26 <@kmc> aidanhs: I would say it's guaranteed
14:27 < aidanhs> steveklabnik: yeah, that's what I was thinking, it'd be pretty strange for rust to do something, but I couldn't find any docs one way or the other
14:27 <@steveklabnik> kmc: aidanhs yeah, it's like a borderline thing that we don't explicitly guanratee but i think IS guaranteed by our other guarantees
14:27 <@steveklabnik> mostly that move == memcpy
14:28 < aidanhs> kmc: steveklabnik great thanks! would a PR to the rust reference along these lines be ok?
14:28 < jmesmon> aidanhs: I believe owning_ref has some discussion of that (stable references)
14:29 <@steveklabnik> aidanhs: i would probably take that, yeah
14:29 < aidanhs> jmesmon: thanks, I'll take a look at that
```
https://botbot.me/mozilla/rust/2016-02-22/?msg=60657619&page=18

r? @steveklabnik
2016-03-26 20:35:49 +05:30
Andreas Linz
2eb84299ca 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.
2016-03-26 14:53:27 +01:00
Tang Chenglong
e469c79de8 Docs: a tiny modification 2016-03-26 21:18:08 +08:00
bors
346d0d5175 Auto merge of #32484 - brson:cargotest, r=alexcrichton
Fix the name of the 'check-cargotest' step
2016-03-26 05:52:39 -07:00