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 5 pull requests #69418

Closed
wants to merge 10 commits into from

Commits on Feb 22, 2020

  1. Relax str::get_unchecked precondition to permit empty slicing

    Prior to this commit, `str` documented that `get_unchecked` had
    the precondition that "`begin` must come before `end`". This would appear
    to prohibit empty slices (i.e. begin == end).
    
    In practice, get_unchecked is called often with empty slices. Let's relax
    the precondition so as to allow them.
    ridiculousfish committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    9e41c4b View commit details
    Browse the repository at this point in the history
  2. Fix doc example for MaybeUninit::get_mut()

    Suggested by @ametisf in rust-lang#65948 (comment)
    
    Co-Authored-By: Frantisek Fladung <fladufra@fel.cvut.cz>
    danielhenrymantilla and Frantisek Fladung committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    2cf339a View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2020

  1. Configuration menu
    Copy the full SHA
    ad47bf5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    78e4bd1 View commit details
    Browse the repository at this point in the history
  3. Update links

    Formatting fixes
    
    Now that I can actually run `python x.py test src/tools/tidy` locally
    ... my god it takes a long time to compile when you're on a cellular
    connection.
    
    Removing unnecessary whitespaces
    
    Updates src/test/ui/json-short.stderr golden test file
    
    Fixes test failure by updating the golden file for changes
    in src/librustc_error_codes/error_codes/E0601.md
    
    Update src/librustc_error_codes/error_codes/E0080.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/librustc_error_codes/error_codes/E0080.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/librustc_error_codes/error_codes/E0080.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/librustc_error_codes/error_codes/E0154.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/librustc_error_codes/error_codes/E0154.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/librustc_error_codes/error_codes/E0661.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/librustc_error_codes/error_codes/E0662.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/librustc_error_codes/error_codes/E0663.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/librustc_error_codes/error_codes/E0664.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/test/ui/json-short.stderr
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/librustc_error_codes/error_codes/E0260.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/librustc_error_codes/error_codes/E0154.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Update src/librustc_error_codes/error_codes/E0260.md
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Apply suggestions from code review
    
    Co-Authored-By: varkor <github@varkor.com>
    
    Fixing 1 character over 80 cascade
    yawpitch committed Feb 23, 2020
    Configuration menu
    Copy the full SHA
    c103a16 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2020

  1. Rollup merge of rust-lang#69372 - yawpitch:master, r=varkor

    Updates links in various Compiler Error Index entries
    
    Currently many of the links in the online https://doc.rust-lang.org/error-index.html are not clickable, and many of them don't resolve correctly as they point to older versions of rustbyexample and the reference.
    Dylan-DPC authored Feb 24, 2020
    Configuration menu
    Copy the full SHA
    a4ba75b View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#69385 - ridiculousfish:relax_get_unchecked,…

    … r=nagisa
    
    Relax str::get_unchecked precondition to permit empty slicing
    
    Prior to this commit, `str` documented that `get_unchecked` had
    the precondition that "`begin` must come before `end`". This would appear
    to prohibit empty slices (i.e. begin == end).
    
    In practice, get_unchecked is called often with empty slices. Let's relax
    the precondition so as to allow them.
    Dylan-DPC authored Feb 24, 2020
    Configuration menu
    Copy the full SHA
    5f16272 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#69386 - danielhenrymantilla:maybe_uninit_do…

    …cs_replace_chunk_with_windows, r=Dylan-DPC
    
    Fix minor error in `MaybeUninit::get_mut()` doc example
    
    In the `MaybeUninit::get_mut()` example I wanted to assert that the slice was sorted and mistakenly used `.chunks(2)` rather than `.windows(2)` to assert it, as @ametisf pointed out in rust-lang#65948 (comment) .
    
    This fixes it.
    Dylan-DPC authored Feb 24, 2020
    Configuration menu
    Copy the full SHA
    d3c175a View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#69391 - memoryruins:memalias, r=Mark-Simula…

    …crum
    
    Add rustdoc aliases to `ptr::copy` and `ptr::copy_nonoverlapping`
    
    This PR adds a [rustdoc alias](https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#add-aliases-for-an-item-in-documentation-search) to `ptr::copy` and `ptr::copy_nonoverlapping` using the commonly used terms `memcpy` and `memmove`. The motivation for this PR is to improve discoverability for these functions, since I've noticed users overlook these functions on multiple occasions (and they have thus reached for [libc](https://crates.io/crates/libc) without need). Currently std docs state:
    
    https://doc.rust-lang.org/nightly/std/ptr/fn.copy_nonoverlapping.html
    > `copy_nonoverlapping` is semantically equivalent to C's `memcpy`, but with the argument order swapped.
    
    https://doc.rust-lang.org/nightly/std/ptr/fn.copy.html
    > `copy` is semantically equivalent to C's `memmove`, but with the argument order swapped.
    
    #### search results before adding a rustdoc alias:
    ![screenshot 6517](https://user-images.githubusercontent.com/6868531/75102985-78fbb680-55c2-11ea-8e41-04979e6fa6f6.png)
    ![screenshot 6518](https://user-images.githubusercontent.com/6868531/75102984-78632000-55c2-11ea-9673-8822aae636d1.png)
    
    #### after adding `#[doc(alias = "memcpy")]` and `#[doc(alias = "memmove")]`:
    ![screenshot 6516](https://user-images.githubusercontent.com/6868531/75102986-78fbb680-55c2-11ea-93b9-1929be940043.png)
    ![screenshot 6515](https://user-images.githubusercontent.com/6868531/75102987-78fbb680-55c2-11ea-9861-ce8a77a0c3b9.png)
    Dylan-DPC authored Feb 24, 2020
    Configuration menu
    Copy the full SHA
    5dc8421 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#69394 - GuillaumeGomez:clean-up-0367, r=Dyl…

    …an-DPC
    
    Clean up E0367 explanation
    
    r? @Dylan-DPC
    Dylan-DPC authored Feb 24, 2020
    Configuration menu
    Copy the full SHA
    70ed909 View commit details
    Browse the repository at this point in the history