Commit Graph

53689 Commits

Author SHA1 Message Date
Jeffrey Seyfried
8ee93b73d1 Re-fold expanded items in expand_mac_invoc 2016-05-21 23:01:01 +00:00
Jeffrey Seyfried
2e7afd7367 Improve diagnostics 2016-05-21 23:01:01 +00:00
Jeffrey Seyfried
7f30eef2ee Introduce MacroGenerable trait 2016-05-21 23:00:57 +00:00
bors
476fe6eefe Auto merge of #33767 - sfackler:panic-hook-docs, r=alexcrichton
Mention that the panic hook will always run

r? @alexcrichton

cc @tomaka
2016-05-21 10:17:40 -07:00
Ticki
da55fd788b Improve internal documentation and code style
Fix some code layout, remove some unnecessary returns, fix typos,
punctuation, and comment consistency.
2016-05-21 08:51:08 -05:00
bors
da41920919 Auto merge of #33768 - Manishearth:rollup, r=Manishearth
Rollup of 7 pull requests

- Successful merges: #33578, #33679, #33743, #33746, #33747, #33750, #33757
- Failed merges:
2016-05-21 00:38:55 -07:00
Aaklo Xu
4c7b963862 src/doc: Keep the original style of links 2016-05-21 14:40:57 +08:00
Manish Goregaokar
61b9be776e Rollup merge of #33757 - GuillaumeGomez:simd, r=steveklabnik
Update simd syntax

r? @steveklabnik
2016-05-21 09:08:11 +05:30
Manish Goregaokar
197aa52de3 Rollup merge of #33750 - alx741:fix_typo, r=Manishearth
book: ownership: fix typo

The sentence ends there, so a comma is required.

See:
http://english.stackexchange.com/questions/1469/when-ending-a-list-with-etc-should-there-be-a-comma-before-etc
2016-05-21 09:08:10 +05:30
Manish Goregaokar
f262bb899c Rollup merge of #33747 - postmodern:patch-2, r=Manishearth
Clarify the English translation of `?Sized`

