Track kind of closure in upvar categorization

Keep track of the kind of closure responsible for an upvar
Categorize upvars in `Fn` unboxed closures as freely aliasable

This causes borrowck to correctly reject mutation or mutable borrows
of upvars in `Fn` unboxed closures since the closure environment is
aliasable.

This also tracks the responsible closure in the aliasability
information returned and uses it to give a helpful diagnostic.

Closes issue #17780
Fix unit test that was illegally mutating an upvar
Add regression test for issue #17780
Rename RELEASES.txt to RELEASES.md. It's markdown.
Update RELEASES.md for 0.12.0
Update AUTHORS.txt for 0.12.0
Update per feedback
Update html_root_url for 0.12.0 release
More relnotes tweaks
debuginfo: Add LLDB version handling to test infrastructure.
debuginfo: Don't mark struct fields as artificial.

LLDB doesn't allow for reading 'artifical' fields (fields that are generated by the compiler). So do not mark, slice fields, enum discriminants, and GcBox value fields as artificial.
saner parameter order for reallocation functions

Using reallocate(old_ptr, old_size, new_size, align) makes a lot more
sense than reallocate(old_ptr, new_size, align, old_size) and matches up
with the order used by existing platform APIs like mremap.

Closes #17837

[breaking-change]
remove crate_id attribute, add crate_name one

this is true as of https://github.com/rust-lang/rust/pull/15319
add mention of test attribute

Fixes #16413
Clean up the implementations of Bitv and BitvSet.

Functions that add bits now ensure that any unused bits are set to 0.
`into_bitv` sanitizes the nbits of the Bitv/BitvSet it returns by setting the nbits to the current capacity.
Fix a bug with `union_with` and `symmetric_difference` with due to not updating nbits properly
Add test cases to the _with functions
Remove `get_mut_ref`

This is a [breaking-change]. The things you will need to fix are:

1. BitvSet's `unwrap()` has been renamed to `into_bitv`
2. BitvSet's `get_mut_ref()` has been removed. Use `into_bitv()` and `from_bitv()` instead.
auto merge of #17871 : michaelwoerister/rust/lldb-versioning, r=alexcrichton

Apart from making the build system determine the LLDB version, this PR also fixes an issue with enums in LLDB pretty printers. In order for GDB's pretty printers to know for sure if a field of some value is an enum discriminant, I had rustc mark discriminant fields with the `artificial` DWARF tag. This worked out nicely for GDB but it turns out that one can't access artificial fields from LLDB. So I changed the debuginfo representation so that enum discriminants are marked by the special field name `RUST$ENUM$DISR` instead, which works in both cases.

The PR does not activate the LLDB test suite yet.
auto merge of #17873 : steveklabnik/rust/gh16413, r=alexcrichton

A fix for the issues mentioned in https://github.com/rust-lang/rust/issues/16413
librustc: Forbid duplicate name bindings in the same parameter or type
parameter list.

This breaks code like:

    fn f(a: int, a: int) { ... }
    fn g<T,T>(a: T) { ... }

Change this code to not use the same name for a parameter. For example:

    fn f(a: int, b: int) { ... }
    fn g<T,U>(a: T) { ... }

Code like this is *not* affected, since `_` is not an identifier:

    fn f(_: int, _: int) { ... } // OK

Closes #17568.

[breaking-change]
auto merge of #17784 : bkoropoff/rust/issue-17780, r=pcwalton

This fixes a soundness problem where `Fn` unboxed closures can mutate free variables in the environment.
The following presently builds:

```rust
#![feature(unboxed_closures, overloaded_calls)]

fn main() {
    let mut x = 0u;
    let _f = |&:| x = 42;
}
```

However, this is equivalent to writing the following, which borrowck rightly rejects:

```rust
struct F<'a> {
    x: &'a mut uint
}

impl<'a> Fn<(),()> for F<'a> {
    #[rust_call_abi_hack]
    fn call(&self, _: ()) {
        *self.x = 42; // error: cannot assign to data in a `&` reference
    }
}

fn main() {
    let mut x = 0u;
    let _f = F { x: &mut x };
}
```

This problem is unique to unboxed closures; boxed closures cannot be invoked through an immutable reference and are not subject to it.

This change marks upvars of `Fn` unboxed closures as freely aliasable in mem_categorization, which causes borrowck to reject attempts to mutate or mutably borrow them.

@zwarich pointed out that even with this change, there are remaining soundness issues related to regionck (issue #17403).  This region issue affects boxed closures as well.

Closes issue #17780