auto merge of #16866 : P1start/rust/tuple-indexing, r=brson

This allows code to access the fields of tuples and tuple structs behind the feature gate `tuple_indexing`:

```rust
#![feature(tuple_indexing)]

let x = (1i, 2i);
assert_eq!(x.1, 2);

struct Point(int, int);
let origin = Point(0, 0);
assert_eq!(origin.0, 0);
assert_eq!(origin.1, 0);
```

Implements [RFC 53](https://github.com/rust-lang/rfcs/blob/master/active/0053-tuple-accessors.md). Closes #16950.
Fix #17156
Register snapshots
auto merge of #17142 : sfackler/rust/issue-17115, r=alexcrichton

Closes #17115
Remove BasicMacroExpander and BasicIdentMacroExpander

The spans inside of these types were always None and never used. Pass
the expander function directly instead of wrapping it in one of these
types.

[breaking-change]
Remove dependency on GCC's LTO linker plugin, since Rust does its' own LTO.
auto merge of #17110 : thestinger/rust/dst, r=cmr

The pointer in the slice must not be null, because enum representations
make that assumption. The `exchange_malloc` function returns a non-null
sentinel for the zero size case, and it must not be passed to the
`exchange_free` lang item.

Since the length is always equal to the true capacity, a branch on the
length is enough for most types. Slices of zero size types are
statically special cased to never attempt deallocation. This is the same
implementation as `Vec<T>`.

Closes #14395
auto merge of #17139 : brson/rust/lualatex, r=alexcrichton

Bugs in pdflatex (#12804) are preventing the guide from landing (https://github.com/rust-lang/rust/pull/16657). This solves the immediate problem by changing the build system to prefer lualatex, xelatex to pdflatex (which is apparently obsolete). Because the xelatex on the snapshot bot seems to completely ignore the `-output-directory` option, I also had to frob the makefiles a bit for that case.
auto merge of #17157 : nikomatsakis/rust/occurs-check, r=pcwalton

Avoid ever constructing cyclic types in the first place, rather than detecting them in resolve. This simplifies logic elsewhere in the compiler, in particular on the trait reform branch.

r? @pnkfelix or @pcwalton 

cc #5527
auto merge of #17153 : steveklabnik/rust/add_link_to_manual, r=sfackler

whoops

Fixes https://github.com/rust-lang/rust/pull/16827#issuecomment-55160273
Append target-specific tools directory ($(RUST)/bin/rustlib/<triple>/bin/) to PATH during linking,
so that rustc can invoke them.
Update license notice.
Package rustc's mingw dependencies into Windows installer.
gcc, ld, ar, dlltool, windres go into $(RUST)/bin/rustlib/<triple>/bin/
platform libraries and startup objects got into $(RUST)/bin/rustlib/<triple>/lib/
auto merge of #17154 : steveklabnik/rust/array_clarification, r=huonw

fixes #17148
librustc: Make sure region bounds on closures outlive calls to them.

This can break code like:

    fn call_rec(f: |uint| -> uint) -> uint {
        (|x| f(x))(call_rec(f))
    }

Change this code to use a temporary instead of violating the borrow
rules:

    fn call_rec(f: |uint| -> uint) -> uint {
        let tmp = call_rec(|x| f(x)); f(tmp)
    }

Closes #17144.

[breaking-change]
Replace the Tutorial with the Guide.

The Guide isn't 100% perfect, but it's basically complete. It's
certainly better than the tutorial is. Time to start pointing more
people its way.

I also just made it consistent to call all things 'guides' rather than
tutorials.

Fixes #9874. This is the big one.

And two bugs that just go away.

Fixes #14503.
Fixes #15009.
only deprecate the guide rather than :fire: :fire: :fire:
Handle always-unsized structs

closes #16977
auto merge of #16957 : vadimcn/rust/package-gcc, r=brson

Package rustc's mingw dependencies into Windows installer to avoid requiring a separate mingw install.

Closes #11782
Fix bug in padding unicode, #17105.