Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 36 pull requests #40418

Closed
wants to merge 114 commits into from
Closed

Commits on Feb 14, 2017

  1. Export attributes in save-analysis data

    Some annotations like the "test" annotations might be of interest for
    other projects, especially rls. Export all attributes in a new
    attributes item.
    jonasbb committed Feb 14, 2017
    Configuration menu
    Copy the full SHA
    0da8995 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2017

  1. Store attributes as strings

    Remove the AST structure
    jonasbb committed Feb 23, 2017
    Configuration menu
    Copy the full SHA
    346aed2 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2017

  1. Configuration menu
    Copy the full SHA
    8a64cf7 View commit details
    Browse the repository at this point in the history
  2. configure: Remove git probing logic

    This is all in rustbuild already.
    alexcrichton committed Feb 25, 2017
    Configuration menu
    Copy the full SHA
    5eeef8b View commit details
    Browse the repository at this point in the history
  3. configure: Remove md5 probing logic

    This is all not used any more
    alexcrichton committed Feb 25, 2017
    Configuration menu
    Copy the full SHA
    e9b341a View commit details
    Browse the repository at this point in the history
  4. configure: Remove miscellaneous program probes

    All of these should be handled by rustbuild in sanity.rs right now.
    alexcrichton committed Feb 25, 2017
    Configuration menu
    Copy the full SHA
    6fbe6de View commit details
    Browse the repository at this point in the history
  5. configure: Remove some lldb-specific logic

    All of this should already be vendored in rustbuild if necessary or otherwise
    it's just not used.
    alexcrichton committed Feb 25, 2017
    Configuration menu
    Copy the full SHA
    278045c View commit details
    Browse the repository at this point in the history
  6. configure: Remove SUPPORTED_TARGET support

    This is not used any more
    alexcrichton committed Feb 25, 2017
    Configuration menu
    Copy the full SHA
    8fb06b8 View commit details
    Browse the repository at this point in the history
  7. configure: Remove misc unused vars

    None of this is used by rustbuild any more
    alexcrichton committed Feb 25, 2017
    Configuration menu
    Copy the full SHA
    49a5aa4 View commit details
    Browse the repository at this point in the history
  8. configure: Remove --build detection

    This commit removes detection of CFG_OSTYPE and CFG_CPUTYPE from the configure
    script, which means that the default value of `--build` is no longer present in
    the configure script. All this logic is now available in rustbuild itself, so
    there's no need to duplicate it.
    alexcrichton committed Feb 25, 2017
    Configuration menu
    Copy the full SHA
    bfd2f5b View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2017

  1. Dont bug! on user error

    bjorn3 committed Feb 28, 2017
    Configuration menu
    Copy the full SHA
    53d3c89 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    54a1c8b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a40918 View commit details
    Browse the repository at this point in the history
  4. Improve a bit more

    bjorn3 committed Feb 28, 2017
    Configuration menu
    Copy the full SHA
    be49671 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    90e94d9 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2017

  1. Configuration menu
    Copy the full SHA
    5bfa0f3 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2017

  1. Remove ability for plugins to register a MIR pass

    In recent months there have been a few different people investigating how to make a plugin that
    registers a MIR-pass – one that isn’t intended to be eventually merged into rustc proper.
    
    The interface to register MIR passes was added primarily for miri (& later was
    found to make prototyping of rustc-proper MIR passes a tiny bit faster). Since miri does not use
    this interface anymore it seems like a good time to remove this "feature".
    
    For prototyping purposes a similar interface can be added by developers themselves in their custom
    rustc build.
    nagisa committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    5945d1d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6698fb6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ace24bb View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2017

  1. Configuration menu
    Copy the full SHA
    08d1c80 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2017

  1. add an #[used] attribute

    similar to GCC's __attribute((used))__. This attribute prevents LLVM from
    optimizing away a non-exported symbol, within a compilation unit (object file),
    when there are no references to it.
    
    This is better explained with an example:
    
    ```
    #[used]
    static LIVE: i32 = 0;
    
    static REFERENCED: i32 = 0;
    
    static DEAD: i32 = 0;
    
    fn internal() {}
    
    pub fn exported() -> &'static i32 {
        &REFERENCED
    }
    ```
    
    Without optimizations, LLVM pretty much preserves all the static variables and
    functions within the compilation unit.
    
    ```
    $ rustc --crate-type=lib --emit=obj symbols.rs && nm -C symbols.o
    0000000000000000 t drop::h1be0f8f27a2ba94a
    0000000000000000 r symbols::REFERENCED::hb3bdfd46050bc84c
    0000000000000000 r symbols::DEAD::hc2ea8f9bd06f380b
    0000000000000000 r symbols::LIVE::h0970cf9889edb56e
    0000000000000000 T symbols::exported::h6f096c2b1fc292b2
    0000000000000000 t symbols::internal::h0ac1aadbc1e3a494
    ```
    
    With optimizations, LLVM will drop dead code. Here `internal` is dropped because
    it's not a exported function/symbol (i.e. not `pub`lic). `DEAD` is dropped for
    the same reason. `REFERENCED` is preserved, even though it's not exported,
    because it's referenced by the `exported` function. Finally, `LIVE` survives
    because of the `#[used]` attribute even though it's not exported or referenced.
    
    ```
    $ rustc --crate-type=lib -C opt-level=3 --emit=obj symbols.rs && nm -C symbols.o
    0000000000000000 r symbols::REFERENCED::hb3bdfd46050bc84c
    0000000000000000 r symbols::LIVE::h0970cf9889edb56e
    0000000000000000 T symbols::exported::h6f096c2b1fc292b2
    ```
    
    Note that the linker knows nothing about `#[used]` and will drop `LIVE`
    because no other object references to it.
    
    ```
    $ echo 'fn main() {}' >> symbols.rs
    $ rustc symbols.rs && nm -C symbols | grep LIVE
    ```
    
    At this time, `#[used]` only works on `static` variables.
    Jorge Aparicio committed Mar 5, 2017
    Configuration menu
    Copy the full SHA
    3055f41 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2017

  1. Point to enclosing block/fn on nested unsafe

    When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
    the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
    block` or `unsafe fn` that makes it unnecessary.
    estebank committed Mar 6, 2017
    Configuration menu
    Copy the full SHA
    cd7bde9 View commit details
    Browse the repository at this point in the history
  2. add tracking issue and feature-gate and run-make tests

    Jorge Aparicio committed Mar 6, 2017
    Configuration menu
    Copy the full SHA
    9918471 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6f3f467 View commit details
    Browse the repository at this point in the history
  4. fix location of the emitted object file

    Jorge Aparicio committed Mar 6, 2017
    Configuration menu
    Copy the full SHA
    0cb9b23 View commit details
    Browse the repository at this point in the history
  5. rustbuild: Build documentation for proc_macro

    This commit fixes rust-lang#38749 by building documentation for the `proc_macro` crate by
    default for configured hosts. Unfortunately did not turn out to be a trivial
    fix. Currently rustbuild generates documentation into multiple locations: one
    for std, one for test, and one for rustc. The initial fix for this issue simply
    actually executed `cargo doc -p proc_macro` which was otherwise completely
    elided before.
    
    Unfortunately rustbuild was the left to merge two documentation trees together.
    One for the standard library and one for the rustc tree (which only had docs for
    the `proc_macro` crate). Rustdoc itself knows how to merge documentation files
    (specifically around search indexes, etc) but rustbuild was unaware of this, so
    an initial fix ended up destroying the sidebar and the search bar from the
    libstd docs.
    
    To solve this issue the method of documentation has been tweaked slightly in
    rustbuild. The build system will not use symlinks (or directory junctions on
    Windows) to generate all documentation into the same location initially. This'll
    rely on rustdoc's logic to weave together all the output and ensure that it ends
    up all consistent.
    
    Closes rust-lang#38749
    alexcrichton committed Mar 6, 2017
    Configuration menu
    Copy the full SHA
    eeb7af6 View commit details
    Browse the repository at this point in the history
  6. Support armhf abi on 64-bit ARM cpus

    They report their `uname -m` as armv8l rather than aarch64.
    
    Patch originally by Matthias Klose <doko@debian.org>
    infinity0 committed Mar 6, 2017
    Configuration menu
    Copy the full SHA
    4008e71 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2017

  1. Configuration menu
    Copy the full SHA
    7cf30f3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a519659 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9057c8d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4f424b3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3c1ba68 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9efee16 View commit details
    Browse the repository at this point in the history
  7. Don't put Cargo into the rustc workspace

    This causes problems when first cloning and bootstrapping the repository
    unfortunately, so let's ensure that Cargo sticks around in its own workspace.
    Because Cargo is a submodule it's not available by default on the inital clone
    of the rust-lang/rust repository. Normally it's the responsibility of the
    rustbuild to take care of this, but unfortunately to build rustbuild itself we
    need to resolve the workspace conflicts.
    
    To deal with this we'll just have to ensure that all submodules are in their own
    workspace, which sort of makes sense anyway as updates to dependencies as
    bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any
    case this commit removes Cargo from the global workspace which should resolve
    the issues that we've been seeing.
    
    To actually perform this the `cargo` submodule has been moved to the top
    directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.
    alexcrichton committed Mar 7, 2017
    Configuration menu
    Copy the full SHA
    b75116d View commit details
    Browse the repository at this point in the history
  8. rustc: Exit quickly on only --emit dep-info

    This commit alters the compiler to exit quickly if the only output being emitted
    is `dep-info`, which doesn't need a lot of other information to generate.
    
    Closes rust-lang#40328
    alexcrichton committed Mar 7, 2017
    Configuration menu
    Copy the full SHA
    12dee0e View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2017

  1. Configuration menu
    Copy the full SHA
    eaa706d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    779d280 View commit details
    Browse the repository at this point in the history
  3. Fix missing backtick typo

    Fixes rendering of the end of the `Configure and Make` section.
    Nashenas88 committed Mar 8, 2017
    Configuration menu
    Copy the full SHA
    234753a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3198904 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    eef1cc7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5697240 View commit details
    Browse the repository at this point in the history
  7. isolate dep-graph tasks

    A task function is now given as a `fn` pointer to ensure that it carries
    no state. Each fn can take two arguments, because that worked out to be
    convenient -- these two arguments must be of some type that is
    `DepGraphSafe`, a new trait that is intended to prevent "leaking"
    information into the task that was derived from tracked state.
    
    This intentionally leaves `DepGraph::in_task()`, the more common form,
    alone. Eventually all uses of `DepGraph::in_task()` should be ported
    to `with_task()`, but I wanted to start with a smaller subset.
    
    Originally I wanted to use closures bound by an auto trait, but that
    approach has some limitations:
    
    - the trait cannot have a `read()` method; since the current method
      is unused, that may not be a problem.
    - more importantly, we would want the auto trait to be "undefined" for all types
      *by default* -- that is, this use case doesn't really fit the typical
      auto trait scenario. For example, imagine that there is a `u32` loaded
      out of a `hir::Node` -- we don't really want to be passing that
      `u32` into the task!
    nikomatsakis committed Mar 8, 2017
    Configuration menu
    Copy the full SHA
    e07e715 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    19c6bfb View commit details
    Browse the repository at this point in the history
  9. Remove internal liblog

    This commit deletes the internal liblog in favor of the implementation that
    lives on crates.io. Similarly it's also setting a convention for adding crates
    to the compiler. The main restriction right now is that we want compiler
    implementation details to be unreachable from normal Rust code (e.g. requires a
    feature), and by default everything in the sysroot is reachable via `extern
    crate`.
    
    The proposal here is to require that crates pulled in have these lines in their
    `src/lib.rs`:
    
        #![cfg_attr(rustbuild, feature(staged_api, rustc_private))]
        #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))]
    
    This'll mean that by default they're not using these attributes but when
    compiled as part of the compiler they do a few things:
    
    * Mark themselves as entirely unstable via the `staged_api` feature and the
      `#![unstable]` attribute.
    * Allow usage of other unstable crates via `feature(rustc_private)` which is
      required if the crate relies on any other crates to compile (other than std).
    alexcrichton committed Mar 8, 2017
    Configuration menu
    Copy the full SHA
    5f10bb5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c4275c2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    df60044 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2719b84 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    7cfe20c View commit details
    Browse the repository at this point in the history
  14. fix UB in repr(packed) tests

    TimNN committed Mar 8, 2017
    Configuration menu
    Copy the full SHA
    79a7ee8 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2017

  1. Configuration menu
    Copy the full SHA
    edf5dc6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    74bc7fd View commit details
    Browse the repository at this point in the history
  3. travis: Attempt to debug sccache failures

    I can't find anything that'd cause unexpected EOF in the source, so let's try
    taking a look at the error logs on failures.
    alexcrichton committed Mar 9, 2017
    Configuration menu
    Copy the full SHA
    bee6762 View commit details
    Browse the repository at this point in the history
  4. fix emscripten test detection

    TimNN committed Mar 9, 2017
    Configuration menu
    Copy the full SHA
    4eeede3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    14e9313 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    da6e7c8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    57c989c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3e2390f View commit details
    Browse the repository at this point in the history
  9. rustbuild: expose LLVM_PARALLEL_LINK_JOBS

    This allows limiting the number of linker jobs to avoid swapping when
    linking LLVM with debug info.
    Robin Kruppe committed Mar 9, 2017
    Configuration menu
    Copy the full SHA
    58ff4f6 View commit details
    Browse the repository at this point in the history
  10. Implement placement-in protocol for and VecDeque

    Charlie Fan authored and F001 committed Mar 9, 2017
    Configuration menu
    Copy the full SHA
    8062cfb View commit details
    Browse the repository at this point in the history
  11. rustbuild: Use copies instead of hard links

    The original motivation for hard links was to speed up the various stages of
    rustbuild, but in the end this is causing problems on Windows (rust-lang#39504).
    
    This commit tweaks the build system to use copies instead of hard links
    unconditionally to ensure that the files accessed by Windows are always
    disjoint.
    
    Locally this added .3s to a noop build, so it shouldn't be too much of a
    regression hopefully!
    alexcrichton committed Mar 9, 2017
    Configuration menu
    Copy the full SHA
    3be02fc View commit details
    Browse the repository at this point in the history
  12. rustc: Prefer loading crates in the sysroot

    This commit is a random stab in the dark to fix the spurious failures on rust-lang#39518.
    The leading theory of the spurious failures on Windows is that the compiler is
    loading a path in the `deps` folder, passing it to `link.exe`, and then this is
    racing with Cargo itself updating those paths.
    
    This race, however, has a few unique properties:
    
    * It's isolated to just libstd. Most crates are never passed to the linker and
      simultaneously being worked on by Cargo. Cargo's typical execution of the
      dependency graph never hits this problem.
    * The crates are already all located in the sysroot in addition to the `deps`
      folder. This means that the compiler actually has two candidates of crates to
      load, and it's just arbitrarily rejecting one.
    
    Together this means that we shouldn't need to fix this problem "in the large"
    and we can instead just fix it in this isolated situation (hopefully). To solve
    this the compiler's been updated to prefer crates from the sysroot to leave
    Cargo's structure to itself.
    
    We'll see if this actually allows the PR to land...
    alexcrichton committed Mar 9, 2017
    Configuration menu
    Copy the full SHA
    6f43149 View commit details
    Browse the repository at this point in the history
  13. Do not bother creating StorageLive for TyNever

    Keeps MIR cleaner, `StorageLive(_: !)` makes no sense anyway.
    nagisa committed Mar 9, 2017
    Configuration menu
    Copy the full SHA
    84d1f6a View commit details
    Browse the repository at this point in the history
  14. Clean up rustdoc css

    GuillaumeGomez committed Mar 9, 2017
    Configuration menu
    Copy the full SHA
    4078b25 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    cfb41ae View commit details
    Browse the repository at this point in the history
  16. update gdbr tests

    gdb will now reliably detect the lanugage as rust even before any
    code is run.
    TimNN committed Mar 9, 2017
    Configuration menu
    Copy the full SHA
    b95b5db View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    7f19f1f View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2017

  1. Add extra methods to IndexVec and implement TypeFoldable for it

    Adds `get`/`get_mut` accessors and `drain`/`drain_enumerated` iterators
    to IndexVec.
    
    Implements TypeFoldable for IndexVec.
    Aatch authored and eddyb committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    d708a40 View commit details
    Browse the repository at this point in the history
  2. Fix recursion depth counting in layout

    Aatch authored and eddyb committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    540b52e View commit details
    Browse the repository at this point in the history
  3. Initial implementation of inlining for MIR

    Fairly basic implementation of inlining for MIR. Uses conservative
    heuristics for inlining.
    Aatch authored and eddyb committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    71d0d92 View commit details
    Browse the repository at this point in the history
  4. Add dep-graph tasks where needed

    Aatch authored and eddyb committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    f55e92b View commit details
    Browse the repository at this point in the history
  5. Only run inlining if mir opts are enabled

    Aatch authored and eddyb committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    3eb26d1 View commit details
    Browse the repository at this point in the history
  6. move related tests to type-check ui test directory

    Cengiz Can committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    889337d View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#39202 - estebank:nested-unsafe, r=jonathand…

    …turner
    
    Point to enclosing block/fn on nested unsafe
    
    When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
    the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
    block` or `unsafe fn` that makes it unnecessary.
    
    <img width="621" alt="" src="https://cloud.githubusercontent.com/assets/1606434/22139922/26ad468a-de9e-11e6-8884-2945be882ea8.png">
    
    Fixes rust-lang#39144.
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    d2392b9 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#39518 - alexcrichton:update-cargo, r=arielb1

    rustbuild: Use copies instead of hard links
    
    The original motivation for hard links was to speed up the various stages of
    rustbuild, but in the end this is causing problems on Windows (rust-lang#39504).
    
    This commit tweaks the build system to use copies instead of hard links
    unconditionally to ensure that the files accessed by Windows are always
    disjoint.
    
    Locally this added .3s to a noop build, so it shouldn't be too much of a
    regression hopefully!
    
    Closes rust-lang#39504
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    1c0daa5 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#39648 - Aatch:mir-inlining-2, r=eddyb

    [MIR] Implement Inlining
    
    Fairly basic implementation of inlining for MIR. Uses conservative
    heuristics for inlining.
    
    Doesn't handle a number of cases, but can be extended later. This is basically the same as the previous inlining PR, but without the span-related changes (as the bugs it was dealing with have since been fixed).
    
    /cc @rust-lang/compiler
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    2ac9b1d View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#39770 - alexcrichton:configure-clean, r=brson

    Delete more swaths of the configure script
    
    This PR deletes more swaths of the `./configure` script which are either no longer necessary or already available in rustbuild (where an implementation is preferred)
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    5bb0dc2 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#39820 - jonasbb:export-attributes, r=nrc

    Export attributes in save-analysis data
    
    Since this is my first pull-request to rust, I would like to get some feedback about obvious errors in this implementation.
    
    I would like to change the save-analysis data to include arbitrary attribute data.
    A use-case I have in mind for this is identifying functions with `#[test]` annotations such that tools like rls can offer a test-runner feature. I described my idea here [rls#173](rust-lang/rls#173).
    
    My changes contain:
    
    1. track a vector of attributes in the various `*Data` types in `data.rs` and `external_data.rs`
    2. implement lowering for `Attribute` and `MetaItem`
    3. adjust `JsonDumper` to print the attributes
    
    In the lowering of `Attribute` I remove the distinction between `MetaItem` and `NestedMetaItem`. I did this because this distinction is somewhat confusing. For example, `NestedMetaItemKind::Literal` has two identical spans, because both `NestedMetaItem` and `Lit` are defined as `Spanned<_>`.
    My model is strictly more general, as it allows an `LitKind` instead of a `Symbol` for `MetaItem` and `Symbol`s are converted into a cooked string. As a consumer of the save-analysis data this shouldn't affect you much.
    
    Example json output of `#[test]` annotation:
    ```
    "attributes": [
      {
        "value": {
          "name": {
            "variant": "Str",
            "fields": [
              "test",
              "Cooked"
            ]
          },
          "kind": "Literal",
          "span": {
            "file_name": "test.rs",
            "byte_start": 2,
            "byte_end": 6,
            "line_start": 1,
            "line_end": 1,
            "column_start": 3,
            "column_end": 7
          }
        },
        "span": {
          "file_name": "test.rs",
          "byte_start": 0,
          "byte_end": 7,
          "line_start": 1,
          "line_end": 1,
          "column_start": 1,
          "column_end": 8
        }
      }
    ]
    ```
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    34f0d7b View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#39921 - cramertj:add-catch-to-ast, r=nikoma…

    …tsakis
    
    Add catch {} to AST
    
    Part of rust-lang#39849. Builds on rust-lang#39864.
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    4b7c16a View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#40092 - sinkuu:fix_suggestion_index, r=pnkf…

    …elix
    
    Fix suggestion span error with a line containing multibyte characters
    
    This PR fixes broken suggestions caused by multibyte characters.
    
    e.g. for this code, rustc provides a broken suggestion ([playground](https://is.gd/DWGLu7)):
    
    ```rust
    fn main() {
        let tup = (1,);
        println!("☃{}", tup[0]);
    }
    ```
    
    ```
    error: cannot index a value of type `({integer},)`
     --> <anon>:3:21
      |
    3 |     println!("☃{}", tup[0]);
      |                     ^^^^^^
      |
    help: to access tuple elements, use tuple indexing syntax as shown
      |     println!("☃{}"tup.00]);
    
    error: aborting due to previous error
    ```
    
    `CodeSuggestion::splice_lines` is misusing `Loc.col` (`CharPos`) as a byte offset when slicing source.
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    9033479 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#40146 - bjorn3:few-infer-changes, r=pnkfelix

    Better docs of rusty parts of typeck
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    bd5dfb2 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#40199 - alexcrichton:doc-proc-macro, r=brson

    rustbuild: Build documentation for `proc_macro`
    
    This commit fixes rust-lang#38749 by building documentation for the `proc_macro` crate by
    default for configured hosts. Unfortunately did not turn out to be a trivial
    fix. Currently rustbuild generates documentation into multiple locations: one
    for std, one for test, and one for rustc. The initial fix for this issue simply
    actually executed `cargo doc -p proc_macro` which was otherwise completely
    elided before.
    
    Unfortunately rustbuild was the left to merge two documentation trees together.
    One for the standard library and one for the rustc tree (which only had docs for
    the `proc_macro` crate). Rustdoc itself knows how to merge documentation files
    (specifically around search indexes, etc) but rustbuild was unaware of this, so
    an initial fix ended up destroying the sidebar and the search bar from the
    libstd docs.
    
    To solve this issue the method of documentation has been tweaked slightly in
    rustbuild. The build system will not use symlinks (or directory junctions on
    Windows) to generate all documentation into the same location initially. This'll
    rely on rustdoc's logic to weave together all the output and ensure that it ends
    up all consistent.
    
    Closes rust-lang#38749
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    2e20ad8 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#40225 - shepmaster:restore-build-date-file,…

    … r=alexcrichton
    
    Restore creating the channel-rust-$channel-date.txt files
    
    I have **not** run this (because I don't know how to 😇), but it *does* compile.
    
    r? @alexcrichton
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    5a89d0b View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#40239 - nagisa:death-to-plugins, r=nikomats…

    …akis
    
    Remove ability for plugins to register a MIR pass
    
    In recent months there have been a few different people investigating how to make a plugin that
    registers a MIR-pass – one that isn’t intended to be eventually merged into rustc proper.
    
    The interface to register MIR passes was added primarily for miri (& later was
    found to make prototyping of rustc-proper MIR passes a tiny bit faster). Since miri does not use
    this interface anymore it seems like a good time to remove this "feature".
    
    For prototyping purposes a similar interface can be added by developers themselves in their custom
    rustc build.
    
    cc @nikomatsakis
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    32135a7 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#40257 - pftbest:sret_msp430, r=alexcrichton

    LLVM: Update submodule to include SRet support patch for MSP430.
    
    This patch is needed to fix rust-lang#38824 on MSP430.
    I know that LLVM 4 is coming soon, but it would be great to have at least one working nightly before the update.
    
    cc @awygle
    r? @alexcrichton
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    dd4817b View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#40259 - TimNN:fix-emscripten-tests, r=alexc…

    …richton
    
    Fix emscripten test detection
    
    Without this change `rustbuild` will attempt to run `.js.map` files (if they exist) resulting in lots of sadness.
    
    r? @alexcrichton
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    6d1965e View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#40277 - rkruppe:llvm-parallel-link-jobs, r=…

    …alexcrichton
    
    rustbuild: expose LLVM_PARALLEL_LINK_JOBS
    
    This allows limiting the number of linker jobs to avoid swapping when linking LLVM with debug info.
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    54fc6af View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#40278 - GuillaumeGomez:css-cleanup, r=frewsxcv

    Clean up rustdoc css
    
    r? @rust-lang/docs
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    918ce73 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#40287 - estebank:label-overlap, r=nrc

    Fix incorrect span label formatting
    
    Fix rust-lang#40157.
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    2ceadae View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#40297 - alexcrichton:fix-submodules, r=brson

    Don't put Cargo into the rustc workspace
    
    This causes problems when first cloning and bootstrapping the repository
    unfortunately, so let's ensure that Cargo sticks around in its own workspace.
    Because Cargo is a submodule it's not available by default on the inital clone
    of the rust-lang/rust repository. Normally it's the responsibility of the
    rustbuild to take care of this, but unfortunately to build rustbuild itself we
    need to resolve the workspace conflicts.
    
    To deal with this we'll just have to ensure that all submodules are in their own
    workspace, which sort of makes sense anyway as updates to dependencies as
    bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any
    case this commit removes Cargo from the global workspace which should resolve
    the issues that we've been seeing.
    
    To actually perform this the `cargo` submodule has been moved to a new `vendor`
    directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.
    
    Closes rust-lang#40284
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    2f6d1de View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#40308 - nikomatsakis:incr-comp-isolate-task…

    …, r=mw
    
    first pass at isolating dep-graph tasks
    
    This intentionally leaves `DepGraph::in_task()`, the more common form,
    alone. Eventually all uses of `DepGraph::in_task()` should be ported
    to `with_task()`, but I wanted to start with a smaller subset.
    
    I also used `AssertDepGraphSafe` on the closures that are found in
    trans. This is because the types there are non-trivial and I wanted to
    lay down the mechanism and come back to the more subtle cases.
    
    The current approach taken in this PR has a downside: it is necessary
    to manually "reify" fn types into fn pointers when starting a task,
    like so:
    
        dep_graph.with_task(..., task_fn as fn(_))
    
    this is because `with_task` takes some type `T` that implements
    `DepGraphTask` rather than taking a `fn()` type directly. *This* is so
    that we can accept closure and also so that we can accept fns with
    multiple arities. I am not sure this is the right approach.
    
    Originally I wanted to use closures bound by an auto trait, but that
    approach has some limitations:
    
    - the trait cannot have a `read()` method; since the current method
      is unused, that may not be a problem.
    - more importantly, we would want the auto trait to be "undefined" for all types
      *by default* -- that is, this use case doesn't really fit the typical
      auto trait scenario. For example, imagine that there is a `u32` loaded
      out of a `hir::Node` -- we don't really want to be passing that
      `u32` into the task!
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    68bce62 View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#40311 - nrc:save-proc-macro-attr, r=jseyfried

    Expect macro defs in save-analysis and add expn info to spans for att…
    
    …r proc macros
    
    r? @jseyfried
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    1b908ff View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#40315 - oli-obk:lint_body, r=eddyb

    Allow lints to check Bodys directly
    
    r? @eddyb
    
    babysteps towards fixing https://github.com/Manishearth/rust-clippy/issues/1580 (disable certain lints in const environments, since they make no sense there (yet))
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    bd3571b View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#40319 - eddyb:it's-"unsize"-not-"unsound", …

    …r=nikomatsakis
    
    Disallow subtyping between T and U in T: Unsize<U>.
    
    Because `&mut T` can be coerced to `&mut U`, `T` and `U` must be unified invariantly. Fixes rust-lang#40288.
    E.g. coercing `&mut [&'a X; N]` to `&mut [&'b X]` must require `'a` be equal to `'b`, otherwise you can convert between `&'a X` and `&'b X` (in either direction), potentially unsoundly lengthening lifetimes.
    
    Subtyping here was introduced with `Unsize` in rust-lang#24619 (landed in 1.1, original PR is rust-lang#23785).
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    ddf1f20 View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#40324 - alexcrichton:sccache-errors, r=aturon

    travis: Attempt to debug sccache failures
    
    I can't find anything that'd cause unexpected EOF in the source, so let's try
    taking a look at the error logs on failures.
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    c59a914 View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#40336 - alexcrichton:fast-dep-info, r=nrc

    rustc: Exit quickly on only `--emit dep-info`
    
    This commit alters the compiler to exit quickly if the only output being emitted
    is `dep-info`, which doesn't need a lot of other information to generate.
    
    Closes rust-lang#40328
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    4f701fd View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#40340 - petrochenkov:restricted, r=nikomats…

    …akis
    
    Update syntax for `pub(restricted)`
    
    Update the syntax before stabilization.
    
    cc rust-lang#32409
    r? @nikomatsakis
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    29bb2b1 View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#40344 - nrc:save-container, r=eddyb

    save-analysis: cope with lack of method data after a type error
    
    Fixes rust-lang#39957
    
    r? @eddyb
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    b622fc5 View commit details
    Browse the repository at this point in the history
  32. Rollup merge of rust-lang#40345 - Nashenas88:patch-1, r=estebank

    Fix missing backtick typo
    
    Fixes rendering of the end of the `Configure and Make` section.
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    af9bc3e View commit details
    Browse the repository at this point in the history
  33. Rollup merge of rust-lang#40367 - eddyb:naked-cruft, r=nagisa

    Improve the LLVM IR we generate for trivial functions, especially #[naked] ones.
    
    These two small changes fix edef1c/libfringe#68:
    * Don't emit ZST allocas, such as when returning `()`
    * Don't emit a branch from LLVM's entry block to MIR's `START_BLOCK` unless needed
      * That is, if a loop branches back to it, although I'm not sure that's even valid MIR
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    d63bbef View commit details
    Browse the repository at this point in the history
  34. Rollup merge of rust-lang#40369 - petrochenkov:segspan, r=eddyb

    Give spans to individual path segments in AST
    
    And use these spans in path resolution diagnostics.
    
    The spans are spans of identifiers in segments, not whole segments. I'm not sure what spans are more useful in general, but identifier spans are a better fit for resolve errors.
    
    HIR still doesn't have spans.
    
    Fixes rust-lang#38927 (comment) rust-lang#38890 (comment)
    
    r? @nrc @eddyb
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    919bc56 View commit details
    Browse the repository at this point in the history
  35. Rollup merge of rust-lang#40372 - nagisa:never-drop, r=eddyb

    Do not bother creating StorageLive for TyNever
    
    Keeps MIR cleaner, `StorageLive(_: !)` makes no sense anyway.
    
    r? @eddyb
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    6e6b2ed View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    bb558d1 View commit details
    Browse the repository at this point in the history
  37. Rollup merge of rust-lang#40379 - clarcharr:box_docs, r=brson

    Box docs: no allocation is done for ZSTs.
    
    Updated to add a small bit saying that ZSTs don't actually allocate on `Box::new`.
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    9d8f75d View commit details
    Browse the repository at this point in the history
  38. Rollup merge of rust-lang#40385 - arielb1:packed-again, r=eddyb

    emit !align attributes on stores of operand pairs
    
    This avoids another case of missing-align UB. cc rust-lang#40373
    
    r? @eddyb
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    98f0197 View commit details
    Browse the repository at this point in the history
  39. Rollup merge of rust-lang#40386 - tbu-:pr_display_frombyteswithnulerr…

    …or, r=alexcrichton
    
    Distinguish the ways `CStr::from_bytes_with_nul` can fail
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    1beff33 View commit details
    Browse the repository at this point in the history
  40. Rollup merge of rust-lang#40389 - F001:placementVecDeque, r=nagisa

    Implement placement-in protocol for `VecDeque`
    
    CC rust-lang#30172
    
    r? @nagisa
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    7769c7e View commit details
    Browse the repository at this point in the history
  41. Rollup merge of rust-lang#40400 - TimNN:gdbr-updates, r=alexcrichton

    Update gdbr tests
    
    gdb will now reliably detect the lanugage as rust even before any code is run.
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    9a1e72f View commit details
    Browse the repository at this point in the history
  42. Rollup merge of rust-lang#40404 - cengizIO:master, r=nikomatsakis

    fix rust-lang#40294 obligation cause.body_id is not always a NodeExpr
    
    Hello!
    
    This fixes rust-lang#40294 and moves tests related to rust-lang#38812 to a much more sensible directory.
    
    Thanks to @nikomatsakis and @eddyb
    alexcrichton committed Mar 10, 2017
    Configuration menu
    Copy the full SHA
    3ac2180 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    35680bd View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    340d1f2 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    4f9ac97 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    7ae0257 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    792e529 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    d76b226 View commit details
    Browse the repository at this point in the history