Permalink
Commits on Sep 23, 2016
  1. Auto merge of #36335 - mcarton:compiletest, r=GuillaumeGomez

    bors committed Sep 23, 2016
    Fix ICE test in compiletest fail-tests
    
    While working on Clippy which uses *compiletest*, I noticed that as long as all expected error are found, *compile-fail* tests will be marked *ok* even if there is an ICE. One function seems to have not been updated with JSON errors because ICEs are now reported like this:
    ```json
    {"message":"../src/librustc/ty/context.rs:161: Attempted to intern `_` which contains inference types/regions in the global type context","code":null,"level":"error: internal compiler error","spans":[],"children":[],"rendered":null}
    ```
    I don't think I can add a test for that.
    
    I guess:
    r? @nikomatsakis
  2. Auto merge of #36631 - frewsxcv:dir-entry-debug, r=sfackler

    bors committed Sep 23, 2016
    Implement Debug for DirEntry.
    
    None
  3. Auto merge of #36573 - jseyfried:groundwork, r=nrc

    bors committed Sep 23, 2016
    resolve: groundwork for building the module graph during expansion
    
    r? @nrc
Commits on Sep 22, 2016
  1. Auto merge of #36154 - nrc:proc-macro-init, r=@jseyfried

    bors committed Sep 22, 2016
    Adds a `ProcMacro` form of syntax extension
    
    This commit adds syntax extension forms matching the types for procedural macros 2.0 (RFC #1566), these still require the usual syntax extension boiler plate, but this is a first step towards proper implementation and should be useful for macros 1.1 stuff too.
    
    Supports both attribute-like and function-like macros.
    
    Note that RFC #1566 has not been accepted yet, but I think there is consensus that we want to head in vaguely that direction and so this PR will be useful in any case. It is also fairly easy to undo and does not break any existing programs.
    
    This is related to #35957 in that I hope it can be used in the implementation of macros 1.1, however, there is no direct overlap and is more of a complement than a competing proposal. There is still a fair bit of work to do before the two can be combined.
    
    r? @jseyfried
    
    cc @alexcrichton, @cgswords, @eddyb, @aturon
  2. Auto merge of #36651 - jonathandturner:rollup, r=jonathandturner

    bors committed Sep 22, 2016
    Rollup of 7 pull requests
    
    - Successful merges: #36330, #36423, #36539, #36571, #36589, #36600, #36632
    - Failed merges:
  3. reviewer comments and rebasing

    nrc committed Sep 6, 2016
  4. Rollup merge of #36632 - CryZe:patch-3, r=sfackler

    jonathandturner committed Sep 22, 2016
    Fix outdated Doc Comment on BufReader::seek
    
    A long time ago non-panicking `unwrap` methods were renamed to `into_inner` in this Pull Request: rust-lang#19149
    
    Looks like this doc comment was not updated however.
  5. Rollup merge of #36600 - caipre:sort-by-key-comment-fix, r=apasel422

    jonathandturner committed Sep 22, 2016
    Minor correction in `sort_by_key` doc comment
    
    The parameter to `sort_by_key` is named `f`, not `key`.
  6. Rollup merge of #36589 - jpadkins:option_docs_safety_wording_fix, r=b…

    jonathandturner committed Sep 22, 2016
    …luss
    
    fixed the safety header/wording in option.rs
    
    Fixes #36581
    
    screenshot of the rendered documentation: http://imgur.com/14kLVrA
    
    r? @steveklabnik
  7. Rollup merge of #36539 - mikhail-m1:36530, r=jonathandturner

    jonathandturner committed Sep 22, 2016
    fix top level attr spans
    
    issue #36530
    ?r @jonathandturner
  8. Rollup merge of #36423 - GuillaumeGomez:eq_impl, r=pnkfelix

    jonathandturner committed Sep 22, 2016
    Add missing Eq implementations
    
    Part of #36301.
  9. Rollup merge of #36330 - aclarry:e0560-update, r=jonathandturner

    jonathandturner committed Sep 22, 2016
    Updated E0560 to new error format
    
    Added a small bit of code to add a label for E0560.
    
    Also renamed src/test/compile-fail/E560.rs file to E0560.rs (not sure why it was named E560).
    Updated all test cases which check this error.
    
    Closes #36199
  10. Implement Debug for DirEntry.

    frewsxcv committed Sep 21, 2016
  11. Auto merge of #36261 - parched:soft-float, r=pnkfelix

    bors committed Sep 22, 2016
    Fix documentation with 'soft-float' codegen option
    
    This option doesn't cause software FP routines
    to be called, it only changes the float ABI.
    
    Additionally, this option is ignored by all targets,
    except the ARM eabihf ones.
  12. Auto merge of #36618 - jseyfried:crate_root_attr_invoc, r=nrc

    bors committed Sep 22, 2016
    macros: allow attribute invocations at the crate root
    
    Fixes #36617.
    r? @nrc
  13. Auto merge of #36592 - nnethercote:TypedArena, r=bluss

    bors committed Sep 22, 2016
    Lazily allocate TypedArena's first chunk
    
    Currently `TypedArena` allocates its first chunk, which is usually 4096
    bytes, as soon as it is created. If no allocations are ever made from
    the arena then this allocation (and the corresponding deallocation) is
    wasted effort.
    
    This commit changes `TypedArena` so it doesn't allocate the first chunk
    until the first allocation is made.
    
    This change speeds up rustc by a non-trivial amount because rustc uses
    `TypedArena` heavily: compilation speed (producing debug builds) on
    several of the rustc-benchmarks increases by 1.02--1.06x. The change
    should never cause a slow-down because the hot `alloc` function is
    unchanged. It does increase the size of `TypedArena` by one `usize`
    field, however.
    
    The commit also fixes some out-of-date comments.
  14. Refactor away `ParentLink`.

    jseyfried committed Sep 18, 2016
  15. Auto merge of #36585 - jonathandturner:misc_error_touchups, r=nrc

    bors committed Sep 22, 2016
    Add the ability to merge spans to codemap
    
    This PR adds the ability to merge Spans.  To do so, it builds on the Codemap's ability to verify the locations of spans, namely that following can be verified:
    
    * the expn_id of both spans much match
    * the lhs span needs to end on the same line the rhs span begins
    * the lhs span must start at or before the rhs span
    
    If all of these are met, a new span is returned that is min(lo), max(hi) of the two spans.
    
    This PR also removes an older Span merge, as this new functionality subsumes it.
    
    r? @nrc
  16. Auto merge of #36551 - eddyb:meta-games, r=nikomatsakis

    bors committed Sep 22, 2016
    Refactor away RBML from rustc_metadata.
    
    RBML and `ty{en,de}code` have had their long-overdue purge. Summary of changes:
    * Metadata is now a tree encoded in post-order and with relative backward references pointing to children nodes. With auto-deriving and type safety, this makes maintenance and adding new information to metadata painless and bug-free by default. It's also more compact and cache-friendly (cache misses should be proportional to the depth of the node being accessed, not the number of siblings as in EBML/RBML).
    * Metadata sizes have been reduced, for `libcore` it went down 16% (`8.38MB` -> `7.05MB`) and for `libstd` 14% (`3.53MB` -> `3.03MB`), while encoding more or less the same information
    * Specialization is used in the bundled `libserialize` (crates.io `rustc_serialize` remains unaffected) to customize the encoding (and more importantly, decoding) of various types, most notably those interned in the `TyCtxt`. Some of this abuses a soundness hole pending a fix (cc @aturon), but when that fix arrives, we'll move to macros 1.1 `#[derive]` and custom `TyCtxt`-aware serialization traits.
    * Enumerating children of modules from other crates is now orthogonal to describing those items via `Def` - this is a step towards bridging crate-local HIR and cross-crate metadata
    * `CrateNum` has been moved to `rustc` and both it and `NodeId` are now newtypes instead of `u32` aliases, for specializing their decoding. This is `[syntax-breaking]` (cc @Manishearth ).
    
    cc @rust-lang/compiler
Commits on Sep 21, 2016
  1. Auto merge of #36496 - pnkfelix:workaround-issue-34427, r=eddyb

    bors committed Sep 21, 2016
    Workaround #34427 by using memset of 0 on ARM to set the discriminant.
    
    Workaround #34427 by using memset of 0 on ARM to set the discriminant.
  2. Add regression test.

    jseyfried committed Sep 21, 2016
  3. Adds a `ProcMacro` form of syntax extension

    nrc committed Aug 29, 2016
    This commit adds syntax extension forms matching the types for procedural macros 2.0 (RFC #1566), these still require the usual syntax extension boiler plate, but this is a first step towards proper implementation and should be useful for macros 1.1 stuff too.
    
    Supports both attribute-like and function-like macros.
  4. Fix outdated Doc Comment on BufReader::seek

    CryZe committed Sep 21, 2016
    A long time ago non-panicking `unwrap` methods were renamed to `into_inner` in this Pull Request: rust-lang#19149
    
    Looks like this doc comment was not updated however.
  5. Tweak std::rc docs

    kmcallister committed Sep 17, 2016
    Fixes #29372.
  6. Auto merge of #35074 - ashleygwilliams:assert_ne, r=steveklabnik

    bors committed Sep 21, 2016
    add debug_assert_ne + assert_ne
    
    ~~ work in progress, please do not merge ~~
    
    fixes #35073
  7. Auto merge of #36524 - michaelwoerister:trans-inline-only-on-demand, …

    bors committed Sep 21, 2016
    …r=nikomatsakis
    
    trans: Only instantiate #[inline] functions in codegen units referencing them
    
    This PR changes how `#[inline]` functions are translated. Before, there was one "master instance" of the function with `external` linkage and a number of on-demand instances with `available_externally` linkage in each codegen unit that referenced the function. This had two downsides:
    
    * Public functions marked with `#[inline]` would be present in machine code of libraries unnecessarily (see #36280 for an example)
    * LLVM would crash on `i686-pc-windows-msvc` due to what I suspect to be a bug in LLVM's Win32 exception handling code, because it doesn't like `available_externally` there (#36309).
    
    This PR changes the behavior, so that there is no master instance and only on-demand instances with `internal` linkage. The downside of this is potential code-bloat if LLVM does not completely inline away the `internal` instances because then there'd be N instances of the function instead of 1. However, this can only become a problem when using more than one codegen unit per crate.
    
    cc @rust-lang/compiler