Commit Graph

58521 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu decf7598ef rustc: use tcx.at(span) to set the location of a query. 2017-04-24 18:06:39 +03:00
Matt Ickstadt feae5a08a2 Add Splice forget test 2017-04-24 09:49:29 -05:00
Jessica Hamilton 0d63f13378 Haiku: add missing cases of using LIBRARY_PATH 2017-04-24 14:29:39 +00:00
Eduard-Mihai Burtescu 9bde6b6d96 rustc: expose the common DUMMY_SP query case as tcx methods. 2017-04-24 17:23:43 +03:00
Guillaume Gomez b10c04472b Remove strip prefix 2017-04-24 15:16:52 +02:00
Guillaume Gomez bd880bc6bf Add tests for module suggestions 2017-04-24 15:16:52 +02:00
Guillaume Gomez e482529022 Fix invalid module suggestion 2017-04-24 15:14:15 +02:00
Guillaume Gomez 3ad844cfe2 Add more explanation on RefCell::get_mut 2017-04-24 15:08:39 +02:00
Eduard-Mihai Burtescu 612bb1f54e rustc: rename some of the queries to match tcx methods. 2017-04-24 15:20:52 +03:00
steveklabnik f852e3fcbc use the word 'length' in Vec::len's docs
Fixes #37866
2017-04-24 07:47:05 -04:00
Gianni Ciccarelli b0fca5f790 support `default impl` for specialization
rebase after support for llvm-3.7
2017-04-24 10:08:48 +00:00
Gianni Ciccarelli 6427fdce7a support `default impl` for specialization
fix tidy
2017-04-24 10:08:48 +00:00
Gianni Ciccarelli 116e9831a5 support `default impl` for specialization
this commit implements the first step of the `default impl` feature:
all items in a `default impl` are (implicitly) `default` and hence
specializable.
In order to test this feature I've copied all the tests provided for the
`default` method implementation (in run-pass/specialization and
compile-fail/specialization directories) and moved the `default` keyword
from the item to the impl.
See referenced issue for further info
2017-04-24 10:08:48 +00:00
Without Boats 5dc43d272d Feature gate in test. 2017-04-24 02:42:36 -07:00
Without Boats 95ffda1e9e Style. 2017-04-24 01:40:17 -07:00
Without Boats ed5d09d8f3 Fix type error. 2017-04-24 01:20:36 -07:00
Without Boats bd31498ef6 Add compile-fail test. 2017-04-24 01:19:12 -07:00
Without Boats 86b10671db Associated consts are not object safe. 2017-04-23 22:00:09 -07:00
Scott McMurray f8c6436173 Step::replace_one should put a one, not a zero (Issue #41492)
Turns out all six of these impls are incorrect.
2017-04-23 21:47:09 -07:00
Matt Ickstadt 7b86ba0d8d Add splice to the unstable book. 2017-04-23 21:23:50 -05:00
Matt Ickstadt c3baa8c0a7 Use Vec::splice impl in string::Splice::drop() 2017-04-23 21:23:50 -05:00
Matt Ickstadt cec00bab1d Improve splice docs and tests 2017-04-23 21:23:50 -05:00
Matt Ickstadt b85e2e4735 Update splice impl 2017-04-23 21:23:45 -05:00
Simon Sapin 2111aff682 Add Vec::splice and String::splice 2017-04-23 19:19:38 -05:00
bors 15ce54096a Auto merge of #41486 - arielb1:select-where, r=eddyb
traits::select: quickly filter out predicates from other traits

this improves most pre-trans passes's performance by ~1%.

That missed the spring cleaning PR because I wanted to ship it.

r? @eddyb
2017-04-23 23:06:50 +00:00
Ariel Ben-Yehuda d3476f4b76 cache ADT dtorck results
This avoids visiting the fields of all structs multiple times, improving
item-bodies checking time by 10% (!).
2017-04-23 23:09:21 +03:00
Ariel Ben-Yehuda eadb049799 traits::select: quickly filter out predicates from other traits
this improves most pre-trans passes's performance by ~1%.
2017-04-23 23:05:25 +03:00
Tim Neumann 8994277657 FIN: windows-gnu: statically link gcc_s, pthread with llvm 2017-04-23 22:00:03 +02:00
Tim Neumann f3dda17469 FIN: Compile LLVM with -fno-omit-frame-pointer on 32bit MinGW builds
to work around an apparently bad optimization.
2017-04-23 22:00:03 +02:00
Tim Neumann 6723e69a54 FIN: ignore failing test on emscripten, see #41299 2017-04-23 22:00:02 +02:00
Tim Neumann 5ae4a58c33 FIN: build comiler-rt wihout Thumb on arm 2017-04-23 22:00:02 +02:00
Tim Neumann a146431e4c FIN: disable backtrace printing for panic-runtime/abort* on ARM 2017-04-23 22:00:02 +02:00
Tim Neumann a0ce63be2b FIN: update emscripten builder 2017-04-23 22:00:01 +02:00
Tim Neumann f622542b64 FIN/CRT: adopt all applicable rust compiler-rt patches 2017-04-23 22:00:01 +02:00
Tim Neumann aaa307ce47 FIN/LLVM: new rust patches required for 4.0 2017-04-23 22:00:01 +02:00
Tim Neumann 4fcfab16d3 FIN/LLVM: adopt all applicable rust llvm patches 2017-04-23 22:00:01 +02:00
Tim Neumann 167b7eb8b5 FIN: update to upstream (llvm 4.0.1 + fastcomp 1.37.10) & compiler-rt 4.0 2017-04-23 22:00:00 +02:00
Ariel Ben-Yehuda 5412587910 clean-up adt_sized_constraint now that it uses on-demand 2017-04-23 14:37:18 +03:00
Eduard-Mihai Burtescu 8054377f8f rustc_const_eval: support all unit enum variants. 2017-04-23 11:11:57 +03:00
Eduard-Mihai Burtescu 0ff828baa0 rustc_const_eval: CallOn isn't needed, typeck/const-qualif handle those cases. 2017-04-23 11:11:56 +03:00
Eduard-Mihai Burtescu e22873d912 rustc: make the const-eval cache polymorphic. 2017-04-23 11:11:54 +03:00
bors a94124488a Auto merge of #41437 - cuviper:remove-unstable-deprecated, r=alexcrichton
Remove items that are unstable and deprecated

This removes unstable items that have been deprecated for more than one cycle.

- Since 1.16.0, `#![feature(enumset)]`
    - All of `mod collections::enum_set`
- Since 1.15.0, `#![feature(borrow_state)]`
    - `cell::BorrowState`
    - `RefCell::borrow_state()`
- Since 1.15.0, `#![feature(is_unique)]`
    - `Rc::is_unique()` (made private like `Arc::is_unique()`)
- Since 1.15.0, `#![feature(rc_would_unwrap)]`
    - `Rc::would_wrap()`
- Since 1.13.0, `#![feature(binary_heap_extras)]`
    - `BinaryHeap::push_pop()`
    - `BinaryHeap::replace()`
- Since 1.12.0, `#![feature(as_unsafe_cell)]`
    - `Cell::as_unsafe_cell()`
    - `RefCell::as_unsafe_cell()`
- Since 1.12.0, `#![feature(map_entry_recover_keys)]`
    - `btree_map::OccupiedEntry::remove_pair()`
    - `hash_map::OccupiedEntry::remove_pair()`
- Since 1.11.0, `#![feature(float_extras)]`
    - `Float::nan()`
    - `Float::infinity()`
    - `Float::neg_infinity()`
    - `Float::neg_zero()`
    - `Float::zero()`
    - `Float::one()`
    - `Float::integer_decode()`
    - `f32::integer_decode()`
    - `f32::ldexp()`
    - `f32::frexp()`
    - `f32::next_after()`
    - `f64::integer_decode()`
    - `f64::ldexp()`
    - `f64::frexp()`
    - `f64::next_after()`
- Since 1.11.0, `#![feature(zero_one)]`
    - `num::Zero`
    - `num::One`
2017-04-23 02:13:55 +00:00
Corey Farwell 13d2534fd3 Remove unused import. 2017-04-22 22:13:22 -04:00
bors 252d3da8a6 Auto merge of #41469 - arielb1:rustc-spring-cleaning, r=eddyb
Performance audit, Spring 2017

Fix up some quite important performance "surprises" I've found running callgrind on rustc.
2017-04-22 20:07:01 +00:00
Ariel Ben-Yehuda a660ad84b3 bail out of selection when there are multiple surviving candidates
In some cases (e.g. <[int-var] as Add<[int-var]>>), selection can turn up
a large number of candidates. Bailing out early avoids O(n^2) performance.

This improves item-type checking time by quite a bit, resulting in ~2% of total
time-to-typeck.
2017-04-22 21:02:50 +03:00
Ariel Ben-Yehuda a0f145ba8c add a cache to impl_polarity
this is another one of these things that looks *much* worse on valgrind.
2017-04-22 21:02:41 +03:00
Ariel Ben-Yehuda 81af6fb67c allocate less strings in `symbol_names`
this improves trans performance by *another* 10%.
2017-04-22 21:02:02 +03:00
Ariel Ben-Yehuda 266d36f3b1 weak_lang_items: check for `lang` attribute before calling `value_str`
improves trans performance by *another* 10%.
2017-04-22 21:00:50 +03:00
Ariel Ben-Yehuda ece6c8434b cache attributes of items from foreign crates
this avoids parsing item attributes on each call to `item_attrs`, which takes
off 33% (!) of translation time and 50% (!) of trans-item collection time.
2017-04-22 21:00:50 +03:00
Ariel Ben-Yehuda acd0e40b86 short-cut SharedCrateContext::layout_of
That method is *incredibly* hot, so this ends up saving 10% of trans
time.

BTW, we really should be doing dependency tracking there - and possibly be
taking the respective perf hit (got to find a way to make DTMs fast), but
`layout_cache` is a non-dep-tracking map.
2017-04-22 21:00:50 +03:00
Ariel Ben-Yehuda e1377a4f47 avoid calling `mk_region` unnecessarily
this improves typeck & trans performance by 1%. This looked hotter on
callgrind than it is on a CPU.
2017-04-22 21:00:50 +03:00
Ariel Ben-Yehuda 3bf00450cb remove cleanup branches to the resume block
This improves LLVM performance by 10% lost during the shimmir transition.
2017-04-22 21:00:50 +03:00
bors cb4065b9ce Auto merge of #41431 - GuillaumeGomez:hoedown-default, r=aturon
Re-enable hoedown by default

r? @rust-lang/docs

cc @aturon
2017-04-22 17:37:04 +00:00
bors 9cc77d7690 Auto merge of #41464 - frewsxcv:rollup, r=frewsxcv
Rollup of 3 pull requests

- Successful merges: #41077, #41355, #41450
- Failed merges:
2017-04-22 14:17:36 +00:00
Corey Farwell e282817186 Rollup merge of #41355 - nikomatsakis:incr-comp-refactor-trans-2, r=eddyb
Refactor trans some more to pave way for incremental compilation

Various refactorings paving the way for the newer approach to incremental compilation (And, in particular, to "query-ifying" trans). My partial goal is to remove `SharedCrateContext`; this PR gets about as far as I can easily get before starting to really want the red/green algorithm.

r? @eddyb
cc @michaelwoerister
2017-04-22 09:02:57 -04:00
Corey Farwell 5e1351b17b Rollup merge of #41077 - petrochenkov:boundparen, r=nikomatsakis
syntax: Support parentheses around trait bounds

An implementation for https://github.com/rust-lang/rust/issues/39318#issuecomment-290956826

r? @nikomatsakis
2017-04-22 09:02:56 -04:00
Guillaume Gomez 9c97882055 Fix line display 2017-04-22 14:56:36 +02:00
bors 6d841da4a0 Auto merge of #39999 - bitshifter:struct_align, r=eddyb
Implementation of repr struct alignment RFC 1358.

The main changes around rustc::ty::Layout::struct:
* Added abi_align field which stores abi alignment before repr align is applied
* align field contains transitive repr alignment
* Added padding vec which stores padding required after fields

The main user of this information is rustc_trans::adt::struct_llfields
which determines the LLVM fields to be used by LLVM, including padding
fields.

A possible future optimisation would be to put the padding Vec in an Option, since it will be unused unless you are using repr align.
2017-04-22 11:50:40 +00:00
Guillaume Gomez 91fb6bc1eb Fix tests 2017-04-22 13:25:14 +02:00
Guillaume Gomez d79b511f5c Fix invalid linkage 2017-04-22 13:25:14 +02:00
Guillaume Gomez 295f25b198 Set hoedown to generate error index 2017-04-22 13:25:14 +02:00
Guillaume Gomez 80a2a94d5a Re-enable hoedown by default 2017-04-22 13:25:14 +02:00
Corey Farwell df72158d47 Rollup merge of #41435 - estebank:issue-33884, r=nikomatsakis
Add test for issue 33884

Fix #33884.

r=nikomatsakis
2017-04-21 23:29:15 -04:00
Corey Farwell 48a9d5f6d3 Rollup merge of #41432 - abonander:issue_41211, r=jseyfried
Don't panic if an attribute macro fails to resolve at crate root

Adds temporary regression test; this ideally should work as-is (#41430)

Closes #41211

r? @jseyfried
2017-04-21 23:29:15 -04:00
Corey Farwell aff40e2de3 Rollup merge of #41405 - GuillaumeGomez:rustdoc-warning-improvement, r=steveklabnik
Fix line display for hoedown

Fixes #41401.

r? @rust-lang/docs
2017-04-21 23:29:14 -04:00
Corey Farwell 5da19f2b69 Rollup merge of #37658 - GuillaumeGomez:ref_suggestion, r=nikomatsakis,eddyb
Ref suggestion
2017-04-21 23:29:13 -04:00
Jessica Hamilton e1afddc29c Haiku: fix initial platform support 2017-04-22 13:47:36 +12:00
Niko Matsakis 6d86f81eb1 move the uses of the trans caches into rustc::traits
This makes these routines more readily available for other bits of
code. It also will help when refactoring.
2017-04-21 21:02:14 -04:00
Cameron Hart 946f8e6a59 Use primitive align for tagged enum fill.
Hopefully will fix assert on ARM where vector types are being used as
the fill type for enums containing repr aligned types greater than the
largest possible native type, thus don't match the Layout's alignment
and triggers an assert.
2017-04-22 09:38:23 +10:00
Niko Matsakis 85527456e8 use Symbol/InternedString in the cache 2017-04-21 17:26:53 -04:00
Niko Matsakis f4c183b742 move the trans trait caches into tcx
Arguably these could become custom queries, but I chose not to do that
because the relationship of queries and trait system is not yet fleshed
out enough. For now it seems fine to have them be `DepTrackingMap` using
the memoize pattern.
2017-04-21 17:26:53 -04:00
Niko Matsakis e48a759f51 sort `provide` 2017-04-21 17:26:53 -04:00
Niko Matsakis 264f237f98 make `reachable_set` ref-counted
Once it is computed, no need to deep clone the set.
2017-04-21 17:26:53 -04:00
Niko Matsakis c446cb086b just take `tcx` where we can
The more we can things dependent on just tcx, the easier it will
be to make queries etc later on.
2017-04-21 17:26:53 -04:00
Niko Matsakis 39a58c38a0 introduce the rather simpler symbol-cache in place of symbol-map
The symbol map is not good for incremental: it has inputs from every fn
in existence, and it will change if anything changes. One could imagine
cheating with the symbol-map and exempting it from the usual dependency
tracking, since the results are fully deterministic. Instead, I opted to
just add a per-CGU cache, on the premise that recomputing some symbol
names is not going to be so very expensive.
2017-04-21 17:26:53 -04:00
Niko Matsakis 4c31750cd9 remove `translation_items` from `SharedCrateContext`
If we are going to hash `SharedCrateContext`, we don't want a list of
things that pertain to **every CGU** in there.
2017-04-21 17:26:53 -04:00
Niko Matsakis 8289e5a73e introduce `is_foreign_item` query
This may seem like overkill, but it's exactly what we want/need for
incremental compilation I think. In particular, while generating code
for some codegen unit X, we can wind up querying about any number of
external items, and we only want to be forced to rebuild X is some of
those changed from a foreign item to otherwise. Factoring this into a
query means we would re-run only if some `false` became `true` (or vice
versa).
2017-04-21 17:26:53 -04:00
Guillaume Gomez 7ce1eb77c7 Update ui test 2017-04-21 22:58:15 +02:00
Vadim Petrochenkov 8838cd10f2 Move parse_remaining_bounds into a separate function 2017-04-21 21:32:44 +03:00
Vadim Petrochenkov 6e75def7db Fix issue with single question mark or paren 2017-04-21 21:32:44 +03:00
Vadim Petrochenkov e038f58105 syntax: Support parentheses around trait bounds 2017-04-21 21:32:44 +03:00
bors 1785bca513 Auto merge of #41445 - frewsxcv:rollup, r=frewsxcv
Rollup of 4 pull requests

- Successful merges: #41372, #41376, #41426, #41429
- Failed merges:
2017-04-21 16:36:41 +00:00
Guillaume Gomez 7d3284ebc1 Create a new method to run coercion inside probe 2017-04-21 16:13:26 +02:00
bors 5695c3e943 Auto merge of #41349 - eddyb:ty-contents, r=nikomatsakis
rustc: replace TypeContents with two independent properties (is_freeze / needs_drop).

`InteriorUnsafe` / `interior_unsafe` was replaced with a private lang-item `Freeze` auto trait in libcore.

`OwnsDtor` / `needs_drop` was replaced with a specialized traversal that *doesn't* avoid caching results in case of a cycle, as the only cycles left can only occur in erroneous "types with infinite sizes", references and raw pointers not having destructors. Also, `Copy` is now checked at every step of the recursion.

r? @nikomatsakis
2017-04-21 14:02:37 +00:00
Eduard-Mihai Burtescu 89bd3f39ca Update #[no_core] users with the "freeze" lang item. 2017-04-21 15:48:35 +03:00
Corey Farwell d5bbeb1a0a Rollup merge of #41426 - malbarbo:android-x86_64, r=alexcrichton
Add x86_64-linux-android target
2017-04-21 08:40:35 -04:00
Corey Farwell d983256f36 Rollup merge of #41376 - mbrubeck:docs, r=frewsxcv
Expanded docs and examples for PathBuf::file_name and friends

This addresses some common surprises when `PathBuf::set_file_name` is called on the path of a directory rather than a file.

r? @steveklabnik
2017-04-21 08:40:34 -04:00
Corey Farwell cf11d3c66a Rollup merge of #41372 - nbigaouette:master, r=alexcrichton
Use an (over-writable) environment variable for the `gdb` command

Instead of hard-coding the command to run, using the environment
variable `GDB_CMD` (that defaults to `gdb`) allows using a different
debugger than the default `gdb` executable.

This gives the possibility to use `cgdb` as the debugger, which provides
a nicer user interface. Note that one has to use `GDB_CMD="cgdb --"` to
use cgdb (note the trailing `--`) to let cgdb pass the proper arguments
to `gdb`.
2017-04-21 08:40:33 -04:00
Guillaume Gomez 8fe3a9a8f1 Update tests 2017-04-21 12:28:24 +02:00
Guillaume Gomez d360091e79 Add suggestion for & coercions 2017-04-21 12:28:24 +02:00
Tobias Bucher c49d0906da Specify behavior of `write_all` for `ErrorKind::Interrupted` errors
Also spell out that read and write operations should be retried on
`ErrorKind::Interrupted` errors.

Fixes #38494.
2017-04-21 10:32:13 +02:00
bors 4ed95009d8 Auto merge of #41245 - estebank:multiline-trim, r=nikomatsakis
Reduce visual clutter of multiline start when possible

When a span starts on a line with nothing but whitespace to the left,
and there are no other annotations in that line, simplify the visual
representation of the span.

Go from:

```rust
error[E0072]: recursive type `A` has infinite size
 --> file2.rs:1:1
  |
1 |   struct A {
  |  _^ starting here...
2 | |     a: A,
3 | | }
  | |_^ ...ending here: recursive type has infinite size
  |
```

To:

```rust
error[E0072]: recursive type `A` has infinite size
 --> file2.rs:1:1
  |
1 | / struct A {
2 | |     a: A,
3 | | }
  | |_^ recursive type has infinite size
```

Re: #38246.

r? @nikomatsakis CC @jonathandturner
2017-04-21 06:59:25 +00:00
Josh Stone c1aaa60d8d Remove float_extras
[unstable, deprecated since 1.11.0]
2017-04-20 21:16:31 -07:00
Josh Stone c903ac64e5 Remove num::{Zero,One}
[unstable, deprecated since 1.11.0]
2017-04-20 21:16:31 -07:00
Josh Stone 313aab8fbe Remove RefCell::borrow_state
[unstable, deprecated since 1.15.0]
2017-04-20 21:16:31 -07:00
Josh Stone cc605c895e Remove {Cell,RefCell}::as_unsafe_cell
[unstable, deprecated since 1.12.0]
2017-04-20 21:16:31 -07:00
Josh Stone f0c5e8b8fc Privatize Rc::is_unique
[unstable, deprecated since 1.15.0]
2017-04-20 21:16:31 -07:00
Josh Stone f4aaae9bdb Remove Rc::would_wrap
[unstable, deprecated since 1.15.0]
2017-04-20 21:16:31 -07:00
Josh Stone df86cecdd2 Remove OccupiedEntry::remove_pair
[unstable, deprecated since 1.12.0]
2017-04-20 21:16:31 -07:00
Josh Stone a724ff90e7 Remove BinaryHeap::{push_pop,replace}
[unstable, deprecated since 1.13.0]
2017-04-20 21:16:31 -07:00
Josh Stone a76274e533 Remove EnumSet
[unstable, deprecated since 1.16.0]
2017-04-20 21:16:31 -07:00
Esteban Küber cc07c357e4 Reduce visual clutter of multiline start when possible
When a span starts on a line with nothing but whitespace to the left,
and there are no other annotations in that line, simplify the visual
representation of the span.

Go from:

```rust
error[E0072]: recursive type `A` has infinite size
 --> file2.rs:1:1
  |
1 |   struct A {
  |  _^ starting here...
2 | |     a: A,
3 | | }
  | |_^ ...ending here: recursive type has infinite size
  |
```

To:

```rust
error[E0072]: recursive type `A` has infinite size
 --> file2.rs:1:1
  |
1 | / struct A {
2 | |     a: A,
3 | | }
  | |_^ recursive type has infinite size
```

Remove `starting here...`/`...ending here` labels from all multiline
diagnostics.
2017-04-20 17:31:20 -07:00
Esteban Küber 903bdfccd0 Add test for issue 33884
Fix #33884
2017-04-20 17:06:39 -07:00
Esteban Küber cd60307acb Do not show `::constructor` on tuple struct diagnostics 2017-04-20 17:00:40 -07:00
bors 535ee6c7f0 Auto merge of #41342 - GuillaumeGomez:btree-debug-infinite, r=alexcrichton
Fix debug infinite loop

Fixes #41338.
2017-04-20 23:40:06 +00:00
Austin Bonander 910532ea45 Don't panic if an attribute macro fails to resolve at crate root
Adds temporary regression test; this ideally should work as-is (#41430)

Closes #41211
2017-04-20 16:13:13 -07:00
Cameron Hart c219cdfa11 Removed sizing parameter from struct_llfields. 2017-04-21 07:37:10 +10:00
Cameron Hart 7971a47eff Added feature gate, updated error messages and tests. 2017-04-21 07:37:10 +10:00
Cameron Hart 4358e35fda Implementation of repr struct alignment RFC 1358.
The main changes around rustc::ty::Layout::struct and rustc_trans:adt:
* Added primitive_align field which stores alignment before repr align
* Always emit field padding when generating the LLVM struct fields
* Added methods for adjusting field indexes from the layout index to the
  LLVM struct field index

The main user of this information is rustc_trans::adt::struct_llfields
which determines the LLVM fields to be used by LLVM, including padding
fields.
2017-04-21 07:32:32 +10:00
Marco A L Barbosa 51cc0e38e3 Add x86_64-linux-android target 2017-04-20 16:29:59 -03:00
Matt Brubeck 3b4d34d4fa Expanded docs and examples for PathBuf::file_name and friends 2017-04-20 11:33:05 -07:00
Guillaume Gomez a65461005a Fix line display for hoedown 2017-04-20 20:20:40 +02:00
Corey Farwell 9d918223a8 Rollup merge of #40987 - maccoda:convert-docs, r=steveklabnik
API docs: Convert

Clean up of the convert module documentation following points in #29349
2017-04-20 13:33:13 -04:00
Corey Farwell 83e22b8b24 Rollup merge of #40812 - mgattozzi:ChildDocs, r=steveklabnik
Update `Child` docs to not have a note section

In #29370 it's noted that for "the Note shouldn't be one, and should come before
the examples." This commit changes the positioning of the section and removes
wording that said take note in order for it to flow better with the surrounding
text and it's new position.
2017-04-20 13:33:12 -04:00
Marco A L Barbosa 416d6b73df Update libc to include x86_64-linux-android support 2017-04-20 13:59:41 -03:00
Nicolas Bigaouette 61b7ebe7d3 Rename environment variable `GDB_CMD` to `RUST_GDB` to prevent ambiguity 2017-04-20 11:20:33 -04:00
bors 968ae7babe Auto merge of #41191 - seanmonstar:spec-extend-vec-intoiter, r=alexcrichton
specialize Extend for Vec with IntoIter

Before, `vec.extend(&other_vec)` was quite a bit faster than `vec.extend(other_vec)`. This allows extending by consuming a vec to use the same code as extending from a slice.
2017-04-20 13:08:07 +00:00
Eduard-Mihai Burtescu 0adfd810f8 rustc: combine type_needs_drop_given_env and may_drop into needs_drop. 2017-04-20 14:44:43 +03:00
Eduard-Mihai Burtescu 9ad3b94847 rustc: replace TypeContents::needs_drop with Ty::may_drop. 2017-04-20 14:39:31 +03:00
Eduard-Mihai Burtescu 6563374ed2 rustc: replace interior_unsafe with a Freeze trait. 2017-04-20 14:39:31 +03:00
Eduard-Mihai Burtescu 3f5c311dc1 rustc: simplify TypeContents drastically. 2017-04-20 14:39:30 +03:00
Corey Farwell 204243fcac Rollup merge of #41390 - scottmcm:toowned-clone-into, r=alexcrichton
Override ToOwned::clone_into for Path and OsStr

The only non-overridden one remaining is the CStr impl, which cannot
be optimized as doing so would break CString's second invariant.

Follow-up to 7ec27ae (PR #41009).

r? @alexcrichton
2017-04-20 01:39:56 -04:00
Corey Farwell 1b7e6c3898 Rollup merge of #41378 - eddyb:byval-is-not-like-sret, r=arielb1
rustc_trans: do not treat byval as using up registers.

Perhaps not that well-documented, `byval` pointer arguments *are not* the same as pointer arguments used by pass-by-ref, but rather the pointer is only used by LLVM to pass the *contents* on the stack.

Fixes #41375.
2017-04-20 01:39:56 -04:00
Corey Farwell 348d66c73f Rollup merge of #41377 - nikomatsakis:issue-41298-ICE-inference, r=eddyb
Fix ICE building gluon_vm

The problem was due to various places we were failing to propagate obligations. I think I got them mostly correct, but I didn't get around to writing test cases for each case.

r? @eddyb or @arielb1
2017-04-20 01:39:55 -04:00
Corey Farwell 1987fc1019 Rollup merge of #41369 - cuviper:arm-stage0, r=alexcrichton
Bump stage0 to fix ARM LLVM

There was a serious ARM codegen bug in LLVM that was fixed by #40779,
also backported to beta.  This updates stage0 to 1.17.0-beta.3 to pick
up that change, so ARM can bootstrap natively again.

Fixes #41291
cc @arielb1
2017-04-20 01:39:54 -04:00
Corey Farwell 236978e411 Rollup merge of #41214 - estebank:less-multiline, r=petrochenkov
Add a way to get shorter spans until `char` for pointing at defs

```rust
error[E0072]: recursive type `X` has infinite size
  --> file.rs:10:1
   |
10 | struct X {
   | ^^^^^^^^ recursive type has infinite size
   |
   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `X` representable
```

vs

```rust
error[E0072]: recursive type `X` has infinite size
  --> file.rs:10:1
   |
10 |   struct X {
   |  _^ starting here...
11 | |     x: X,
12 | | }
   | |_^ ...ending here: recursive type has infinite size
   |
   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `X` representable
```

Re: #35965,  #38246. Follow up to #38328.

r? @jonathandturner
2017-04-20 01:39:53 -04:00
Corey Farwell 80fa79821a Rollup merge of #41391 - durka:patch-40, r=petrochenkov
remove disclaimer from bootstrap/README.md
2017-04-19 21:55:40 -04:00
Corey Farwell 16710bea14 Rollup merge of #41380 - ollie27:stability, r=BurntSushi
Fix a few stability attributes

These show up in rustdoc so need to be correct.
2017-04-19 21:55:39 -04:00
Corey Farwell 5eab9ba471 Rollup merge of #41374 - steveklabnik:update-mdbook, r=frewsxcv
update mdbook

Ship some more improvements.

r? @rust-lang/docs
2017-04-19 21:55:38 -04:00
Corey Farwell e1168da5e3 Rollup merge of #41348 - lukaramu:std-path-docs, r=frewsxcv
Improve std::path docs

Fixes #29368.

This PR contains a pretty significant redistribution of some of the module docs to more appropriate places, as well as general expansion, clarification, and additional examples.

For more details, see the commit descriptions.

r? @steveklabnik
2017-04-19 21:55:37 -04:00
Corey Farwell a97309d8c8 Rollup merge of #41295 - frewsxcv:frewsxcxv-unstability, r=steveklabnik
Add top level sections to the Unstable Book.

Prior to this commit, the contents of the Unstable Book were assumed to
be unstable features. This commit moves features into 'language features'
or 'library features' subsections. It also moves the 'linker_flavor'
compiler flag into a new 'Compiler Flags' subsection.

Even though it was helpful, I removed the tidy check that
cross-references the SUMMARY.md links with the Unstable Book directory
contents just because it would be difficult to maintain.

Relevant PR: https://github.com/rust-lang/rust/issues/41142.
2017-04-19 21:55:36 -04:00
Sean McArthur f85a5337ab specialize Extend for Vec with IntoIter 2017-04-19 11:57:29 -07:00
Michael Gattozzi df383b9547
Fix link for wait 2017-04-19 14:00:50 -04:00
Guillaume Gomez a850cdcb7e Fix debug infinite loop 2017-04-19 18:50:01 +02:00
Corey Farwell 2e2a670073 Remove platform-specific directory separator. 2017-04-19 12:42:07 -04:00
Niko Matsakis 93e10977d8 propagate other obligations that were left out
cc #32730 -- I left exactly one instance where I wasn't sure of the
right behavior.
2017-04-19 07:20:36 -04:00
Niko Matsakis aa6c2b1cb7 propagate obligations during overlap check 2017-04-19 07:20:36 -04:00
bors 452bf0852e Auto merge of #41354 - alexcrichton:tool-no-debug, r=aturon
Disable debuginfo when compiling tools

Currently the Cargo binary has jumped from 14M to 34M on the beta channel, which
appears to be due to the fact that we're compiling tools with debug information
inside them. This additionally means that the `rls` binary is 62M right now!

This wasn't an intentional change, so be sure to disable debuginfo when
compiling tools as it's just intended for the standard library and compile for
now.
2017-04-19 11:07:08 +00:00
bors 467aaab50e Auto merge of #41325 - eddyb:isolate-snapshots-for-good, r=arielb1
Ban registering obligations during InferCtxt snapshots.

Back in #33852, a flag was added to `InferCtxt` to prevent rolling back a snapshot if obligations were added to some `FulfillmentContext` during the snapshot, to prevent leaking fresh inference variables (created during that snapshot, so their indices would get reused) in obligations, which could ICE or worse.

But that isn't enough in the long run, as type-checking ends up relying on success implying that eager side-effects are fine, and while stray obligations *do* get caught nowadays, those errors prevent, e.g. the speculative coercions from #37658, which *have to* be rolled back *even* if they succeed.

We can't just allow those obligations to stay around though, because we end up, again, in ICEs or worse.
Instead, this PR modifies `lookup_method_in_trait_adjusted` to return `InferOk` containing the obligations that `Autoderef::finalize_as_infer_ok` can propagate to deref coercions.

As there shouldn't be *anything* left that registers obligations during snapshots, it's completely banned.

r? @nikomatsakis @arielb1
2017-04-19 08:40:27 +00:00
bors 5f22d46e4b Auto merge of #41170 - Nashenas88:master, r=alexcrichton
Use the existing path when removing the prefix fails

This allows the use of out-of-tree paths to be specified. I found this while trying to build with a modified version of `rls-data`, which is currently pointing to a version on crates.io.

cc @alexcrichton

Also, it wasn't clear if I needed to add a test for this (or how). I didn't see any tests that took paths into consideration.
2017-04-19 05:54:23 +00:00
Alex Burka d6b8d9f75d remove disclaimer from bootstrap/README.md 2017-04-19 01:45:34 -04:00
Scott McMurray 295bcdb715 Override ToOwned::clone_into for Path and OsStr
The only non-overridden one remaining is the CStr impl, which cannot
be optimized as doing so would break CString's second invariant.
2017-04-18 21:02:18 -07:00
bors 84be2df0e9 Auto merge of #41236 - cengizIO:master, r=nikomatsakis
Move E0101 and E0102 logic into new E0282 mechanism #40013

Hello there!

## What's this?
Previously, me and @nikomatsakis worked on error messages of uninferred locals. (#38812)

This aims to build up on that by moving certain type checks from `writeback`.

With this, `E0101` and `E0102` errors are getting obsoleted and no longer thrown.

They're replaced with customized versions of `E0282`s instead.

## Sample Error Messages

#### `E0101` is getting converted into:
```rust
error[E0282]: type annotations needed
 --> test.rs:2:14
  |
2 |     let x = |_| {};
  |              ^ consider giving this closure parameter a type

error: aborting due to previous error
```

#### `E0102` is getting converted into:
```rust
error[E0282]: type annotations needed
 --> test.rs:2:9
  |
2 |     let x = [];
  |         ^
  |         |
  |         consider giving `x` a type
  |         cannot infer type for `[_; 0]`

error: aborting due to previous error
```

## Annoyances
- I think we need to change our way of type name resolving in relevant places, because that `[_; 0]` looks horrible IMHO.
- I'm not terribly happy with the note ordering of errors. So please do point to code that might help me accomplish this.

## Tests
Tests of `E0101` and `E0102` are getting converted from `compile-fail` to `ui` tests.

## Documentation
Please help me with documentation update. There are some confusing places that needed an update but I'm not sure if I did the right ones.

Please do comment on messages, layouts and other details.

## Appreciation
Huge thanks goes to @nikomatsakis for being a patient and humble mentor along this long journey. 🍻
2017-04-19 01:27:08 +00:00
Corey Farwell bf202c880c Bump book and reference. 2017-04-18 21:26:10 -04:00
Corey Farwell fea3576633 Add top level sections to the Unstable Book.
Prior to this commit, the contents of the Unstable Book were assumed to
be unstable features. This commit moves features into 'language features'
or 'library features' subsections. It also moves the 'linker_flavor'
compiler flag into a new 'Compiler Flags' subsection.

Even though it was helpful, I removed the tidy check that
cross-references the SUMMARY.md links with the Unstable Book directory
contents just because it would be difficult to maintain.

Relevant PR: https://github.com/rust-lang/rust/issues/41142.
2017-04-18 21:26:09 -04:00
Eduard-Mihai Burtescu cba0c6ad6d rustc_trans: do not treat byval as using up registers. 2017-04-19 02:22:59 +03:00
Oliver Middleton fd325a1b48 Fix a few stability attributes
These show up in rustdoc so need to be correct.
2017-04-18 23:33:38 +01:00
Cengiz Can 3092ac40b6 change note for patterns 2017-04-18 21:43:22 +03:00
Cengiz Can 8b45a21bd1 comment out removed error codes 2017-04-18 21:43:22 +03:00
Cengiz Can 6383de15b1 fixes #40013 2017-04-18 21:43:22 +03:00
Corey Farwell 20718c81de Rollup merge of #41364 - alexcrichton:less-backtrace-prune, r=petrochenkov
std: Back out backtrace pruning logic

It was discovered #40264 that this backtrace pruning logic is a little too
aggressive, so while we figure how out to handle #40264 this commit backs out
the changes to prune frames. Note that other cosmetic changes, such as better
path printing and such remain.
2017-04-18 14:05:46 -04:00
Corey Farwell f448cdff9d Rollup merge of #41361 - arielb1:move-mir-init, r=pnkfelix
lower `move_val_init` during MIR construction

Because of its "magic" order-of-evaluation semantics, `move_val_init` must be lowered during MIR construction in order to work without needing a temporary.

r? @eddyb
2017-04-18 14:05:45 -04:00
Corey Farwell ceaa55ea45 Rollup merge of #41360 - nikomatsakis:incr-comp-issue-40746-visitors, r=eddyb
convert calls to `visit_all_item_likes_in_krate`

We no longer need to track the tasks in these cases since these
particular tasks have no outputs (except, potentially, errors...)  and
they always execute.

cc #40746

r? @eddyb
2017-04-18 14:05:44 -04:00
Corey Farwell ddf4781c1b Rollup merge of #41356 - richo:darwin-no-cputype-hack, r=alexcrichton
bootstrap: Don't workaround uname -m on Darwin

This no longer manifests on any versions of OSX that I could find.

How far back is Rust officially supported? I can try to get copies to test when this behaviour changed.

(Fun fact, at a minimum the comment already lies, since the flag is `-m` :))
2017-04-18 14:05:44 -04:00
Corey Farwell 2e4b0d57ac Rollup merge of #41353 - redox-os:master, r=alexcrichton
Improve Process::spawn with piped stdio on Redox

- Adds `dup2`, and uses it for stdio piping
- Removes `O_CLOEXEC` from piped stdio, as `dup` on Redox does not disable O_CLOEXEC
2017-04-18 14:05:43 -04:00
Corey Farwell 353bdb30e3 Rollup merge of #40290 - 3Hren:master, r=aturon
Add `as_bytes()` for `FromUtf8Error`.

This change allows to obtain an underlying invalid UTF-8 bytes without `FromUtf8Error` destruction. Such method may be useful for example in a library that attempts to save both valid and invalid UTF-8 strings in some struct and to be able to provide immutable access to it without destruction.

Personally without this change I ended with `Result<String, (Vec<u8>, Utf8Error)`, which almost copies the functionality of `FromUtf8Error`, but allows immutable view access.
2017-04-18 14:05:42 -04:00
Nicolas Bigaouette 82ed7830ad Use an (over-writable) environment variable for the `gdb` command
Instead of hard-coding the command to run, using the environment
variable `GDB_CMD` (that defaults to `gdb`) allows using a different
debugger than the default `gdb` executable.

This gives the possibility to use `cgdb` as the debugger, which provides
a nicer user interface. Note that one has to use `GDB_CMD="cgdb --"` to
use cgdb (note the trailing `--`) to let cgdb pass the proper arguments
to `gdb`.
2017-04-18 14:00:08 -04:00
Marco A L Barbosa a42c0257c7 Add bootstrap support for android 2017-04-18 13:50:29 -03:00
Josh Stone 0a69bf4cdd Bump stage0 to fix ARM LLVM
There was a serious ARM codegen bug in LLVM that was fixed by #40779,
also backported to beta.  This updates stage0 to 1.17.0-beta.3 to pick
up that change, so ARM can bootstrap natively again.

Fixes #41291
cc @arielb1
2017-04-18 08:57:56 -07:00
steveklabnik 43d92bb585 update mdbook 2017-04-18 11:41:07 -04:00
Alex Crichton e46a8bde3c std: Back out backtrace pruning logic
It was discovered #40264 that this backtrace pruning logic is a little too
aggressive, so while we figure how out to handle #40264 this commit backs out
the changes to prune frames. Note that other cosmetic changes, such as better
path printing and such remain.
2017-04-18 06:49:39 -07:00
lukaramu d6f7577279 Fix typos in std::path's docs
* Closed an unclosed paren
* seperator -> separator
* deperator -> separator
2017-04-18 15:03:41 +02:00
Niko Matsakis c8427831ea update `dep-graph-struct-signature` test case
the `CollectItem` task no longer exists
2017-04-18 08:22:52 -04:00
Niko Matsakis 8388772f42 kill a bunch of one off tasks 2017-04-18 08:20:12 -04:00
Ariel Ben-Yehuda ed3810bf5e lower `move_val_init` during MIR construction
Because of its "magic" order-of-evaluation semantics, `move_val_init`
must be lowered during MIR construction in order to work.
2017-04-18 15:09:11 +03:00
Ariel Ben-Yehuda 3e473b1aaa use Lvalue helper functions in rustc_mir::shim 2017-04-18 15:05:04 +03:00
bors c398efc53f Auto merge of #39271 - est31:add_float_bits, r=BurntSushi
Add functions to safely transmute float to int

The safe subset of Rust tries to be as powerful as possible. While it is very powerful already, its currently impossible to safely transmute integers to floats. While crates exist that provide a safe interface, most prominently the `iee754` crate (which also inspired naming of the added functions), they themselves only use the unsafe `mem::transmute` function to accomplish this task.

Also, including an entire crate for just two lines of unsafe code seems quite wasteful.

That's why this PR adds functions to safely transmute integers to floats and vice versa, currently gated by the newly added `float_bits_conv` feature.

The functions added are no niche case. Not just `ieee754` [currently implements](https://github.com/huonw/ieee754/blob/master/src/lib.rs#L441) float to int transmutation via unsafe code but also the [very popular `byteorder` crate](https://github.com/BurntSushi/byteorder/blob/1.0.0/src/lib.rs#L258). This functionality of byteorder is in turn used by higher level crates. I only give two examples out of many: [chor](a7363ea9aa/src/ser.rs (L227)) and [bincode](f06a4cfcb5/src/serde/reader.rs (L218)).

One alternative would be to manually use functions like pow or multiplication by 1 to get a similar result, but they only work in the int -> float direction, and are not bit exact, and much slower (also, most likely the optimizer will never optimize it to a transmute because the conversion is not bit exact while the transmute is).

Tracking issue: #40470
2017-04-18 11:23:44 +00:00
Niko Matsakis 810e0151af convert calls to `visit_all_item_likes_in_krate`
We no longer need to track the tasks in these cases since these
particular tasks have no outputs (except, potentially, errors...)  and
they always execute.
2017-04-18 07:08:40 -04:00
bors e621e1c73f Auto merge of #41357 - frewsxcv:rollup, r=frewsxcv
Rollup of 3 pull requests

- Successful merges: #41262, #41310, #41344
- Failed merges:
2017-04-18 04:15:13 +00:00
Corey Farwell 8f65bb450f Rollup merge of #41344 - Diggsey:remove-natvis-nbsp, r=alexcrichton
Remove non-breaking spaces from natvis files

Visual studio will see natvis files with non-breaking spaces as invalid XML, and will ignore them.
2017-04-17 23:21:19 -04:00
Corey Farwell 24e8158213 Rollup merge of #41310 - eddyb:demand-const-eval, r=nikomatsakis
[on-demand] Turn monomorphic_const_eval into a proper query, not just a cache.

The error definitions and reporting logic, alongside with `eval_length` were moved to `librustc`.
Both local and cross-crate constant evaluation is on-demand now, but the latter is only used for `enum` discriminants, to replace the manual insertion into the cache which was done when decoding variants.

r? @nikomatsakis
2017-04-17 23:21:18 -04:00
Corey Farwell b8c446eab8 Rollup merge of #41262 - jonhoo:compiler-barrier-rename, r=alexcrichton
Rename compiler_barrier to compiler_fence

This addresses concerns raised following the merge of #41092. Specifically:

> The naming of these seems surprising: the multithreaded functions (and both the single and multithreaded intrinsics themselves) are fences, but this is a barrier. It's not incorrect, but the latter is both inconsistent with the existing functions and slightly confusing with another type in std (e.g., `Barrier`).

`compiler_fence` carries the same semantic implication that this is a compiler-only operation, while being more in line with the fence/barrier concepts already in use in `std`.
2017-04-17 23:21:17 -04:00
Richo Healey 1dbc72b28e bootstrap: Don't workaround uname -m on Darwin
This no longer manifests on any versions of OSX that I could find.
2017-04-17 19:30:18 -07:00
bors 6b2aaaf668 Auto merge of #41340 - eddyb:demand-assoc-defids, r=nikomatsakis
rustc: move associated_item_def_ids to an on-demand query.

r? @nikomatsakis
2017-04-18 01:18:14 +00:00
Alex Crichton e3ad1b58f5 Disable debuginfo when compiling tools
Currently the Cargo binary has jumped from 14M to 34M on the beta channel, which
appears to be due to the fact that we're compiling tools with debug information
inside them. This additionally means that the `rls` binary is 62M right now!

This wasn't an intentional change, so be sure to disable debuginfo when
compiling tools as it's just intended for the standard library and compile for
now.
2017-04-17 18:16:53 -07:00
est31 0c148153f4 Add float_bits_conv to unstable book 2017-04-18 02:55:47 +02:00
est31 873a3b0363 Allow us to remove masking in the future 2017-04-18 02:43:16 +02:00
est31 3993eb4a27 Preserve sNaN payload when converting them to quiet NaNs 2017-04-18 02:43:16 +02:00
est31 fc028b8180 Convert sNaN to quiet NaN instead of returning errors 2017-04-18 02:43:16 +02:00
est31 bdab5cdc63 assert_ne and tracking issue 2017-04-18 02:43:16 +02:00
est31 56760abf3b Add examples heading 2017-04-18 02:43:16 +02:00
est31 82eead0d0b Return Err(()) when trying to convert sNaN representation to float 2017-04-18 02:43:16 +02:00
est31 32a43da68a Add functions to safely transmute float to int 2017-04-18 02:43:16 +02:00
Dylan Maccora 2877a01feb Address review comments 2017-04-18 08:29:05 +10:00
bors 235fe8313f Auto merge of #41282 - arielb1:missing-impl-item, r=petrochenkov
libsyntax/parse: fix missing kind error reporting

Fixes #41161.
Fixes #41239.
2017-04-17 22:22:56 +00:00
lukaramu 32132d9fb6 Expand std::path::Display's docs
Part of #29368.
* Added explanation for why the struct exists
* Added link to where it is created
* Added example
2017-04-17 22:51:12 +02:00
lukaramu 51ca5fe716 Restructure and redistribute std::path's module docs
Part of #29368.
* Added a new summary paragraph about std::path's parsing facilities
* Slightly exanded `Component`'s docs
* removed the now redundant section on component types from the module docs
* moved the section on path normalization during parsing to the docs on
  `Path::components`
* Clarified difference between `Prefix` and `PrefixComponent` in their
  respecive summary sentences
2017-04-17 22:37:27 +02:00
Ariel Ben-Yehuda d648c10e5b libsyntax/parse: improve associated item error reporting
Fixes #41161.
Fixes #41239.
2017-04-17 21:25:35 +03:00
bors 5516bcc458 Auto merge of #41345 - frewsxcv:rollup, r=frewsxcv
Rollup of 3 pull requests

- Successful merges: #41012, #41280, #41290
- Failed merges:
2017-04-17 17:56:29 +00:00
Corey Farwell 07c6295137 Rollup merge of #41290 - GuillaumeGomez:put-back-hoedown, r=steveklabnik
Hoedown big comeback!

```bash
> cargo +local test
   Compiling libc v0.2.20
   Compiling sysinfo v0.3.4 (file:///Users/imperio/rust/sysinfo)
    Finished dev [unoptimized + debuginfo] target(s) in 3.2 secs
     Running target/debug/deps/disk_list-dbd70897f1f7e080

running 1 test
test test_disks ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured

     Running target/debug/deps/sysinfo-8ad11103abdf5941

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

   Doc-tests sysinfo
WARNING: src/sysinfo.rs -  (line 45) test will be run in the next rustdoc version. If it's not supposed to, please update your documentation and make it compliant to common mark specifications.
WARNING: src/sysinfo.rs -  (line 48) test will be run in the next rustdoc version. If it's not supposed to, please update your documentation and make it compliant to common mark specifications.

running 1 test
test src/sysinfo.rs -  (line 14) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
```

r? @rust-lang/docs
2017-04-17 13:26:21 -04:00
Corey Farwell 4ae25a60ba Rollup merge of #41280 - QuietMisdreavus:rustdoc-toc, r=GuillaumeGomez
rustdoc: add a list of headings to the sidebar

It's another misdreavus rustdoc PR, which means it's time for Bikeshed City once again! `:3`

In an effort to aid navigation in long documentation pages, this PR adds a listing of headings to the sidebars of pages where such headings exist. For example, for structs, links to their fields, inherent methods, and trait implementations are available where applicable.

Examples:

* Modules/Crate roots
  ![image](https://cloud.githubusercontent.com/assets/5217170/25019930/1000fa3a-2052-11e7-98ff-ddf5af18b3e6.png)
* Enums
  ![image](https://cloud.githubusercontent.com/assets/5217170/25019954/33497f9e-2052-11e7-88cf-df46f1b3b8a3.png)
* Primitives
  ![image](https://cloud.githubusercontent.com/assets/5217170/25019978/4820bbc6-2052-11e7-8b5a-96a864eb2a5b.png)
* Traits
  ![image](https://cloud.githubusercontent.com/assets/5217170/25020093/bd1bc9f2-2052-11e7-9cd1-00a0ad8007bc.png)
* Structs
  ![image](https://cloud.githubusercontent.com/assets/5217170/25020145/d75206b0-2052-11e7-88cc-9e9525084775.png)

Open questions:

* Right now, these kinds of pages (and also unions) are the only pages that will receive the name header - pages for functions, constants, macros, etc, won't have the corresponding name in their sidebar. Should I print the name regardless and only add table-of-contents links for pages that have them? This would make them match, for example, a struct with no public fields, no methods, and no trait implementations. The latter would still have a "Struct MyStruct" line above the module contents, with no header links to speak of, whereas a function wouldn't even have "Function my\_function".
* This is only a header listing, but there has been requests to include a more-complete listing of fields/methods/traits/etc, for example in #41123.
2017-04-17 13:26:20 -04:00
Corey Farwell 914b6f1f14 Rollup merge of #41012 - durka:vis-matcher, r=petrochenkov
:vis matcher for macro_rules

Resurrection of @DanielKeep's implementation posted with [RFC 1575](https://github.com/rust-lang/rfcs/pull/1575).

@jseyfried was of the opinion that this doesn't need an RFC.

Needed before merge:

- [x] sign-off from @DanielKeep since I stole his code
- [x] feature gate
- [x] docs
2017-04-17 13:26:19 -04:00
Diggory Blake 1528cbefdb Remove non-breaking spaces 2017-04-17 17:49:35 +01:00
Guillaume Gomez 695354af9c Remove hoedown from tidy check 2017-04-17 18:10:03 +02:00
Guillaume Gomez cbf8342efe Hoedown big comeback! 2017-04-17 18:10:03 +02:00
QuietMisdreavus 27bfbd56f0 rustdoc: add a list of headings to the sidebar 2017-04-17 10:41:13 -05:00
Eduard-Mihai Burtescu 17fce06c18 rustc: move associated_item_def_ids to an on-demand query. 2017-04-17 18:15:22 +03:00
bors 011f240b89 Auto merge of #41264 - alexeyzab:41158-fix-docs, r=steveklabnik
Fix old docs

Fixes #41158
2017-04-17 15:10:23 +00:00
alexey zabelin 08a955af68
Adjust description 2017-04-17 10:48:23 -04:00
Evgeny Safronov bbdf190c6a fix: remove `field_init_shorthand` from SUMMARY.md 2017-04-17 09:41:12 +03:00