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

Make core::nonzero private #1

Closed
wants to merge 567 commits into from
Closed
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Mar 22, 2018

  1. Rollup merge of rust-lang#49158 - varkor:compiletest-triples, r=rkruppe

    Make compiletest do exact matching on triples
    
    This avoids the issues of the previous substring matching, ensuring `ARCH_TABLE` and `OS_TABLE` will no longer contain redundant entries. Fixes rust-lang#48893.
    
    r? @rkruppe
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    c945725 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#49188 - memoryleak47:macro_use_doctest, r=Q…

    …uietMisdreavus
    
    Put `#[macro_use] extern crate <crate>` before fn main() in doctests
    
    Closes rust-lang#49174.
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    95967c7 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#49189 - GuillaumeGomez:fix-implied-shortcut…

    …-links, r=QuietMisdreavus
    
    Fix automatic urls with backticks
    
    Fixes rust-lang#49164.
    
    r? @QuietMisdreavus
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    d7eda77 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#49209 - Zoxc:run-make-last, r=Mark-Simulacrum

    Run the `run-make` tests last, so more tests run on Windows when `make` is unavailable
    
    Just rust-lang#47996 again.
    
    r? @Mark-Simulacrum
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    34eca53 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#49211 - varkor:chalk-lowering-Implemented-F…

    …rom-Env, r=nikomatsakis
    
    Implement Chalk lowering rule "Implemented-From-Env"
    
    This extends the Chalk lowering pass with the "Implemented-From-Env" rule for generating program clauses from a trait definition as part of rust-lang#49177.
    
    r? @nikomatsakis
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    70ae917 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#49216 - bjorn3:patch-1, r=estebank

    Don't check interpret_interner when accessing a static to fix miri mutable statics
    
    Mutable statics don't work in my PR to fix the standalone [miri](https://github.com/solson/miri), as init_static didn't get called when the interpret_interner already contained a entry for the static, which is always immutable.
    
    cc rust-lang/miri#364
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    346a46e View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#49225 - QuietMisdreavus:all-the-features-al…

    …l-the-time, r=alexcrichton
    
    whitelist every target feature for rustdoc
    
    When rust-lang/stdarch#367 was attempted to be upstreamed, it failed to document on non-x86 targets because it made every intrinsic visible, even the ones on foreign arches. This change makes it so that whenever rustdoc asks for the target feature whitelist, it gets a list of every feature known to every arch in `rustc_trans/llvm_util.rs`.
    
    Before pushing, i temporarily updated the `stdsimd` submodule to include the `doc(cfg)` change, generated documentation for `aarch64-unknown-linux-gnu`, and it completed without a problem. The generated `core::arch` docs contained complete submodules for all main arches.
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    3e95c71 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#49231 - gnzlbg:fix_vec_fminmax, r=rkruppe

    fix vector fmin/fmax non-fast/fast intrinsics NaN handling
    
    This bugs shows up in release mode tests of `stdsimd`: rust-lang/stdarch#391 . The intrinsics are thoroughly tested there for roundoff errors, NaN, and overflow behavior.
    
    The problem was that the non-fast intrinsics where specifying `NoNaNs == true`, which meant that they don't support NaNs. This is incorrect, the non-fast intrinsics should handle NaNs properly.
    
    Also, the "fast" intrinsics where specifying `NoNaNs == false` which meant that they support NaNs and then fast-math, which probably disables this support. This was not intended either.
    
    I've added a comment specifying what the boolean flags do.
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    87f5a4b View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#49234 - kennytm:revert-fix-dpl-788, r=alexc…

    …richton
    
    dpl 1.9.5 has been released, revert rust-lang#49217.
    
    dpl 1.9.5 has been released which includes travis-ci/dpl#789, so we could move back to the standard Travis settings before that `s3-eager-autoload` branch is removed.
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    a10db97 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    eb99deb View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#49244 - varkor:type_dependent_defs_ExprMeth…

    …odCall, r=estebank
    
    Fix type_dependent_defs ICE on method calls
    
    Fixes rust-lang#49241.
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    d54f74e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a4bc859 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#49105 - SimonSapin:from_utf8_lossy_example,…

    … r=alexcrichton
    
    Add an example of lossy decoding to str::Utf8Error docs
    
    CC rust-lang#33906
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    2b9674d View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#49038 - canndrew:replace-infallible-with-ne…

    …ver, r=SimonSapin
    
    replace `convert::Infallible` with `!`
    kennytm committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    2c6f911 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    bfb94ac View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    57f9c4d View commit details
    Browse the repository at this point in the history
  17. Use FunctionRetTy::Default rather than an explicit TyKind::Infer for …

    …lambda-building
    
    This prevents explicit `-> _` return type annotations for closures generated by `lambda`.
    varkor committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    0d278ca View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    9fa14e4 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    ad50f33 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    70559c5 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    5092c6b View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    1b0e9f5 View commit details
    Browse the repository at this point in the history
  23. Auto merge of rust-lang#49210 - oli-obk:pango_crash, r=eddyb

    Fix the conversion between bit representations and i128 representations
    
    fixes rust-lang#49181
    
    the `Discr` type now encodes the bit representation instead of `i128` or `u128` casted to `u128`.
    
    r? @eddyb
    bors committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    52f7e88 View commit details
    Browse the repository at this point in the history
  24. rustc: Add a #[wasm_custom_section] attribute

    This commit is an implementation of adding custom sections to wasm artifacts in
    rustc. The intention here is to expose the ability of the wasm binary format to
    contain custom sections with arbitrary user-defined data. Currently neither our
    version of LLVM nor LLD supports this so the implementation is currently custom
    to rustc itself.
    
    The implementation here is to attach a `#[wasm_custom_section = "foo"]`
    attribute to any `const` which has a type like `[u8; N]`. Other types of
    constants aren't supported yet but may be added one day! This should hopefully
    be enough to get off the ground with *some* custom section support.
    
    The current semantics are that any constant tagged with `#[wasm_custom_section]`
    section will be *appended* to the corresponding section in the final output wasm
    artifact (and this affects dependencies linked in as well, not just the final
    crate). This means that whatever is interpreting the contents must be able to
    interpret binary-concatenated sections (or each constant needs to be in its own
    custom section).
    
    To test this change the existing `run-make` test suite was moved to a
    `run-make-fulldeps` folder and a new `run-make` test suite was added which
    applies to all targets by default. This test suite currently only has one test
    which only runs for the wasm target (using a node.js script to use `WebAssembly`
    in JS to parse the wasm output).
    alexcrichton committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    7df6f41 View commit details
    Browse the repository at this point in the history
  25. rustc: Add a #[wasm_import_module] attribute

    This commit adds a new attribute to the Rust compiler specific to the wasm
    target (and no other targets). The `#[wasm_import_module]` attribute is used to
    specify the module that a name is imported from, and is used like so:
    
        #[wasm_import_module = "./foo.js"]
        extern {
            fn some_js_function();
        }
    
    Here the import of the symbol `some_js_function` is tagged with the `./foo.js`
    module in the wasm output file. Wasm-the-format includes two fields on all
    imports, a module and a field. The field is the symbol name (`some_js_function`
    above) and the module has historically unconditionally been `"env"`. I'm not
    sure if this `"env"` convention has asm.js or LLVM roots, but regardless we'd
    like the ability to configure it!
    
    The proposed ES module integration with wasm (aka a wasm module is "just another
    ES module") requires that the import module of wasm imports is interpreted as an
    ES module import, meaning that you'll need to encode paths, NPM packages, etc.
    As a result, we'll need this to be something other than `"env"`!
    
    Unfortunately neither our version of LLVM nor LLD supports custom import modules
    (aka anything not `"env"`). My hope is that by the time LLVM 7 is released both
    will have support, but in the meantime this commit adds some primitive
    encoding/decoding of wasm files to the compiler. This way rustc postprocesses
    the wasm module that LLVM emits to ensure it's got all the imports we'd like to
    have in it.
    
    Eventually I'd ideally like to unconditionally require this attribute to be
    placed on all `extern { ... }` blocks. For now though it seemed prudent to add
    it as an unstable attribute, so for now it's not required (as that'd force usage
    of a feature gate). Hopefully it doesn't take too long to "stabilize" this!
    
    cc rust-lang-nursery/rust-wasm#29
    alexcrichton committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    d889957 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    73fa6d5 View commit details
    Browse the repository at this point in the history
  27. rustfmt lowering.rs

    nikomatsakis committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    1b26be5 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    a5743b3 View commit details
    Browse the repository at this point in the history
  29. make parent_id not optional

    It'd be pretty buggy if `None` were supplied anyway; we'd skip over
    in-band lifetimes completely!
    nikomatsakis committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    f71807d View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    f07ebc5 View commit details
    Browse the repository at this point in the history
  31. add new test for dyn<Trait + '_> used in a struct

    `'_` is illegal in structs; this currently gets a duplicate error
    nikomatsakis committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    d913af8 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    1488095 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    df70060 View commit details
    Browse the repository at this point in the history
  34. permit '_ and &T in impl headers

    Deprecated forms of elision are not supported.
    nikomatsakis committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    94468da View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    c0fdb29 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    17b285d View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    1331cd4 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    5f21aa8 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    239b3ec View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    ee4c7ac View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    c8d81b1 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    d4b9a78 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    5d2a60c View commit details
    Browse the repository at this point in the history
  44. UserAssertTy can handle inference variables.

    This commit modifies the UserAssertTy statement to take a canonicalized
    type rather than a regular type so that we can handle the case where the
    user provided type contains a inference variable.
    davidtwco committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    692a931 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    e1648bd View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    fc5c4da View commit details
    Browse the repository at this point in the history
  47. Update RLS and Rustfmt

    Fixes broken RLS tests/build
    nrc committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    aa238a3 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    04aeef8 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    447ae76 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2018

  1. introduce trait engine mod

    csmoe committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    20703b3 View commit details
    Browse the repository at this point in the history
  2. import trait engine to typeck

    csmoe committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    0c4062a View commit details
    Browse the repository at this point in the history
  3. fix Self

    nikomatsakis authored and csmoe committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    7c2eb1c View commit details
    Browse the repository at this point in the history
  4. apply rustfmt

    nikomatsakis authored and csmoe committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    012262c View commit details
    Browse the repository at this point in the history
  5. move the defaut object lifetime bound into the trait

    This way, we don't have to repeat it.
    nikomatsakis authored and csmoe committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    bad80fe View commit details
    Browse the repository at this point in the history
  6. use infcx.tcx, so we get the local tcx

    The use of tcx/gcx in this function is subtle.
    nikomatsakis authored and csmoe committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    8179a4b View commit details
    Browse the repository at this point in the history
  7. rename 'tcx and tcx to 'gcx and gcx

    This helps to make clear where *global* lifetimes are needed
    in `coerce_unsized_info`
    nikomatsakis authored and csmoe committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    39712e5 View commit details
    Browse the repository at this point in the history
  8. Allow installing rustfmt without config.extended

    This assertion was preventing `./x.py install rustfmt` if attempted
    without an "extended" build configuration, but it actually builds and
    installs just fine.
    cuviper committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    86f7d89 View commit details
    Browse the repository at this point in the history
  9. ci: Don't use Travis caches for docker images

    This commit moves away from caching on Travis to our own caching on S3 for
    caching docker layers between builds. Unfortunately the Travis caches have over
    time had a few critical pain points:
    
    * Caches are only updated for successful builds, meaning that if a build times
      out or fails in a different location the sucessfully-created docker images
      isn't always cached. While this makes sense as a general rule of caches it
      hurts our use cases.
    
    * Caches are per-branch and builder which means that we don't have a separate
      cache on each release channel. All our merges go through the `auto` branch
      which means that they're all sharing the same cache, even those for merging to
      master/beta. This means that PRs which switch between master/beta will keep
      rebuilting and having cache misses.
    
    * Caches have historically been invaliated somewhat regularly a little more
      aggressively than we'd want (I think).
    
    * We don't always need to update the contents of the cache if the Docker image
      didn't change at all, and saving off the docker layers can sometimes be quite
      expensive.
    
    For all these reasons this commit drops the usage of Travis's built-in caching
    support. Instead our own caching is used by storing blobs to S3. Normally this
    would be a very risky endeavour but we're basically priming a cache for a cache
    (docker) so if we get this wrong the failure mode is longer builds, not stale
    caches. We'll notice that pretty quickly and hopefully fix it!
    
    The logic here is inserted directly into the `src/ci/docker/run.sh` script to
    download an image based on a shasum of the `Dockerfile` and other assorted files.
    This blob, if found, is loaded into docker and we record what layers were
    inserted. After docker finishes the build (hopefully quickly with lots of cache
    hits) we then see the sha of the final image. If it's one of the layers we
    loaded then there's no need to update the cache. Otherwise we upload our layers
    to the global cache, possibly overwriting what we previously just downloaded.
    
    This is hopefully a step towards mitigating rust-lang#49278 although it doesn't
    completely fix it as it means we'll still probably have to retry builds that
    bust the cache.
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    a09e9e9 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#49285 - nrc:update, r=alexcrichton

    Update RLS and Rustfmt
    
    Fixes broken RLS tests/build
    
    r? @alexcrichton
    bors committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    55e1104 View commit details
    Browse the repository at this point in the history
  11. Vec<_> -> IndexVec<Local, _>

    oli-obk committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    bf8e4f2 View commit details
    Browse the repository at this point in the history
  12. Introduce unsafe offset_from on pointers

    Adds intrinsics::exact_div to take advantage of the unsafe, which reduces the implementation from
    ```asm
        sub rcx, rdx
        mov rax, rcx
        sar rax, 63
        shr rax, 62
        lea rax, [rax + rcx]
        sar rax, 2
        ret
    ```
    down to
    ```asm
        sub rcx, rdx
        sar rcx, 2
        mov rax, rcx
        ret
    ```
    (for `*const i32`)
    scottmcm committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    68e0ea9 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    b18b776 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4ea4dd2 View commit details
    Browse the repository at this point in the history
  15. add test for issue-48238

    csmoe committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    ced7687 View commit details
    Browse the repository at this point in the history
  16. Stabilize the copy_closures and clone_closures features

    In addition to the `Fn*` family of traits, closures now implement `Copy` (and similarly `Clone`) if all of the captures do.
    SimonSapin committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    ee67e14 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    03481f1 View commit details
    Browse the repository at this point in the history
  18. Simplify local accessors

    oli-obk committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    f9019ae View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    3a0162b View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    00721de View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#48265 - SimonSapin:nonzero, r=KodrAus

    Add 12 num::NonZero* types for primitive integers, deprecate core::nonzero
    
    RFC: rust-lang/rfcs#2307
    Tracking issue: ~~rust-lang#27730 rust-lang#49137
    Fixes rust-lang#27730
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    7cf4cb5 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#48624 - bdrewery:freebsd-posix-spawn, r=ale…

    …xcrichton
    
    Command: Support posix_spawn() on FreeBSD/OSX/GNU Linux
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    16eeb10 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#48883 - alexcrichton:wasm-custom-sections, …

    …r=nikomatsakis
    
    rustc: Add a `#[wasm_custom_section]` attribute
    
    This commit is an implementation of adding custom sections to wasm artifacts in
    rustc. The intention here is to expose the ability of the wasm binary format to
    contain custom sections with arbitrary user-defined data. Currently neither our
    version of LLVM nor LLD supports this so the implementation is currently custom
    to rustc itself.
    
    The implementation here is to attach a `#[wasm_custom_section = "foo"]`
    attribute to any `const` which has a type like `[u8; N]`. Other types of
    constants aren't supported yet but may be added one day! This should hopefully
    be enough to get off the ground with *some* custom section support.
    
    The current semantics are that any constant tagged with `#[wasm_custom_section]`
    section will be *appended* to the corresponding section in the final output wasm
    artifact (and this affects dependencies linked in as well, not just the final
    crate). This means that whatever is interpreting the contents must be able to
    interpret binary-concatenated sections (or each constant needs to be in its own
    custom section).
    
    To test this change the existing `run-make` test suite was moved to a
    `run-make-fulldeps` folder and a new `run-make` test suite was added which
    applies to all targets by default. This test suite currently only has one test
    which only runs for the wasm target (using a node.js script to use `WebAssembly`
    in JS to parse the wasm output).
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    f836ae4 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#48909 - RalfJung:type_alias_bounds, r=petro…

    …chenkov
    
    Improve lint for type alias bounds
    
    First of all, I learned just today that I was wrong assuming that the bounds in type aliases are entirely ignored: It turns out they are used to resolve associated types in type aliases. So:
    ```rust
    type T1<U: Bound> = U::Assoc; // compiles
    type T2<U> = U::Assoc; // fails
    type T3<U> = <U as Bound>::Assoc; // "correct" way to write this, maybe?
    ```
    I am sorry for creating this mess.
    
    This PR changes the wording of the lint accordingly. Moreover, since just removing the bound is no longer always a possible fix, I tried to detect cases like `T1` above and show a helpful message to the user:
    ```
    warning: bounds on generic parameters are not enforced in type aliases
      --> $DIR/type-alias-bounds.rs:57:12
       |
    LL | type T1<U: Bound> = U::Assoc; //~ WARN not enforced in type aliases
       |            ^^^^^
       |
       = help: the bound will not be checked when the type alias is used, and should be removed
    help: use absolute paths (i.e., <T as Trait>::Assoc) to refer to associated types in type aliases
      --> $DIR/type-alias-bounds.rs:57:21
       |
    LL | type T1<U: Bound> = U::Assoc; //~ WARN not enforced in type aliases
       |                     ^^^^^^^^
    ```
    I am not sure if I got this entirely right. Ideally, we could provide a suggestion involving the correct trait and type name -- however, while I have access to the HIR in the lint, I do not know how to get access to the resolved name information, like which trait `Assoc` belongs to above. The lint does not even run if that resolution fails, so I assume that information is available *somewhere*...
    
    This is a follow-up for (parts of) rust-lang#48326. Also see rust-lang#21903.
    
    This changes the name of a lint, but that lint was just merged to master yesterday and has never even been on beta.
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    7c0c7ef View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#49028 - QuietMisdreavus:the-dark-forbidden-…

    …corners-of-rustdoc, r=frewsxcv
    
    add an "unstable features" chapter to the rustdoc book
    
    There are several rustdoc features that currently are undocumented, but also don't fit with the rest of the Rustdoc Book since they're also unstable. Some of these have corresponding feature gates and chapters in the Unstable Book, but many don't, and i wanted a place to talk about them officially.
    
    Goal: talk about everything rustdoc can do that needs nightly
    
    - [x] Feature gates (extensions to the doc attribute that can be caught by the compiler)
      - [x] doc(cfg)
      - [x] doc(masked)
      - [x] doc(spotlight)
      - [x] doc(include)
    - [x] Command-line flags (features that require a CLI flag to use, where the flag itself is a `-Z` command or otherwise requires `-Z unstable-options` before rustdoc will accept it)
      - [x] markdown-before-content/markdown-after-content
      - [x] playground-url
      - [x] display-warnings
      - [x] crate-version
      - [x] linker
      - [x] sort-modules-by-appearance
      - [x] themes/theme-checker
      - [x] resource-suffix
      - [x] `-Z force-unstable-if-unmarked`
    - [x] Nightly-gated functionality (features that are gated by requiring a nightly build without needing a CLI flag or a feature gate to unlock)
      - [x] intra-links
      - [x] error numbers for `compile_fail` doctests
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    f74d01c View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#49030 - Zoxc:misc, r=michaelwoerister

    Misc changes from my parallel rustc branch
    
    r? @michaelwoerister
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    4b31b5b View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#49102 - glandium:decimal, r=aturon

    Remove core::fmt::num::Decimal
    
    Before ebf9e1a, it was used for Display::fmt, but ebf9e1a replaced
    that with a faster implementation, and nothing else uses it.
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    db2dde9 View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#49160 - estebank:issue-47457-missing-fields…

    …, r=oli-obk
    
    Reduce the diagnostic spam when multiple fields are missing in pattern
    
    Fix rust-lang#47457.
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    401a930 View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#49169 - sanxiyn:doc-only, r=aturon

    Document only-X test header
    
    This was added in rust-lang#47487 without documentation.
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    815171b View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#49262 - oli-obk:fixed_size_array_len, r=est…

    …ebank
    
    Produce nice array lengths on a best effort basis
    
    fixes rust-lang#49208
    
    r? @estebank
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    6fd3cc5 View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#49272 - semarie:cat-and-grep-gnu, r=alexcri…

    …chton
    
    Use GNU version of fgrep/egrep tool if available
    
    It is mostly for BSD system. Some tests (run-make/issue-35164 and
    run-make/cat-and-grep-sanity-check) are failing with BSD
    fgrep, whereas they pass with gnu version (gfgrep).
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    3624544 View commit details
    Browse the repository at this point in the history
  32. Rollup merge of rust-lang#49295 - csmoe:nll_test_48238, r=alexcrichton

    Add test for issue-48238
    
    Fixes rust-lang#48238
    test case made from comments in rust-lang#48238
    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    d58abe7 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    82bb41b View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    3ebe12e View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    4161ae7 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    1efe0b3 View commit details
    Browse the repository at this point in the history
  37. Test fixes

    alexcrichton committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    0e6cd8b View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    c08480f View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    e993e62 View commit details
    Browse the repository at this point in the history
  40. Fix IE11 search

    GuillaumeGomez committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    90588a9 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    fdde09c View commit details
    Browse the repository at this point in the history
  42. Remove getopts leftover from tree

    This was attempted but left incomplete in PR rust-lang#42664, where only the toml
    file was removed.
    Mark-Simulacrum committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    700fd5a View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    3bfed9e View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    f8fc5c0 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    1731bf8 View commit details
    Browse the repository at this point in the history
  46. When picking a candidate, consider the unstable ones last.

    If there is potential ambiguity after stabilizing those candidates, a
    warning will be emitted.
    kennytm committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    abf4d8b View commit details
    Browse the repository at this point in the history
  47. Changed check_stability to take an Option<NodeId> instead of `Nod…

    …eId`.
    
    This clarifies the intent of whether to emit deprecated lint or not.
    kennytm committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    0232744 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    28b2bba View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    db4f3f9 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    17cc3d7 View commit details
    Browse the repository at this point in the history
  51. Auto merge of rust-lang#49311 - SimonSapin:bootstrap-vs-rustflags-the…

    …-return, r=Mark-Simulacrum
    
    Use the same RUSTFLAGS for building and testing `bootstrap`
    
    This avoids recompiling the whole dependency graph twice for every `./x.py test` run.
    
    Fixes rust-lang#49215
    bors committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    4be5d36 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    3d0ccb2 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2018

  1. Auto merge of rust-lang#48482 - davidtwco:issue-47184, r=nikomatsakis

    NLL should identify and respect the lifetime annotations that the user wrote
    
    Part of rust-lang#47184.
    
    r? @nikomatsakis
    bors committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    ab0ef14 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#48552 - kennytm:lower-unstable-priority, r=ni…

    …komatsakis
    
    Lower the priority of unstable methods when picking a candidate.
    
    Previously, when searching for the impl of a method, we do not consider the stability of the impl. This leads to lots of insta-inference-regressions due to method ambiguity when a popular name is chosen. This has happened multiple times in Rust's history e.g.
    
    * `f64::from_bits` rust-lang#40470
    * `Ord::{min, max}` rust-lang#42496
    * `Ord::clamp` rust-lang#44095 (eventually got reverted due to these breakages)
    * `Iterator::flatten` rust-lang#48115 (recently added)
    
    This PR changes the probing order so that unstable items are considered last. If a stable item is found, the unstable items will not be considered (but a future-incompatible warning will still be emitted), thus allowing stable code continue to function without using qualified names.
    
    Once the unstable feature is stabilized, the ambiguity error will still be emitted, but the user can also use newly stable std methods, while the current situation is that downstream user is forced to update the code without any immediate benefit.
    
    (I hope that we could bring back `Ord::clamp` if this PR is merged.)
    bors committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    a0b0f5f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5dfa5f0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    287b29b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dc7eb0e View commit details
    Browse the repository at this point in the history
  6. Cleanup

    sinkuu committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    4800afa View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d6926ca View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#49251 - nikomatsakis:issue-15872-elision-impl…

    …-header, r=cramertj
    
    support elision in impl headers
    
    You can now do things like:
    
    ```
    impl MyTrait<'_> for &u32 { ... }
    ```
    
    Each `'_` or elided lifetime is a fresh parameter. `'_` and elision are still not permitted in associated type values. (Plausibly we could support that if there is a single input lifetime.) The original lifetime elision RFC was a bit unclear on this point: [as documented here, I think this is the correct interpretation, both because it fits existing impls and it's most analogous to the behavior in fns](rust-lang#15872 (comment)).
    
    We do not support elision with deprecated forms:
    
    ```
    impl MyTrait for std::cell::Ref<u32> { } // ERROR
    ```
    
    Builds on the in-band lifetime stuff.
    
    r? @cramertj
    
    Fixes rust-lang#15872
    bors committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    b4aa80d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    36322d0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4083bdf View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    433a03e View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#49046 - Zoxc:error-summary, r=michaelwoerister

    Always print `aborting due to n previous error(s)`
    
    r? @michaelwoerister
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    9c5f372 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#49076 - bobdavelisafrank:filetype-metadata-…

    …docfix, r=bluss
    
    Fix Issue rust-lang#48345, is_file, is_dir, and is_symlink note mutual exclusion
    
    The methods on the structures `fs::FileType` and `fs::Metadata` of (respectively) `is_file`, `is_dir`, and `is_symlink` had some ambiguity in documentation, where it was not noted whether files will pass those tests exclusively or not. It is now written that the tests are mutually exclusive.
    
    Fixes rust-lang#48345.
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    17d39ed View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#49089 - alexcrichton:fix-timings, r=Mark-Si…

    …mulacrum
    
    rustbuild: Tweak where timing information goes
    
    This commit tweaks where timing and step information is printed out as part of
    the build, ensuring that we do it as close to the location where work happens as
    possible. In rustbuild various functions may perform long blocking work as
    dependencies are assembled, so if we print out timing information early on we
    may accidentally time more than just the step we were intending to time!
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    23b4bf9 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#49120 - Zoxc:parallel-ci, r=alexcrichton

     Add a CI job for parallel rustc using x.py check
    
    r? @alexcrichton
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    c5264a5 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#49121 - varkor:stabilise-from_utf8_error_as…

    …_bytes, r=bluss
    
    Stabilise FromUtf8Error::as_bytes
    
    Closes rust-lang#40895.
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    adb7984 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#49122 - scottmcm:z-align-attr, r=cramertj

    Add a -Z flag for LLVM align attributes on arguments
    
    LLVM seems to still put the assume calls in when inlining, so this probably isn't in a place where it can be turned on by default, but it's interesting to experiment with.
    
    For example, this makes `mem::swap::<u64x8>` be 8x `vmovaps	ymm` instead of 16x `vmovups	xmm`, on my cpu.
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    c892e68 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#49162 - tmandry:stabilize-termination-trait…

    …, r=nikomatsakis
    
    Stabilize termination_trait, split out termination_trait_test
    
    For rust-lang#48453.
    
    First time contribution, so I'd really appreciate any feedback on how this PR can be better.
    
    Not sure exactly what kind of documentation update is needed. If there is no PR to update the reference, I can try doing that this week as I have time.
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    8d57071 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#49193 - davidtwco:issue-29893, r=alexcrichton

    Host compiler documentation
    
    Fixes rust-lang#29893. Rust Central Station PR: rust-lang/rust-central-station#40
    
    r? @alexcrichton
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    311814a View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#49194 - Zoxc:unsafe-generator, r=cramertj

    Make resuming generators unsafe instead of the creation of immovable generators
    
    cc @withoutboats
    
    Fixes rust-lang#47787
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    e2b8922 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#49203 - Eijebong:lets-cleanup-dependencies,…

    … r=Mark-Simulacrum
    
    Bump racer and home
    
    This removes 10 dependencies from the build 🎉
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    2bd27c9 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#49229 - Centril:doc/format_args_display_deb…

    …ug, r=steveklabnik
    
    Document format_args! / Arguments<'a> behavior wrt. Display and Debug
    
    This is a follow up PR to rust-lang#49067 , this documents the behavior of `format_args!` (i.e: `Argument<'a>`) wrt. `Display` and `Debug`.
    
    r? @steveklabnik
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    8c1535f View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#49235 - topecongiro:run-rustfmt/libtest, r=nrc

    Cargo fmt libtest
    
    r? @nrc
    
    Using `rustfmt 0.4.1- (87180d9 2018-03-16)` (`rustfmt --version` is a bit broken).
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    23967c3 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#49254 - Tacklebox:atan2_doc, r=QuietMisdreavus

    Fixed clockwise/counter-clockwise in atan2 documentation in f32 and f64 and included that it returns radians
    
    None
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    88277f5 View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#49268 - ordovicia:dotdot-pattern-diag, r=pe…

    …trochenkov
    
    Better diagnostics for '..' pattern fragment not in the last position
    
    Fixes rust-lang#49257.
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    3bc81f7 View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#49273 - michaelwoerister:fix-extern-proc-ma…

    …cro-defkey, r=eddyb
    
    Fix DefKey lookup for proc-macro crates.
    
    Add a special case for proc-macro crates for `def_key()` in the metadata decoder (like we already have for many other methods in there). In the long run, it would be preferable to get rid of the need for special casing proc-macro crates (see rust-lang#49271).
    
    Fixes rust-lang#48739 (though I wasn't able to come up with a regression test, unfortunately)
    
    r? @eddyb
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    2b2f916 View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#49274 - oli-obk:slow_miri, r=michaelwoerist…

    …er,eddyb
    
    Remove slow HashSet during miri stack frame creation
    
    fixes rust-lang#49237
    
    probably has a major impact on rust-lang#48846
    
    r? @michaelwoerister
    
    cc @eddyb I know you kept telling me to use vectors instead of hash containers... Now I know why.
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    924f24a View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#49290 - cuviper:unextended-dist-rustfmt, r=…

    …nikomatsakis
    
    Allow installing rustfmt without config.extended
    
    This assertion was preventing `./x.py install rustfmt` if attempted
    without an "extended" build configuration, but it actually builds and
    installs just fine.
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    177e20d View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    2580edf View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#49314 - Mark-Simulacrum:remove-getopts, r=a…

    …lexcrichton
    
    Remove getopts leftover from tree
    
    This was attempted but left incomplete in PR rust-lang#42664, where only the toml
    file was removed.
    
    cc @alexcrichton
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    3d68959 View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#49318 - steveklabnik:update-books, r=kennytm

    update books for next release
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    5454451 View commit details
    Browse the repository at this point in the history
  32. Rollup merge of rust-lang#49299 - SimonSapin:ubiquity, r=nikomatsakis

    Stabilize the copy_closures and clone_closures features
    
    In addition to the `Fn*` family of traits, closures now implement `Copy` (and similarly `Clone`) if all of the captures do.
    
    Tracking issue: rust-lang#44490
    kennytm committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    297a6e5 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    f5631d9 View commit details
    Browse the repository at this point in the history
  34. appveyor: Move run-pass-fulldeps to extra builders

    We've made headway towards splitting the test suite across two appveyor builders
    and this moves one more tests suite between builders. The last [failed
    build][fail] had its longest running test suite and I've moved that to the
    secondary builder.
    
    cc rust-lang#48844
    
    [fail]: https://ci.appveyor.com/project/rust-lang/rust/build/1.0.6782
    alexcrichton committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    796c78a View commit details
    Browse the repository at this point in the history
  35. Add flag for telling the linker to strip debuginfo when building with…

    …out it
    
    Signed-off-by: Johannes Löthberg <[email protected]>
    kyrias committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    2f0dd4a View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2018

  1. Auto merge of rust-lang#49141 - gnzlbg:simd_select, r=alexcrichton

    adds simd_select intrinsic
    
    The select SIMD intrinsic is used to select elements from two SIMD vectors using a mask:
    
    ```rust
    let mask = b8x4::new(true, false, false, true);
    let a = f32x4::new(1., 2., 3., 4.);
    let b = f32x4::new(5., 6., 7., 8.);
    assert_eq!(simd_select(mask, a, b), f32x4::new(1., 6., 7., 4.));
    ```
    
    The number of lanes between the mask and the vectors must match, but the vector width of the mask does not need to match that of the vectors. The mask is required to be a vector of signed integers.
    
    Note: this intrinsic will be exposed via `std::simd`'s vector masks - users are not expected to use it directly.
    bors committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    77e2bcb View commit details
    Browse the repository at this point in the history
  2. profiler-builtins: define COMPILER_RT_HAS_UNAME on non-msvc platforms.

    Otherwise lprofGetHostName, used by the PGO generator, won't be available.
    
    This means that PGO and coverage profiling would be restricted to systems with
    uname, but that seems acceptable.
    
    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    e8a1575 View commit details
    Browse the repository at this point in the history
  3. session: Add two tracked, exclusive codegen options for PGO profile u…

    …sage and generation.
    
    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    804f959 View commit details
    Browse the repository at this point in the history
  4. rustc_metadata: Load the profiler runtime if we're generating PGO pro…

    …file data.
    
    This contains all the actual profiling code.
    
    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    50a3872 View commit details
    Browse the repository at this point in the history
  5. rustc_llvm: rustc_trans: Thread the PGO config down to the pass manag…

    …er builder.
    
    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    324ca7a View commit details
    Browse the repository at this point in the history
  6. rustc_trans: disable probestack when using pgo-gen.

    Executables crash in the probestack function otherwise... I haven't debugged
    much further than that.
    
    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    99127ab View commit details
    Browse the repository at this point in the history
  7. rustc_trans: Fix PGO generation linking on Linux by adding the releva…

    …nt linker commands.
    
    See the linked LLVM reviews for the clang counter-parts.
    
    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    9c61c72 View commit details
    Browse the repository at this point in the history
  8. Test that pgo-gen works properly.

    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    e2183d3 View commit details
    Browse the repository at this point in the history
  9. profiler_builtins: Add missing ProfilingNameVar file to the profiler …

    …build.
    
    Otherwise opt builds with pgo-gen fail, d'oh.
    
    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    aaeb40a View commit details
    Browse the repository at this point in the history
  10. librustc_llvm: Show PGO diagnostics properly.

    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    a95c8c6 View commit details
    Browse the repository at this point in the history
  11. librustc_trans: disable profiling pre-inlining.

    It destroys performance actually.
    
    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    036e0d7 View commit details
    Browse the repository at this point in the history
  12. librustc: Convert -C pgo-gen and -C pgo-use into -Z flags.

    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    688275a View commit details
    Browse the repository at this point in the history
  13. librustc_trans: Gate the preinliner with another -Z flag.

    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    e31addf View commit details
    Browse the repository at this point in the history
  14. librustc_trans: Turn PGO diagnostics into warnings.

    They should at least be that, they usually warn about control flow mismatches,
    and or the profile being useless, which looks like at least a warning to me.
    
    Signed-off-by: Emilio Cobos Álvarez <[email protected]>
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    8a4cebd View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4053e25 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    e155ecd View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    96b8729 View commit details
    Browse the repository at this point in the history
  18. pgo: Move the tests to run-make-fulldeps, and make the profile file b…

    …e in the tmp directory properly.
    emilio committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    5af2f80 View commit details
    Browse the repository at this point in the history
  19. Polyfill LLVMBuildExactUDiv

    It was added 32 days after LLVM 3.9 shipped.
    scottmcm committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    02b5851 View commit details
    Browse the repository at this point in the history
  20. Auto merge of rust-lang#49284 - alexcrichton:use-our-own-cache, r=ken…

    …nytm
    
    ci: Don't use Travis caches for docker images
    
    This commit moves away from caching on Travis to our own caching on S3 for
    caching docker layers between builds. Unfortunately the Travis caches have over
    time had a few critical pain points:
    
    * Caches are only updated for successful builds, meaning that if a build times
      out or fails in a different location the sucessfully-created docker images
      isn't always cached. While this makes sense as a general rule of caches it
      hurts our use cases.
    
    * Caches are per-branch and builder which means that we don't have a separate
      cache on each release channel. All our merges go through the `auto` branch
      which means that they're all sharing the same cache, even those for merging to
      master/beta. This means that PRs which switch between master/beta will keep
      rebuilting and having cache misses.
    
    * Caches have historically been invaliated somewhat regularly a little more
      aggressively than we'd want (I think).
    
    * We don't always need to update the contents of the cache if the Docker image
      didn't change at all, and saving off the docker layers can sometimes be quite
      expensive.
    
    For all these reasons this commit drops the usage of Travis's built-in caching
    support. Instead our own caching is used by storing blobs to S3. Normally this
    would be a very risky endeavour but we're basically priming a cache for a cache
    (docker) so if we get this wrong the failure mode is longer builds, not stale
    caches. We'll notice that pretty quickly and hopefully fix it!
    
    The logic here is inserted directly into the `src/ci/docker/run.sh` script to
    download an image based on a shasum of the `Dockerfile` and other assorted files.
    This blob, if found, is loaded into docker and we record what layers were
    inserted. After docker finishes the build (hopefully quickly with lots of cache
    hits) we then see the sha of the final image. If it's one of the layers we
    loaded then there's no need to update the cache. Otherwise we upload our layers
    to the global cache, possibly overwriting what we previously just downloaded.
    
    This is hopefully a step towards mitigating rust-lang#49278 although it doesn't
    completely fix it as it means we'll still probably have to retry builds that
    bust the cache.
    bors committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    e5bf042 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    4a097ea View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    6264952 View commit details
    Browse the repository at this point in the history
  23. Add backticks

    Phlosioneer committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    efd0442 View commit details
    Browse the repository at this point in the history
  24. Auto merge of rust-lang#49315 - TheDan64:smaller_unsafe_block, r=josh…

    …triplett
    
    Reduce scope of unsafe block in sun_path_offset
    
    I reduced the scope of the unsafe block to the `uninitialized` call which is the only actual unsafe bit.
    bors committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    482a913 View commit details
    Browse the repository at this point in the history
  25. Fix confusing doc for scan

    The comment "the value passed on to the next iteration" confused me since it sounded more like what Haskell's [scanl](http://hackage.haskell.org/package/base-4.11.0.0/docs/Prelude.html#v:scanl) does where the closure's return value serves as both the "yielded value" *and* the new value of the "state".
    
    I tried changing the example to make it clear that the closure's return value is decoupled from the state argument.
    chisophugis committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    f198b0a View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    f966112 View commit details
    Browse the repository at this point in the history
  27. Modify tests

    pthariensflame committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    9e6991c View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    23013c7 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    1e1d907 View commit details
    Browse the repository at this point in the history
  30. Auto merge of rust-lang#49212 - kyrias:strip-debug-no-debuginfo, r=mi…

    …chaelwoerister
    
    Pass --strip-debug to GccLinker when building without debuginfo
    
    C.f. rust-lang#46034
    
    ---
    
    This brings a hello-world built by passing rustc no command line options from 2.9M to 592K on Linux.
    
    (This might need to special case MacOS or Windows, not sure if the linkers there support `--strip-debug`, and there is an annoying lack of dependable docs for the linkers there.)
    bors committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    d351805 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    fbec3ec View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2018

  1. Auto merge of rust-lang#49297 - scottmcm:offset-from, r=dtolnay

    Introduce unsafe offset_from on pointers
    
    Adds intrinsics::exact_div to take advantage of the unsafe, which reduces the implementation from
    ```asm
        sub rcx, rdx
        mov rax, rcx
        sar rax, 63
        shr rax, 62
        lea rax, [rax + rcx]
        sar rax, 2
        ret
    ```
    down to
    ```asm
        sub rcx, rdx
        sar rcx, 2
        mov rax, rcx
        ret
    ```
    (for `*const i32`)
    
    See discussion on the `offset_to` tracking issue rust-lang#41079
    
    Some open questions
    - Would you rather I split the intrinsic PR from the library PR?
    - Do we even want the safe version of the API?  rust-lang#41079 (comment)  I've added some text to its documentation that even if it's not UB, it's useless to use it between pointers into different objects.
    
    and todos
    - [x] ~~I need to make a codegen test~~ Done
    - [x] ~~Can the subtraction use nsw/nuw?~~ No, it can't rust-lang#49297 (comment)
    - [x] ~~Should there be `usize` variants of this, like there are now `add` and `sub` that you almost always want over `offset`?  For example, I imagine `sub_ptr` that returns `usize` and where it's UB if the distance is negative.~~ Can wait for later; C gives a signed result rust-lang#41079 (comment), so we might as well, and this existing to go with `offset` makes sense.
    bors committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    39ee3aa View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#49341 - alexcrichton:more-balance, r=kennytm

    appveyor: Move run-pass-fulldeps to extra builders
    
    We've made headway towards splitting the test suite across two appveyor builders
    and this moves one more tests suite between builders. The last [failed
    build][fail] had its longest running test suite and I've moved that to the
    secondary builder.
    
    cc rust-lang#48844
    
    [fail]: https://ci.appveyor.com/project/rust-lang/rust/build/1.0.6782
    bors committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    445fafa View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#49351 - pthariensflame:patch-1, r=oli-obk

    Minor message/label formatting consistency fix.
    
    The unimplemented label for `Termination` was missing some backticks for consistency with the message.
    bors committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    184156e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c393db6 View commit details
    Browse the repository at this point in the history
  5. rustbuild: Disable docs on cross-compiled builds

    This commit disables building documentation on cross-compiled compilers, for
    example ARM/MIPS/PowerPC/etc. Currently I believe we're not getting much use out
    of these documentation artifacts and they often take 10-15 minutes total to
    build as it requires building rustdoc/rustbook and then also generating all the
    documentation, especially for the reference and the book itself.
    
    In an effort to cut down on the amount of work that we're doing on dist CI
    builders in light of recent timeouts this was some relatively low hanging fruit
    to cut which in theory won't have much impact on the ecosystem in the hopes that
    the documentation isn't used too heavily anyway.
    
    While initial analysis in rust-lang#48827 showed only shaving 5 minutes off local builds
    the same 5 minute conclusion was drawn from rust-lang#48826 which ended up having nearly
    a half-hour impact on the bots. In that sense I'm hoping that we can land this
    and test out what happens on CI to see how it affects timing.
    
    Note that all tier 1 platforms, Windows, Mac, and Linux, will continue to
    generate documentation.
    alexcrichton committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    bd28641 View commit details
    Browse the repository at this point in the history
  6. implement minmax intrinsics

    gnzlbg committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    7d5343a View commit details
    Browse the repository at this point in the history
  7. add tests

    gnzlbg committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    d2cd57c View commit details
    Browse the repository at this point in the history
  8. require llvm 6

    gnzlbg committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    066c2ec View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1841f40 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    48fd903 View commit details
    Browse the repository at this point in the history
  11. fix tests

    gnzlbg committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    56aaf34 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0f5b52e View commit details
    Browse the repository at this point in the history
  13. Auto merge of rust-lang#49255 - cramertj:stable-impl-trait, r=nikomat…

    …sakis
    
    Stabilize impl Trait
    
    Blocked on:
    
    - [x] rust-lang#49041 and
    - [ ] completion of FCP in rust-lang#34511 (comment) (3 days from now).
    
    I have not yet done any docs work for this-- I probably won't get to it until this weekend (might be a project for the flight to the all-hands).
    bors committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    5e4603f View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#48346 - emilio:pgo, r=alexcrichton

    Add basic PGO support.
    
    This PR adds two mutually exclusive options for profile usage and generation using LLVM's instruction profile generation (the same as clang uses), `-C pgo-use` and `-C pgo-gen`.
    
    See each commit for details.
    bors committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    13a86f4 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#48693 - vorner:doc-name-resolution, r=petro…

    …chenkov
    
    Some comments and documentation for name resolution crate
    
    Hello
    
    I'm trying to get a grasp of how the name resolution crate works, as part of helping with rust-lang/rustc-dev-guide#16. Not that I'd be succeeding much, but as I was reading the code, I started to put some notes into it, to help me understand.
    
    I guess I didn't get very far yet, but I'd like to share what I have, in case it might be useful for someone else. I hope these are correct (even if incomplete), but I'll be glad for a fast check in case I put something misleading there.
    TimNN committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    3d7a046 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#48932 - Phlosioneer:43601-document-opaque-s…

    …ize, r=KodrAus
    
    Document when types have OS-dependent sizes
    
    As per issue rust-lang#43601, types that can change size depending on the
    target operating system should say so in their documentation.
    
    I used this template when adding doc comments:
    
    ```
    The size of a(n) <name> struct may vary depending on the target
    operating system, and may change between Rust releases.
    ```
    
    For enums, I used "instance" instead of "struct".
    
    I added documentation to these types:
    ```
    - std::time::Instant						(contains sys::time::Instant)
    - std::time::SystemTime						(contains sys::time::SystemTime)
    
    - std::io::StdinRaw							(contains sys::stdio::Stdin)
    - std::io::StdoutRaw						(contains sys::stdio::Stdout)
    - std::io::Stderr							(contains sys::stdio::Stderr)
    
    - std::net::addr::SocketAddrV4				(contains sys::net::netc::sockaddr_in)
    - std::net::addr::SocketAddrV6				(contains sys::net::netc::sockaddr_in6)
    - std::net::addr::SocketAddr				(contains std::net::addr::SocketAddrV4 and SocketAddrV6)
    - std::net::ip::Ipv4Addr					(contains sys::net::netc::in_addr)
    - std::net::ip::Ipv6Addr					(contains sys::net::netc::in6_addr)
    - std::net::ip::IpAddr						(contains std::net::ip::Ipv4Addr and Ipv6Addr)
    ```
    
    I also found that these types varied in size; however, I don't think they need documentation, as it's already fairly obvious that they change based on different OS's:
    
    ```
    - std::fs::DirBuilder						(contains sys::fs::DirBuilder)
    - std::fs::FileType							(contains sys::fs::FileType)
    - std::fs::Permissions						(contains sys::fs::FilePermissions)
    - std::fs::OpenOptions						(contains sys::fs::OpenOptions)
    - std::fs::DirEntry							(contains sys::fs::DirEntry)
    - std::fs::ReadDir							(contains sys::fs::ReadDir)
    - std::fs::Metadata							(contains sys::fs::FileAttr)
    - std::fs::File								(contains sys::fs::File)
    
    - std::process::Child						(contains sys::process::Process)
    - std::process::ChildStdin					(contains sys::process::AnonPipe)
    - std::process::ChildStdout					(contains sys::process::AnonPipe)
    - std::process::ChildStderr					(contains sys::process::AnonPipe)
    - std::process::Command						(contains sys::process::Command)
    - std::process::Stdio						(contains sys::process::Stdio)
    - std::process::ExitStatus					(contains sys::process::ExitStatus)
    - std::process::Output						(contains std::process::ExitStatus)
    
    - std::sys_common::condvar::Condvar			(contains sys::condvar::Condvar)
    - std::sys_common::mutex::Mutex				(contains sys::mutex::Mutex)
    - std::sys_common::net::LookupHost			(contains sys::net::netc::addrinfo)
    - std::sys_common::net::TcpStream			(contains sys::net::Socket)
    - std::sys_common::net::TcpListener			(contains sys::net::Socket)
    - std::sys_common::net::UdpSocket			(contains sys::net::Socket)
    - std::sys_common::remutex::ReentrantMutex	(contains sys::mutex::ReentrantMutex)
    - std::sys_common::rwlock::RWLock			(contains sys::rwlock::RWLock)
    - std::sys_common::thread_local::Key		(contains sys::thread_local::Key)
    ```
    Maybe we should just put a comment about the size of structs in the module-level docs for `fs`, `process`, and `sys_common`?
    
    If anyone can think of other types that can change size, comment below. I'm also open to changing the wording.
    
    closes rust-lang#43601.
    TimNN committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    571734f View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#49103 - glandium:uninitialized, r=cramertj

    Use an uninitialized buffer in GenericRadix::fmt_int, like in Display::fmt for numeric types
    
    The code using a slice of that buffer is only ever going to use
    bytes that are subsequently initialized.
    TimNN committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    fc9dfda View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#49170 - steveklabnik:gh49127, r=nagisa

    Clarify AcqRel's docs
    
    This implied things that are not true.
    
    Fixes rust-lang#49127
    TimNN committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    9e4d5cf View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#49187 - alexcrichton:no-cross-docs, r=kennytm

    rustbuild: Disable docs on cross-compiled builds
    
    This commit disables building documentation on cross-compiled compilers, for
    example ARM/MIPS/PowerPC/etc. Currently I believe we're not getting much use out
    of these documentation artifacts and they often take 10-15 minutes total to
    build as it requires building rustdoc/rustbook and then also generating all the
    documentation, especially for the reference and the book itself.
    
    In an effort to cut down on the amount of work that we're doing on dist CI
    builders in light of recent timeouts this was some relatively low hanging fruit
    to cut which in theory won't have much impact on the ecosystem in the hopes that
    the documentation isn't used too heavily anyway.
    
    While initial analysis in rust-lang#48827 showed only shaving 5 minutes off local builds
    the same 5 minute conclusion was drawn from rust-lang#48826 which ended up having nearly
    a half-hour impact on the bots. In that sense I'm hoping that we can land this
    and test out what happens on CI to see how it affects timing.
    
    Note that all tier 1 platforms, Windows, Mac, and Linux, will continue to
    generate documentation.
    TimNN committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    bd3db2b View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#49346 - Diggsey:hashmap-get-pair, r=Mark-Si…

    …mulacrum
    
    Implement get_key_value for HashMap, BTreeMap
    
    Fixes rust-lang#43143
    
    Follow up from rust-lang#46992
    TimNN committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    d601e74 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#49353 - chisophugis:patch-1, r=Mark-Simulacrum

    Fix confusing doc for `scan`
    
    The comment "the value passed on to the next iteration" confused me since it sounded more like what Haskell's [scanl](http://hackage.haskell.org/package/base-4.11.0.0/docs/Prelude.html#v:scanl) does where the closure's return value serves as both the "yielded value" *and* the new value of the "state".
    
    I tried changing the example to make it clear that the closure's return value is decoupled from the state argument.
    TimNN committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    1233aa2 View commit details
    Browse the repository at this point in the history
  22. Add is_whitespace and is_alphanumeric to str.

    The other methods from `UnicodeStr` are already stable inherent
    methods on str, but these have not been included.
    boats committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    1e2458e View commit details
    Browse the repository at this point in the history
  23. Stabilize i128_type

    mark-i-m committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    7ce8191 View commit details
    Browse the repository at this point in the history
  24. Update nightly book

    mark-i-m committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    33d9d8e View commit details
    Browse the repository at this point in the history
  25. Stabilize i128 feature too

    mark-i-m committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    db7d9ea View commit details
    Browse the repository at this point in the history
  26. Rename unstable-book chapter

    mark-i-m committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    a89d1d0 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    a249d25 View commit details
    Browse the repository at this point in the history
  28. remove unneeded import

    mark-i-m committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    ea89b50 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    0710469 View commit details
    Browse the repository at this point in the history
  30. Fix a few more

    mark-i-m committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    a7f21f1 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    463865e View commit details
    Browse the repository at this point in the history
  32. update test

    mark-i-m committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    1fd964b View commit details
    Browse the repository at this point in the history
  33. Fix e0658 ui test

    mark-i-m committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    afc9890 View commit details
    Browse the repository at this point in the history
  34. Remove library feature test

    mark-i-m committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    ec98718 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    66c8cdb View commit details
    Browse the repository at this point in the history
  36. did i get it right now?

    mark-i-m committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    6b625b3 View commit details
    Browse the repository at this point in the history
  37. fix last two tidy

    mark-i-m committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    140bf94 View commit details
    Browse the repository at this point in the history
  38. Remove unnecessary trait import.

    boats committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    5fc7e0a View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    bda718f View commit details
    Browse the repository at this point in the history
  40. Auto merge of rust-lang#49379 - TimNN:rollup, r=TimNN

    Rollup of 7 pull requests
    
    - Successful merges: rust-lang#48693, rust-lang#48932, rust-lang#49103, rust-lang#49170, rust-lang#49187, rust-lang#49346, rust-lang#49353
    - Failed merges:
    bors committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    ab8b961 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    3908b2e View commit details
    Browse the repository at this point in the history
  42. Canonicalize paths

    phil-opp committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    7b49190 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    b889f98 View commit details
    Browse the repository at this point in the history
  44. Auto merge of rust-lang#49101 - mark-i-m:stabilize_i128, r=nagisa

    Stabilize 128-bit integers 🎉
    
    cc rust-lang#35118
    
    EDIT: This should be merged only after the following have been merged:
    - [x] rust-lang/compiler-builtins#236
    - [x] rust-lang/book#1230
    bors committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    188e693 View commit details
    Browse the repository at this point in the history
  45. rustbuild: Fail the build if we build Cargo twice

    This commit updates the `ToolBuild` step to stream Cargo's JSON messages, parse
    them, and record all libraries built. If we build anything twice (aka Cargo)
    it'll most likely happen due to dependencies being recompiled which is caught by
    this check.
    alexcrichton committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    faebcc1 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    a637dd0 View commit details
    Browse the repository at this point in the history
  47. Auto merge of rust-lang#49053 - alexcrichton:fail-if-build-cargo-twic…

    …e, r=Mark-Simulacrum
    
    rustbuild: Fail the build if we build Cargo twice
    
    This commit updates the `ToolBuild` step to stream Cargo's JSON messages, parse
    them, and record all libraries built. If we build anything twice (aka Cargo)
    it'll most likely happen due to dependencies being recompiled which is caught by
    this check.
    bors committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    989b257 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    9c7b69e View commit details
    Browse the repository at this point in the history
  49. TryFrom for integers: use From instead for truely-infallible impls

    There is precendent in C for having a minimum pointer size, but I don’t feel confident enough about the future to mandate a maximum.
    SimonSapin committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    2178ef8 View commit details
    Browse the repository at this point in the history
  50. Don’t use type Error = ! for target-dependant TryFrom impls.

    Instead, expose apparently-fallible conversions in cases where
    the implementation happens to be infallible for a given target.
    
    Having an associated type / return type in a public API change
    based on the target is a portability hazard.
    SimonSapin committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    9fd399f View commit details
    Browse the repository at this point in the history
  51. Stabilize the TryFrom and TryInto traits

    Tracking issue: rust-lang#33417
    SimonSapin committed Mar 26, 2018
    Configuration menu
    Copy the full SHA
    e53a2a7 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    09008cc View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    604bbee View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2018

  1. Fix diagnostic colors on Windows 10 console.

    This updates termcolor to pick up BurntSushi/ripgrep#867.
    
    Fixes rust-lang#49322.
    ehuss committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    0f1c649 View commit details
    Browse the repository at this point in the history
  2. Add missing '?' to format grammar.

    Alexis Hunt committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    554dd3e View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#49249 - gnzlbg:simd_minmax, r=alexcrichton

    implement minmax intrinsics
    
    This adds the `simd_{fmin,fmax}` intrinsics, which do a vertical (lane-wise) `min`/`max` for floating point vectors that's equivalent to Rust's `min`/`max` for `f32`/`f64`.
    
    It might make sense to make `{f32,f64}::{min,max}` use the `minnum` and `minmax` intrinsics as well.
    
    ---
    
    ~~HELP: I need some help with these. Either I should go to sleep or there must be something that I must be missing. AFAICT I am calling the `maxnum` builder correctly, yet rustc/LLVM seem to insert a call to `llvm.minnum` there instead...~~ EDIT: Rust's LLVM version is too old :/
    bors committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    31ae4f9 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#49279 - varkor:generated-closure-return-type,…

    … r=alexcrichton
    
    Fix implicit closure return type generation for libsyntax
    
    The `lambda` function for constructing closures in libsyntax was explicitly setting the return type to `_`, which resulted in incorrect corresponding syntax (as `|| -> _ x` is not valid, without the enclosing brackets). This meant the generated code, when printed, was invalid.
    
    I also took the opportunity to slightly improve the generated code for the `RustcEncodable::encode` method for unit structs.
    
    Fixes rust-lang#42213.
    bors committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    14ac1b5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    837d6c7 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#48639 - varkor:sort_by_key-cached, r=bluss

    Add slice::sort_by_cached_key as a memoised sort_by_key
    
    At present, `slice::sort_by_key` calls its key function twice for each comparison that is made. When the key function is expensive (which can often be the case when `sort_by_key` is chosen over `sort_by`), this can lead to very suboptimal behaviour.
    
    To address this, I've introduced a new slice method, `sort_by_cached_key`, which has identical semantic behaviour to `sort_by_key`, except that it guarantees the key function will only be called once per element.
    
    Where there are `n` elements and the key function is `O(m)`:
    - `slice::sort_by_cached_key` time complexity is `O(m n log m n)`, compared to `slice::sort_by_key`'s `O(m n + n log n)`.
    - `slice::sort_by_cached_key` space complexity remains at `O(n + m)`. (Technically, it now reserves a slice of size `n`, whereas before it reserved a slice of size `n/2`.)
    
    `slice::sort_unstable_by_key` has not been given an analogue, as it is important that unstable sorts are in-place, which is not a property that is guaranteed here. However, this also means that `slice::sort_unstable_by_key` is likely to be slower than `slice::sort_by_cached_key` when the key function does not have negligible complexity. We might want to explore this trade-off further in the future.
    
    Benchmarks (for a vector of 100 `i32`s):
    ```
    # Lexicographic: `|x| x.to_string()`
    test bench_sort_by_key ... bench:      112,638 ns/iter (+/- 19,563)
    test bench_sort_by_cached_key ... bench:       15,038 ns/iter (+/- 4,814)
    
    # Identity: `|x| *x`
    test bench_sort_by_key ... bench:        1,346 ns/iter (+/- 238)
    test bench_sort_by_cached_key ... bench:        1,839 ns/iter (+/- 765)
    
    # Power: `|x| x.pow(31)`
    test bench_sort_by_key ... bench:        3,624 ns/iter (+/- 738)
    test bench_sort_by_cached_key ... bench:        1,997 ns/iter (+/- 311)
    
    # Abs: `|x| x.abs()`
    test bench_sort_by_key ... bench:        1,546 ns/iter (+/- 174)
    test bench_sort_by_cached_key ... bench:        1,668 ns/iter (+/- 790)
    ```
    (So it seems functions that are single operations do perform slightly worse with this method, but for pretty much any more complex key, you're better off with this optimisation.)
    
    I've definitely found myself using expensive keys in the past and wishing this optimisation was made (e.g. for rust-lang#47415). This feels like both desirable and expected behaviour, at the small cost of slightly more stack allocation and minute degradation in performance for extremely trivial keys.
    
    Resolves rust-lang#34447.
    kennytm committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    42de36d View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#49223 - GuillaumeGomez:propose-variant-for-…

    …E0599, r=cramertj
    
    Propose a variant if it is an enum for E0599
    
    Fixes rust-lang#49192.
    kennytm committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    3d910b8 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#49333 - GuillaumeGomez:link-assoc-const, r=…

    …QuietMisdreavus
    
    Fix impl assoc constant link not working
    
    Fixes rust-lang#49323.
    
    r? @QuietMisdreavus
    kennytm committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    68a2e73 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#49369 - petrochenkov:rprint, r=oli-obk

    Fix pretty-printing for raw identifiers
    kennytm committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    dbd6c56 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#49381 - withoutboats:str_unicode, r=SimonSapin

    Add is_whitespace and is_alphanumeric to str.
    
    The other methods from `UnicodeStr` are already stable inherent
    methods on str, but these have not been included.
    
    r? @SimonSapin
    kennytm committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    1c45f6c View commit details
    Browse the repository at this point in the history
  11. Add back 1.24.1 release notes

    WiSaGaN committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    6313997 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#49395 - petrochenkov:obsolete, r=alexcrichton

    libsyntax: Remove obsolete.rs
    
    This little piece of infra is obsolete (ha-ha) and is unlikely to be used in the future, even if new obsolete syntax appears.
    kennytm committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    5eb4689 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#49399 - ehuss:termcolor-update, r=alexcrichton

    Fix diagnostic colors on Windows 10 console.
    
    This updates termcolor to pick up BurntSushi/ripgrep#867.
    
    Fixes rust-lang#49322.
    kennytm committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    2d05bde View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#49401 - alercah:format, r=cramertj

    Add missing '?' to format grammar.
    kennytm committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    b4bc2b0 View commit details
    Browse the repository at this point in the history
  15. Auto merge of rust-lang#49305 - SimonSapin:fallible, r=sfackler

    Stabilize TryFrom / TryInto, and tweak impls for integers
    
    Fixes rust-lang#33417 (tracking issue)
    
    ----
    
    This adds:
    
    * `impl From<u16> for usize`
    * `impl From<i16> for isize`
    * `impl From<u8> for isize`
    
    … replacing corresponding `TryFrom<Error=!>` impls. (`TryFrom` still applies through the generic `impl<T, U> TryFrom<U> for T where T: From<U>`.) Their infallibility is supported by the C99 standard which (indirectly) requires pointers to be at least 16 bits.
    
    The remaining `TryFrom` impls that define `type Error = !` all involve `usize` or `isize`. This PR changes them to use `TryFromIntError` instead, since having a return type change based on the target is a portability hazard.
    
    Note: if we make similar assumptions about the *maximum* bit size of pointers (for all targets Rust will ever run on in the future), we could have similar `From` impls converting pointer-sized integers to large fixed-size integers. RISC-V considers the possibility of a 128-bit address space (RV128), which would leave only `impl From<usize> for u128` and `impl From<isize> for u128`. I [found](https://www.cl.cam.ac.uk/research/security/ctsrd/pdfs/20171017a-cheri-poster.pdf) some [things](http://www.csl.sri.com/users/neumann/2012resolve-cheri.pdf) about 256-bit “capabilities”, but I don’t know how relevant that would be to Rust’s `usize` and `isize` types.
    
    I chose conservatively to make no assumption about the future there. Users making their portability decisions and using something like `.try_into().unwrap()`.
    
    ----
    
    Since this feature already went through FCP in the tracking issue rust-lang#33417, this PR also proposes **stabilize** the following items:
    
    * The `convert::TryFrom` trait
    * The `convert::TryFrom` trait
    * `impl<T> TryFrom<&[T]> for &[T; $N]` (for `$N` up to 32)
    * `impl<T> TryFrom<&mut [T]> for &mut [T; $N]` (for `$N` up to 32)
    * The `array::TryFromSliceError` struct, with impls of `Debug`, `Copy`, `Clone`, and `Error`
    * `impl TryFrom<u32> for char`
    * The `char::CharTryFromError` struct, with impls of `Copy`, `Clone`, `Debug`, `PartialEq`, `Eq`, `Display`, and `Error`
    * Impls of `TryFrom` for all (?) combinations of primitive integer types where `From` isn’t implemented.
    * The `num::TryFromIntError` struct, with impls of `Debug`, `Copy`, `Clone`, `Display`, `From<!>`, and `Error`
    
    Some minor remaining questions that I hope can be resolved in this PR:
    
    * Should the impls for error types be unified?
    * ~Should `TryFrom` and `TryInto` be in the prelude? `From` and `Into` are.~ (Yes.)
    bors committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    3efe61c View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    5b1a600 View commit details
    Browse the repository at this point in the history
  17. Auto merge of rust-lang#49202 - csmoe:trait_engine, r=nikomatsakis

    Introduce trait engine
    
    address rust-lang#48895 step 1: introduce trait engine
    bors committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    9c9424d View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#49417 - TimNN:fix-ios, r=alexcrichton

    Update compiler-rt with fix for 32bit iOS ARM
    kennytm committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    0873974 View commit details
    Browse the repository at this point in the history
  19. Update CONTRIBUTING.md

    The current link is a 404, just link to the main repo page
    lukaslueg committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    f513fbd View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#49407 - WiSaGaN:patch-1, r=alexcrichton

    Add back 1.24.1 release notes
    kennytm committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    19fe9d1 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#49426 - lukaslueg:patch-1, r=kennytm

    Update CONTRIBUTING.md
    
    The current link is a 404, just link to the main repo page
    kennytm committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    605ea7c View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2018

  1. Configuration menu
    Copy the full SHA
    59ec9bf View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#49304 - sinkuu:impl_trait_rustdoc, r=QuietMis…

    …dreavus
    
    Rustdoc support for universal_impl_trait
    
    Hides type parameters synthesized by `impl Trait`-in-argument-position, and enables links to trait names.
    
    <img alt="before" src="https://user-images.githubusercontent.com/7091080/37831646-a61413c6-2ee9-11e8-8ec2-a6137956d922.png" width="450"/>
    ↓
    <img alt="after" src="https://user-images.githubusercontent.com/7091080/37831657-b2ff0ae6-2ee9-11e8-8797-fdad904782bf.png" width="450"/>
    
    Fixes rust-lang#49309
    bors committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    e58df0d View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#49383 - nox:scalarpair, r=eddyb

    Allow niche-filling dataful variants to be represented as a ScalarPair
    
    r? @eddyb
    bors committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    bcffdf1 View commit details
    Browse the repository at this point in the history
  4. Stabilize match_default_bindings

    This includes a submodule update to rustfmt
    in order to allow a stable feature declaration.
    cramertj committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    3c65f53 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#49019 - phil-opp:target-spec, r=pnkfelix

    Introduce a TargetTriple enum to support absolute target paths
    
    This PR replaces target triple strings with a `TargetTriple` enum, which represents either a target triple or a path to a JSON target file. The path variant is used if the `--target` argument has a `.json` extension, else the target triple variant is used.
    
    The motivation of this PR is support for absolute target paths to avoid the need for setting the `RUST_TARGET_PATH` environment variable (see rust-lang/cargo#4905 for more information). For places where some kind of triple is needed (e.g. in the sysroot folder), we use the file name (without extension).
    
    For compatibility, we keep the old behavior of searching for a file named `$(target_triple).json` in `RUST_TARGET_PATH` for non-official target triples.
    bors committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    d87c19d View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#49394 - cramertj:stable-match-bindings, r=nik…

    …omatsakis
    
    Stabilize match_default_bindings
    
    This includes a submodule update to rustfmt
    in order to allow a stable feature declaration.
    
    r? @nikomatsakis
    
    cc rust-lang#42640
    
    Many of the tests this PR touches are merely testing the current lack of desired future behavior around rust-lang#44849 and rust-lang#44848 (cc @tschottdorf). I noticed the bullets for those items were checked on the tracking issue-- I've unchecked them, as they don't appear to have been completed and I don't see any comments indicating that we don't want to pursue them further. Still, I think it's fine to stabilize the current behavior, as I think expanding it in the future should be backwards-compatible.
    bors committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    1169541 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3d64648 View commit details
    Browse the repository at this point in the history
  8. Make core::nonzero private

    It is now an implementation detail of ptr::NonNull and num::NonZero*
    SimonSapin committed Mar 28, 2018
    Configuration menu
    Copy the full SHA
    8adea83 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d43ca37 View commit details
    Browse the repository at this point in the history