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 10 pull requests #50847

Merged
merged 26 commits into from
May 18, 2018
Merged

Rollup of 10 pull requests #50847

merged 26 commits into from
May 18, 2018

Commits on May 2, 2018

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

Commits on May 10, 2018

  1. Improve format string errors

     - Point at format string position inside the formatting string
     - Explain that argument names can't start with an underscore
    estebank committed May 10, 2018
    Configuration menu
    Copy the full SHA
    3f6b3bb View commit details
    Browse the repository at this point in the history

Commits on May 11, 2018

  1. Tweak nearest_common_ancestor().

    - Remove the "no nearest common ancestor found" case, because it's never
      hit in practise. (This means `closure_is_enclosed_by` can also be
      removed.)
    
    - Add a comment about why `SmallVec` is used for the "seen" structures.
    
    - Use `&Scope` instead of `Scope` to avoid some `map()` calls.
    
    - Use `any(p)` instead of `position(p).is_some()`.
    nnethercote committed May 11, 2018
    Configuration menu
    Copy the full SHA
    a91f6f7 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2018

  1. Add Option::xor method

    clarfonthey committed May 15, 2018
    Configuration menu
    Copy the full SHA
    8ab2d15 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2018

  1. Fix grammar documentation wrt Unicode identifiers

    The grammar defines identifiers in terms of XID_start and XID_continue,
    but this is referring to the unstable non_ascii_idents feature.
    The documentation implies that non_ascii_idents is forthcoming, but this
    is left over from pre-1.0 documentation; in reality, non_ascii_idents
    has been without even an RFC for several years now, and will not be
    stabilized anytime soon. Furthermore, according to the tracking issue at
    rust-lang#28979 , it's highly
    questionable whether or not this feature will use XID_start or
    XID_continue even when or if non_ascii_idents is stabilized.
    This commit fixes this by respecifying identifiers as the usual
    [a-zA-Z_][a-zA-Z0-9_]*
    bstrie committed May 16, 2018
    Configuration menu
    Copy the full SHA
    ce0b7cc View commit details
    Browse the repository at this point in the history
  2. Null exclusions in grammar docs

    The grammar documentation incorrectly says that comments, character literals,
    and string literals may not include null.
    bstrie committed May 16, 2018
    Configuration menu
    Copy the full SHA
    ab4735e View commit details
    Browse the repository at this point in the history
  3. Avoid repeated HashMap lookups in opt_normalize_projection_type.

    There is a hot path through `opt_normalize_projection_type`:
    - `try_start` does a cache lookup (#1).
    - The result is a `NormalizedTy`.
    - There are no unresolved type vars, so we call `complete`.
    - `complete` does *another* cache lookup (#2), then calls
      `SnapshotMap::insert`.
    - `insert` does *another* cache lookup (rust-lang#3), inserting the same value
      that's already in the cache.
    
    This patch optimizes this hot path by introducing `complete_normalized`,
    for use when the value is known in advance to be a `NormalizedTy`. It
    always avoids lookup #2. Furthermore, if the `NormalizedTy`'s
    obligations are empty (the common case), we know that lookup rust-lang#3 would be
    a no-op, so we avoid it, while inserting a Noop into the `SnapshotMap`'s
    undo log.
    nnethercote committed May 16, 2018
    Configuration menu
    Copy the full SHA
    f778bde View commit details
    Browse the repository at this point in the history

Commits on May 17, 2018

  1. Avoid allocations in opt_normalize_projection_type.

    This patch changes `opt_normalize_project_type` so it appends
    obligations to a given obligations vector, instead of returning a new
    obligations vector.
    
    This change avoids lots of allocations. In the most extreme case, for a
    clean "Check" build of serde it reduces the total number of allocations
    by 20%.
    nnethercote committed May 17, 2018
    Configuration menu
    Copy the full SHA
    47bc774 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    37dee69 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ceed8eb View commit details
    Browse the repository at this point in the history
  4. Fix selftests

    oli-obk committed May 17, 2018
    Configuration menu
    Copy the full SHA
    0356a61 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    74bfd94 View commit details
    Browse the repository at this point in the history
  6. Update docs and diagnostics

    oli-obk committed May 17, 2018
    Configuration menu
    Copy the full SHA
    0ac2fd1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ec0d946 View commit details
    Browse the repository at this point in the history
  8. Revert rust-lang#49767

    There was [some confusion](rust-lang#49767 (comment)) and I accidentally merged a PR that wasn't ready.
    steveklabnik committed May 17, 2018
    Configuration menu
    Copy the full SHA
    eac94d1 View commit details
    Browse the repository at this point in the history
  9. Update tutorial.md

    glassresistor authored May 17, 2018
    Configuration menu
    Copy the full SHA
    cfa26da View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#50387 - phansch:remove_leftover_tab, r=alex…

    …crichton
    
    Remove leftover tab in libtest outputs
    
    This removes some tabs that were present in the output of libtest.
    
    Related rust-lang#19299
    Closes rust-lang#50362
    Mark-Simulacrum authored May 17, 2018
    Configuration menu
    Copy the full SHA
    6e95b87 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#50553 - clarcharr:option_xor, r=sfackler

    Add Option::xor method
    
    Implements the method requested in rust-lang#50512.
    Mark-Simulacrum authored May 17, 2018
    Configuration menu
    Copy the full SHA
    0c0bb18 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#50610 - estebank:fmt-str, r=Kimundi

    Improve format string errors
    
    Point at format string position inside the formatting string:
    ```
    error: invalid format string: unmatched `}` found
      --> $DIR/format-string-error.rs:21:22
       |
    LL |     let _ = format!("}");
       |                      ^ unmatched `}` in format string
    ```
    
    Explain that argument names can't start with an underscore:
    ```
    error: invalid format string: invalid argument name `_foo`
      --> $DIR/format-string-error.rs:15:23
       |
    LL |     let _ = format!("{_foo}", _foo = 6usize);
       |                       ^^^^ invalid argument name in format string
       |
       = note: argument names cannot start with an underscore
    ```
    
    Fix rust-lang#23476.
    
    The more accurate spans will only be seen when using `format!` directly, when using `println!` the diagnostics machinery makes the span be the entire statement.
    Mark-Simulacrum authored May 17, 2018
    Configuration menu
    Copy the full SHA
    b3734bd View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#50649 - nnethercote:tweak-nearest_common_an…

    …cestor, r=nikomatsakis
    
    Tweak `nearest_common_ancestor()`.
    
    - Remove the "no nearest common ancestor found" case, because it's never
      hit in practise. (This means `closure_is_enclosed_by` can also be
      removed.)
    
    - Add a comment about why `SmallVec` is used for the "seen" structures.
    
    - Use `&Scope` instead of `Scope` to avoid some `map()` calls.
    
    - Use `any(p)` instead of `position(p).is_some()`.
    
    r? @nikomatsakis
    Mark-Simulacrum authored May 17, 2018
    Configuration menu
    Copy the full SHA
    e1848df View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#50790 - bstrie:grammar, r=steveklabnik

    Fix grammar documentation wrt Unicode identifiers
    
    The grammar defines identifiers in terms of XID_start and XID_continue,
    but this is referring to the unstable non_ascii_idents feature.
    The documentation implies that non_ascii_idents is forthcoming, but this
    is left over from pre-1.0 documentation; in reality, non_ascii_idents
    has been without even an RFC for several years now, and will not be
    stabilized anytime soon. Furthermore, according to the tracking issue at
    rust-lang#28979 , it's highly
    questionable whether or not this feature will use XID_start or
    XID_continue even when or if non_ascii_idents is stabilized.
    This commit fixes this by respecifying identifiers as the usual
    [a-zA-Z_][a-zA-Z0-9_]*
    Mark-Simulacrum authored May 17, 2018
    Configuration menu
    Copy the full SHA
    77a4296 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#50791 - bstrie:null, r=QuietMisdreavus

    Fix null exclusions in grammar docs
    
    The grammar documentation incorrectly says that comments, character literals,
    and string literals may not include null.
    Mark-Simulacrum authored May 17, 2018
    Configuration menu
    Copy the full SHA
    c95267e View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#50806 - oli-obk:gesundheit, r=ehuss

    Add `bless` x.py subcommand for easy ui test replacement
    
    fixes rust-lang#49815
    
    r? @nikomatsakis
    Mark-Simulacrum authored May 17, 2018
    Configuration menu
    Copy the full SHA
    f83e4d7 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#50818 - nnethercote:faster-normalize, r=nik…

    …omatsakis
    
    Speed up `opt_normalize_projection_type`
    
    `opt_normalize_projection_type` is hot in the serde and futures benchmarks in rustc-perf. These two patches speed up the execution of most runs for them by 2--4%.
    Mark-Simulacrum authored May 17, 2018
    Configuration menu
    Copy the full SHA
    54df1bf View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#50837 - steveklabnik:revert-49767, r=QuietM…

    …isdreavus
    
    Revert rust-lang#49767
    
    There was [some confusion](rust-lang#49767 (comment)) and I accidentally merged a PR that wasn't ready.
    Mark-Simulacrum authored May 17, 2018
    Configuration menu
    Copy the full SHA
    53ea73a View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#50839 - glassresistor:master, r=steveklabnik

    Make sure people know the book is free oline
    
    I've used the tutorial a number of times to relearn rust basics.  When i saw this for a moment I was sad thinking it had been taken offline.
    Mark-Simulacrum authored May 17, 2018
    Configuration menu
    Copy the full SHA
    faa1f21 View commit details
    Browse the repository at this point in the history