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 4 pull requests #66656

Merged
merged 8 commits into from
Nov 23, 2019
Merged

Rollup of 4 pull requests #66656

merged 8 commits into from
Nov 23, 2019

Commits on Nov 19, 2019

  1. add fn any::type_name_of_val

    lcnr committed Nov 19, 2019
    Configuration menu
    Copy the full SHA
    985e663 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2019

  1. made gdb pretty-printing script more robust when printing uninitializ…

    …ed vec.
    
    I based this solution on my reading of:
    
    https://rethinkdb.com/blog/make-debugging-easier-with-custom-pretty-printers#what-is-still-to-be-done
    
    That post claims that there is no clean way to check for garbage pointers, and
    so this PR adopts the same solution of tentatively attempting to convert a
    dererence to a string, which throws a clean exception on garbage that we can
    catch and recover from.
    
    I only made the change to vec and not the other pretty printers because I wanted
    to focus my effort on the simplest thing that would resolve issue rust-lang#64343. In
    particular, I *considered* generalizing this fix to work on the other datatypes
    in the pretty-printing support library, but I don't want to invest effort in
    that until after we resolve our overall debugging support strategy; see also
    issues rust-lang#60826 and rust-lang#65564.
    pnkfelix committed Nov 20, 2019
    Configuration menu
    Copy the full SHA
    9b40e0b View commit details
    Browse the repository at this point in the history
  2. Clarify Step Documentation

    While the redesign is in progress (rust-lang#62886), clarify the purpose of replace_zero and replace_one.
    Phlosioneer authored Nov 20, 2019
    Configuration menu
    Copy the full SHA
    983cae7 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2019

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

Commits on Nov 23, 2019

  1. Rollup merge of rust-lang#65961 - lcnr:typename_of, r=Dylan-DPC

    add fn type_name_of_val
    
    This function is often useful during testing and mirrors `align_of_val` and `size_of_val`.
    
    # Example
    
    Showing the default type of integers.
    
    ```rust
    let x = 7;
    println!("per default, integers have the type: {}", std::any::type_name_of_val(&x));
    ```
    
    To my knowledge this can currently not be done without defining a function similar to `type_name_of_val`.
    Centril authored Nov 23, 2019
    Configuration menu
    Copy the full SHA
    0ae4a19 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#66574 - GuillaumeGomez:update-tidy-err-code…

    …-check, r=Mark-Simulacrum
    
    Update tidy check for error codes testing
    
    Now that all the error codes have been grouped into one file, we moved the long error explanations into markdown files, which means that we need to read those markdown file to also count their code blocks as well.
    
    So 2 "big" things happened here:
    * No more need to keep the current error code when reading the `error_codes.rs` file since it's been put into the equivalent markdown file.
    * Need to instead read the markdown file (but it's simpler since I can just look for code blocks directly).
    Centril authored Nov 23, 2019
    Configuration menu
    Copy the full SHA
    8256e73 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#66576 - pnkfelix:more-robust-gdb-vec-printe…

    …r, r=alexcrichton
    
    made gdb pretty-printing more robust when printing uninitialized vec
    
    made gdb pretty-printing more robust when printing uninitialized vec
    
    I based this solution on my reading of:
    
    https://rethinkdb.com/blog/make-debugging-easier-with-custom-pretty-printers#what-is-still-to-be-done
    
    That post claims that there is no clean way to check for garbage pointers, and
    so this PR adopts the same solution of tentatively attempting to convert a
    dererence to a string, which throws a clean exception on garbage that we can
    catch and recover from.
    
    I only made the change to vec and not the other pretty printers because I wanted
    to focus my effort on the simplest thing that would resolve issue rust-lang#64343. In
    particular, I *considered* generalizing this fix to work on the other datatypes
    in the pretty-printing support library, but I don't want to invest effort in
    that until after we resolve our overall debugging support strategy; see also
    issues rust-lang#60826 and rust-lang#65564.
    
    Fix rust-lang#64343
    Centril authored Nov 23, 2019
    Configuration menu
    Copy the full SHA
    e94f066 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#66583 - Phlosioneer:patch-2, r=Dylan-DPC

    Clarify Step Documentation
    
    While the redesign is in progress (rust-lang#62886), clarify the purpose of replace_zero and replace_one.
    
    First, "returning itself" is technically impossible due to the function signature of &mut self -> Self. A clone or copy operation must be used. So this is now explicitly stated in the documentation.
    
    Second, the added docs give some guidance about the actual contract around implementation of replace_zero and replace one. Specifically, the only usage is to create a range with no more steps, by setting start to replace_one and end to replace_zero. So the only property that is actually used is `replace_one > replace_zero`. See rust-lang#42168 (comment)
    
    The new documentation does not say that is the *only* contract, and so it should not be considered an api change. It just highlights the most important detail for implementors.
    
    The redesign doesn't seem to be landing any time soon, so this is a stopgap measure to reduce confusion in the meantime.
    Centril authored Nov 23, 2019
    Configuration menu
    Copy the full SHA
    8024e0d View commit details
    Browse the repository at this point in the history