* It wasn't clear whether `?Sized` meant "not `Sized`" or "`Sized` or not `Sized`". According to #rust IRC, it does indeed mean "`Sized` or not `Sized`".
* Use the same language as [Trait std::marker::Sized](https://doc.rust-lang.org/std/marker/trait.Sized.html) about how `Sized` is implicitly bound.
* Refer to the syntax as `?Sized`, since it's currently the only allowed trait that can follow `?`.
2016-05-21 09:08:10 +05:30
Manish Goregaokar
c57bb106d8 Rollup merge of #33746 - dns2utf8:doc_sort_memory, r=steveklabnik
Clarify docs for sort(&mut self)

I documented the memory usage like noted in this issue:
  * Document memory usage of sort() family of functions #33419
2016-05-21 09:08:10 +05:30
Manish Goregaokar
0c949d8cc3 Rollup merge of #33743 - royalstream:royalstream-stack-doc, r=steveklabnik
Book: small improvement to a table to make it clearer

This table is used as an example of four heap values where two of them got deallocated leaving a gap.
It also has stack variables.
Instead of four stack variables I propose three, that way there's no misleading connection between the number of stack variables and heap variables.
But more importantly: three of the four stack variables had the same name (**y**) which could be confusing to a beginner, I changed this as well.
2016-05-21 09:08:10 +05:30
Manish Goregaokar
3f4d915147 Rollup merge of #33679 - Manishearth:rustdoc-readmore-impls, r=alexcrichton
rustdoc: Add doc snippets for trait impls, with a read more link

The read more link only appears if the documentation is more than one line long.

![screenshot from 2016-05-17 06 54 14](https://cloud.githubusercontent.com/assets/1617736/15308544/4c2ba0ce-1bfc-11e6-9add-29de8dc7ac6e.png)

It currently does not appear on non-defaulted methods, since you can document them directly. I could make it so that default documentation gets forwarded if regular docs don't exist.

Fixes #33672

r? @alexcrichton

cc @steveklabnik
2016-05-21 09:08:09 +05:30
Manish Goregaokar
87a22885a0 Rollup merge of #33578 - durka:patch-21, r=alexcrichton
update tracking issue for once_poison

The tracking issue for once_poison was noted as #31688 which was closed, so it now points to the new #33577.
2016-05-21 09:08:09 +05:30
bors
91e907345c Auto merge of #33625 - alexcrichton:rustbuild-moar-tests, r=aturon
rustbuild: Touch up some test suites

This adds in some missing test suites, primarily a few pretty suites. It also starts optimizing tests by default as the current test suite does, but also recognizes `--disable-optimize-tests`.

Currently the optimization of tests isn't recognized by crate tests because Cargo doesn't support the ability to compile an unoptimized test suite against an optimized library. Perhaps a feature to add, though!
2016-05-20 20:33:38 -07:00
Alex Ozdemir
ab09fbca23 Added a rustdoc shortcut for collapse/expand all
Now when the user presses the "+" key all sections will collapse/expand.

Also added a note to the help screen which describes this behavior.
2016-05-20 19:43:47 -07:00
Postmodern
71af58accf Wording changes
* Use "special bound syntax" instead of "special syntax". `?Sized` is technically a "bound", but `?Sized` is specialized syntax that _only_ works with `Sized`, and no other Trait.
* Replace "constant size" with "sized".
2016-05-20 17:47:34 -07:00
Alex Burka
b9d1e76252 update tracking issue for once_poison
The tracking issue for once_poison was noted as #31688 which was closed, so it now points to the new #33577.
2016-05-20 20:30:08 -04:00
bors
500e5c15cb Auto merge of #33758 - GuillaumeGomez:rollup, r=Manishearth
Rollup of 6 pull requests

- Successful merges: #33668, #33676, #33683, #33734, #33739, #33745
- Failed merges: #33578
2016-05-20 16:37:01 -07:00
Alex Crichton
5f295f22a7 rustc: Fix again order-dependence in extern crate
Originally fixed in #29961 the bug was unfortunately still present in the face
of crates using `#[macro_use]`. This commit refactors for the two code paths to
share common logic to ensure that they both pick up the same bug fix.

Closes #33762
2016-05-20 14:03:47 -07:00
bors
179539f6eb Auto merge of #33318 - alexcrichton:hashmap-seed, r=aturon
std: Cache HashMap keys in TLS

This is a rebase and extension of #31356 where we not only cache the keys in
thread local storage but we also bump each key every time a new `HashMap` is
created. This should give us a nice speed bost in creating hash maps along with
retaining the property that all maps have a nondeterministic iteration order.

Closes #27243
2016-05-20 12:39:00 -07:00
bors
0352866da7 Auto merge of #33378 - oli-obk:fix/registry_args, r=Manishearth
fix Registry::args for plugins loaded with --extra-plugins

r? @Manishearth
2016-05-20 08:44:01 -07:00
Stefan Schindler
bf8c070bd5 Clarify docs for sort(&mut self) 2016-05-20 17:43:06 +02:00
Felix S. Klock II
f18bafdbe1 Refactor bitslice: distinguish usize for indexing vs word type being indexed. 2016-05-20 17:40:22 +02:00
Aaklo Xu
01da14b149 Fix references links
There are Duplicate link references in the article and the format is incorrect.
2016-05-20 21:55:19 +08:00
Guillaume Gomez
4a3ba87d82 Rollup merge of #33745 - postmodern:patch-1, r=steveklabnik
Clarify wording in `transmute` example

* Change "four eights" to "four u8s"
* Change "a 32" to "a u32"
2016-05-20 15:49:53 +02:00
Guillaume Gomez
c67dae8f6d Rollup merge of #33739 - GuillaumeGomez:error-code-tests, r=Manishearth
Add new error code tests

r? @steveklabnik
2016-05-20 15:49:53 +02:00
Guillaume Gomez
4913e88c00 Rollup merge of #33734 - luqmana:33387-mir_fat_ptr_coerce, r=arielb1
[MIR] Add PointerCast for Unsize casts of fat pointers.

Fixes #33387.

r? @eddyb
2016-05-20 15:49:53 +02:00
Guillaume Gomez
5dc8dfa86f Rollup merge of #33683 - sanxiyn:paren-span, r=nikomatsakis
Preserve span when lowering ExprKind::Paren

Fix #33681.
2016-05-20 15:49:52 +02:00
Guillaume Gomez
f22c5aab1e Rollup merge of #33676 - rkruppe:e0509-exact-words, r=sanxiyn
Reword the short diagnostic for E0509

Saying that a type *implements* a trait is much more idiomatic than saying it *defines* the trait.
2016-05-20 15:49:52 +02:00
Guillaume Gomez
fda31345c1 Rollup merge of #33668 - dns2utf8:catch_thread, r=steveklabnik
Catch thread in example

Since this is an example, the code will be copied by many people and should be over correct.

?r @steveklabnik
2016-05-20 15:49:52 +02:00
Felix S. Klock II
59008cbd71 review feedback: fix some index-mismatch bugs pointed out by arielb1. 2016-05-20 15:44:30 +02:00
ggomez
bbed89b4e5 Update simd syntax 2016-05-20 15:19:34 +02:00
Manish Goregaokar
9ce018bafb
Update tests 2016-05-20 17:44:31 +05:30
Felix S. Klock II
581195090a Review feedback.
Removed `BitDenotation: DataflowOperator` relationship.

Alpha-renamed `fn initial_value` to `fn bottom_value`.
2016-05-20 14:14:18 +02:00
Felix S. Klock II
a7e3204ac8 mir::dataflow arielb1 review feedback
* removed `on_all_children_bits`, rewriting calls to use `super::on_all_children_bits`

 * moved `fn path` helper routine out of `impl MirBorrowckCtxtPreDataflow`
2016-05-20 13:40:52 +02:00
bors
55cabda8d5 Auto merge of #33729 - alexcrichton:patch-libbacktrace, r=sfackler
std: Backport a libbacktrace soundness fix

This is a backport of gcc-mirror/gcc@047a1c2f which is a soundness fix for when
a backtrace is generated on executables that do not have debug information.
2016-05-20 04:34:34 -07:00
Felix S. Klock II
9c468f4b65 Added comment pointing out somewhat subtle initialization in fn start_block_effect. 2016-05-20 13:20:33 +02:00
Felix S. Klock II
011c37d59e borrowck::mir: alpha-renamed DropFlagState variant names. 2016-05-20 13:20:00 +02:00
Felix S. Klock II
9fcbe2a2f9 fix comment in impl DataflowOperator for MaybeUninitializedLvals. 2016-05-20 13:18:27 +02:00
Felix S. Klock II
aaad8a209a mir::dataflow::sanity_check: Factor out fn is_rustc_peek helper routine. 2016-05-20 13:18:03 +02:00
Felix S. Klock II
582f060a17 markdown fix suggested during review. 2016-05-20 13:12:02 +02:00
bors
d27bdafc3e Auto merge of #33553 - alexcrichton:cdylibs, r=brson
rustc: Add a new crate type, cdylib

This commit is an implementation of [RFC 1510] which adds a new crate type,
`cdylib`, to the compiler. This new crate type differs from the existing `dylib`
crate type in a few key ways:

* No metadata is present in the final artifact
* Symbol visibility rules are the same as executables, that is only reachable
  `extern` functions are visible symbols
* LTO is allowed
* All libraries are always linked statically

This commit is relatively simple by just plubming the compiler with another
crate type which takes different branches here and there. The only major change
is an implementation of the `Linker::export_symbols` function on Unix which now
actually does something. This helps restrict the public symbols from a cdylib on
Unix.

With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB,
which is some nice size savings!

[RFC 1510]: https://github.com/rust-lang/rfcs/pull/1510

Closes #33132
2016-05-20 00:34:50 -07:00
Steven Fackler
78e06adca7 Mention that the panic hook will always run 2016-05-19 22:35:09 -07:00
bors
cde0fa5f67 Auto merge of #33358 - michaelwoerister:debuginfo-methods, r=eddyb
debuginfo: Make DW_TAG_subroutine DIEs for inherent methods children of their self-type DIEs.

Fixes https://github.com/rust-lang/rust/issues/33192
2016-05-19 20:40:44 -07:00
Daniel Campoverde [alx741]
e614bb70c2 book: ownership: fix typo 2016-05-19 20:14:29 -05:00
Postmodern
d8c086b085 Grammar change 2016-05-19 17:27:04 -07:00
Postmodern
d021d7d7cf Keep line-width within 80 columns 2016-05-19 17:17:17 -07:00
Postmodern
2fd4e604a4 Clarify the English translation of ?Sized
* It wasn't clear whether `?Sized` meant "not `Sized`" or "`Sized` or not `Sized`". According to #rust IRC, it does indeed mean "`Sized` or not `Sized`".
* Use the same language as [Trait std::marker::Sized](https://doc.rust-lang.org/std/marker/trait.Sized.html) about how `Sized` is implicitly bound.
2016-05-19 17:07:29 -07:00
Alex Crichton
eaeef3db0e std: Cache HashMap keys in TLS
This is a rebase and extension of #31356 where we cache the keys in thread local
storage. This should give us a nice speed bost in creating hash maps along with
mostly retaining the property that all maps have a nondeterministic iteration
order.

Closes #27243
2016-05-19 16:58:15 -07:00