Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Rollup of 11 pull requests #52588

Closed
wants to merge 40 commits into from
Closed

Rollup of 11 pull requests #52588

wants to merge 40 commits into from

Commits on Jun 11, 2018

  1. Remove highlighting from secondary messages

    Deemphasize the secondary messages so that all other highlights stand
    out more.
    estebank committed Jun 11, 2018
    Configuration menu
    Copy the full SHA
    ed5dcc3 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2018

  1. Configuration menu
    Copy the full SHA
    7c31609 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aaf2004 View commit details
    Browse the repository at this point in the history
  3. review fix

    newpavlov committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    f1cc8b2 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2018

  1. Don't use SIMD in mem::swap for types smaller than the block size

    LLVM isn't able to remove the alloca for the unaligned block in the SIMD tail in some cases, so doing this helps SRoA work in cases where it currently doesn't.  Found in the `replace_with` RFC discussion.
    scottmcm committed Jul 4, 2018
    Configuration menu
    Copy the full SHA
    1f73144 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2018

  1. Configuration menu
    Copy the full SHA
    c3e2ff8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    44b7a80 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    990a2ff View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2018

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

Commits on Jul 17, 2018

  1. Fix rust issue rust-lang#52163

    sekineh committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    bbc89b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e15c7bd View commit details
    Browse the repository at this point in the history
  3. Adjust TARGETS.

    sekineh committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    d8e64e1 View commit details
    Browse the repository at this point in the history
  4. Cleanup Dockerfile.

    sekineh committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    355b99f View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2018

  1. Configuration menu
    Copy the full SHA
    0b3b8bf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7630090 View commit details
    Browse the repository at this point in the history
  3. Document that Unique::empty() and NonNull::dangling() aren't sentinel…

    … values
    
    The documentation of Unique::empty() and NonNull::dangling() could
    potentially suggest that they work as sentinel values indicating a
    not-yet-initialized pointer. However, they both declare a non-null
    pointer equal to the alignment of the type, which could potentially
    reference a valid value of that type (specifically, the first such valid
    value in memory). Explicitly document that the return value of these
    functions does not work as a sentinel value.
    joshtriplett committed Jul 18, 2018
    Configuration menu
    Copy the full SHA
    ce75632 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2018

  1. Fix links in rustdoc book.

    Due to a change in how mdbook generates section anchors, headers
    with non-alphabetic characters now start with "a".
    ehuss committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    3074c42 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2018

  1. Reword when _ couldn't be inferred

    Esteban Küber committed Jul 20, 2018
    Configuration menu
    Copy the full SHA
    e1ef8ba View commit details
    Browse the repository at this point in the history
  2. Fix new test

    Esteban Küber committed Jul 20, 2018
    Configuration menu
    Copy the full SHA
    70e7e7d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a18be44 View commit details
    Browse the repository at this point in the history
  4. Add tests for rust-lang#34784

    wesleywiser committed Jul 20, 2018
    Configuration menu
    Copy the full SHA
    472bb2b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    902da14 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6e6f00d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    875b3e3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    469312a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f2bc03f View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2018

  1. Typo

    felixrabe committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    c581b96 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f00b1c View commit details
    Browse the repository at this point in the history
  3. Add missing backtick

    csmoe committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    50720ba View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#51807 - newpavlov:deprecate_str_slice, r=al…

    …excrichton
    
    Deprecation of str::slice_unchecked(_mut)
    
    Closes rust-lang#51715
    
    I am not sure if 1.28.0 or 1.29.0 should be used for deprecation version, for now it's 1.28.0.
    
    Additionally I've replaced `slice_unchecked` uses with `get_unchecked`. The only places where this method is still used are `src/liballoc/tests/str.rs` and `src/liballoc/tests/str.rs`.
    kennytm committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    590c971 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#52051 - scottmcm:swap-directly, r=alexcrichton

    mem::swap the obvious way for types smaller than the SIMD optimization's block size
    
    LLVM isn't able to remove the alloca for the unaligned block in the post-SIMD tail in some cases, so doing this helps SRoA work in cases where it currently doesn't.  Found in the `replace_with` RFC discussion.
    
    Examples of the improvements:
    <details>
     <summary>swapping `[u16; 3]` takes 1/3 fewer instructions and no stackalloc</summary>
    
    ```rust
    type Demo = [u16; 3];
    pub fn swap_demo(x: &mut Demo, y: &mut Demo) {
        std::mem::swap(x, y);
    }
    ```
    
    nightly:
    ```asm
    _ZN4blah9swap_demo17ha1732a9b71393a7eE:
    .seh_proc _ZN4blah9swap_demo17ha1732a9b71393a7eE
    	sub	rsp, 32
    	.seh_stackalloc 32
    	.seh_endprologue
    	movzx	eax, word ptr [rcx + 4]
    	mov	word ptr [rsp + 4], ax
    	mov	eax, dword ptr [rcx]
    	mov	dword ptr [rsp], eax
    	movzx	eax, word ptr [rdx + 4]
    	mov	word ptr [rcx + 4], ax
    	mov	eax, dword ptr [rdx]
    	mov	dword ptr [rcx], eax
    	movzx	eax, word ptr [rsp + 4]
    	mov	word ptr [rdx + 4], ax
    	mov	eax, dword ptr [rsp]
    	mov	dword ptr [rdx], eax
    	add	rsp, 32
    	ret
    	.seh_handlerdata
    	.section	.text,"xr",one_only,_ZN4blah9swap_demo17ha1732a9b71393a7eE
    	.seh_endproc
    ```
    
    this PR:
    ```asm
    _ZN4blah9swap_demo17ha1732a9b71393a7eE:
    	mov	r8d, dword ptr [rcx]
    	movzx	r9d, word ptr [rcx + 4]
    	movzx	eax, word ptr [rdx + 4]
    	mov	word ptr [rcx + 4], ax
    	mov	eax, dword ptr [rdx]
    	mov	dword ptr [rcx], eax
    	mov	word ptr [rdx + 4], r9w
    	mov	dword ptr [rdx], r8d
    	ret
    ```
    </details>
    
    <details>
     <summary>`replace_with` optimizes down much better</summary>
    
    Inspired by rust-lang/rfcs#2490,
    
    ```rust
    fn replace_with<T, F>(x: &mut Option<T>, f: F)
        where F: FnOnce(Option<T>) -> Option<T>
    {
        *x = f(x.take());
    }
    
    pub fn inc_opt(mut x: &mut Option<i32>) {
        replace_with(&mut x, |i| i.map(|j| j + 1));
    }
    ```
    
    Rust 1.26.0:
    ```asm
    _ZN4blah7inc_opt17heb0acb64c51777cfE:
    	mov	rax, qword ptr [rcx]
    	movabs	r8, 4294967296
    	add	r8, rax
    	shl	rax, 32
    	movabs	rdx, -4294967296
    	and	rdx, r8
    	xor	r8d, r8d
    	test	rax, rax
    	cmove	rdx, rax
    	setne	r8b
    	or	rdx, r8
    	mov	qword ptr [rcx], rdx
    	ret
    ```
    
    Nightly (better thanks to ScalarPair, maybe?):
    ```asm
    _ZN4blah7inc_opt17h66df690be0b5899dE:
    	mov	r8, qword ptr [rcx]
    	mov	rdx, r8
    	shr	rdx, 32
    	xor	eax, eax
    	test	r8d, r8d
    	setne	al
    	add	edx, 1
    	mov	dword ptr [rcx], eax
    	mov	dword ptr [rcx + 4], edx
    	ret
    ```
    
    This PR:
    ```asm
    _ZN4blah7inc_opt17h1426dc215ecbdb19E:
    	xor	eax, eax
    	cmp	dword ptr [rcx], 0
    	setne	al
    	mov	dword ptr [rcx], eax
    	add	dword ptr [rcx + 4], 1
    	ret
    ```
    
    Where that add is beautiful -- using an addressing mode to not even need to explicitly go through a register -- and the remaining imperfection is well-known (rust-lang#49420 (comment)).
    </details>
    kennytm committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    a7cdf9a View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#52507 - estebank:infer-type, r=nikomatsakis

    Reword when `_` couldn't be inferred
    
    r? @nikomatsakis
    kennytm committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    2e0d526 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#52558 - wesleywiser:ice_melting, r=estebank

    Add tests for ICEs which no longer repro
    
    Adds tests for some ICEs which no longer repro and closes the associated issues.
    kennytm committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    d6b152e View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#52581 - petrochenkov:bmacrodoc, r=alexcrichton

    Avoid using `#[macro_export]` for documenting builtin macros
    
    Use a special `rustc_*` attribute instead.
    
    cc rust-lang#52234
    kennytm committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    7b5d91f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    53b41c2 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#52521 - ehuss:rustdoc-passes-doc, r=kennytm

    Fix links in rustdoc book.
    
    Due to a change in how mdbook generates section anchors, headers
    with non-alphabetic characters now start with "a".
    kennytm committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    b312701 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#52587 - csmoe:doc, r=kennytm

    Add missing backtick in UniversalRegions doc comment
    kennytm committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    c5b309b View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#52465 - sekineh:add-ci-thumb, r=alexcrichton

    Add CI test harness for `thumb*` targets. [IRR-2018-embedded]
    
    This pull request will do the following (rather trivial) changes:
    - Fix rust-lang#52163. In other words, we enabled `./x.py test src/test/run-make` for `no_std` targets.
    - Modify `dist-various-1` Dockerfile.
      - CI now performs `run-make` test run on the targets below:
        - `thumbv6m-none-eabi`
        - `thumbv7m-none-eabi`
        - `thumbv7em-none-eabi`
        - `thumbv7em-none-eabihf`.
    - ~~Add `thumb-none` Dockerfile.~~
      - ~~Initially, `thumbv7m-none-eabi`, `thumbv7em-none-eabi` and `thumbv7em-none-eabihf` are included as the tested target. `thumbv6m-none-eabi` is disabled for now because LLVM support is not certain.~~
    - ~~Add `thumb-none` to .travis.yml~~
    
    Note:
    - `run-make` tests are not implemented yet. This PR is test harness only.
    
    The amount of change is very small, but I'd like to open the pull request while the change is trivial.
    Because I'm not very used to pull request process, I want to make a small progress first.  This PR will be a foundation for later additions.
    kennytm committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    f79284a View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#51485 - estebank:dehighlight-secondary-msgs…

    …, r=GuillaumeGomez
    
    Remove highlighting from secondary messages
    
    Deemphasize the secondary messages so that all other highlights stand
    out more.
    
    <img width="684" alt="" src="https://user-images.githubusercontent.com/1606434/41261199-7b4fe96e-6d8f-11e8-8619-04d170617df2.png">
    kennytm committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    51f50ad View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#52508 - joshtriplett:dangling-not-sentinel,…

    … r=Mark-Simulacrum
    
    Document that Unique::empty() and NonNull::dangling() aren't sentinel values
    
    The documentation of Unique::empty() and NonNull::dangling() could
    potentially suggest that they work as sentinel values indicating a
    not-yet-initialized pointer. However, they both declare a non-null
    pointer equal to the alignment of the type, which could potentially
    reference a valid value of that type (specifically, the first such valid
    value in memory). Explicitly document that the return value of these
    functions does not work as a sentinel value.
    kennytm committed Jul 21, 2018
    Configuration menu
    Copy the full SHA
    3c66e8b View commit details
    Browse the repository at this point in the history