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 16 pull requests #64751

Merged
merged 74 commits into from
Sep 25, 2019
Merged

Rollup of 16 pull requests #64751

merged 74 commits into from
Sep 25, 2019

Commits on Aug 7, 2019

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

Commits on Aug 8, 2019

  1. Remove Iteration order heading

    Ali Raheem committed Aug 8, 2019
    Configuration menu
    Copy the full SHA
    8068812 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2019

  1. Fix gramitcal error in read_dir example

    Ali Raheem committed Aug 15, 2019
    Configuration menu
    Copy the full SHA
    53c5046 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2019

  1. Comment out println in read_dir sorting example

    Ali Raheem committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    3c820fe View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2019

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

Commits on Sep 1, 2019

  1. Configuration menu
    Copy the full SHA
    d61605c View commit details
    Browse the repository at this point in the history
  2. Remove lower_to_hir() call from prepare_output().

    It's a false dependency. The result isn't used and there are no
    relevant side-effects.
    nnethercote committed Sep 1, 2019
    Configuration menu
    Copy the full SHA
    cd0c21b View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2019

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

Commits on Sep 9, 2019

  1. Replace println statements with explanatory comments

    Ali Raheem committed Sep 9, 2019
    Configuration menu
    Copy the full SHA
    1161aeb View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2019

  1. Move call site of dep_graph_future().

    `Compiler::register_plugins()` calls `passes::register_plugins()`, which
    calls `Compiler::dep_graph_future()`. This is the only way in which a
    `passes` function calls a `Compiler` function.
    
    This commit moves the `dep_graph_future()` call out of
    `passes::register_plugins()` and into `Compiler::register_plugins()`,
    which is a more sensible spot for it. This will delay the loading of the
    dep graph slightly -- from the middle of plugin registration to the end
    of plugin registration -- but plugin registration is fast enough
    (especially compared to expansion) that the impact should be neglible.
    nnethercote committed Sep 11, 2019
    Configuration menu
    Copy the full SHA
    d264a56 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2019

  1. Move to print functions on types instead of impl fmt::Display

    This will eventually allow us to easily pass in more parameters to the
    functions without TLS or other such hacks
    Mark-Simulacrum committed Sep 13, 2019
    Configuration menu
    Copy the full SHA
    04b27ef View commit details
    Browse the repository at this point in the history
  2. Unwrap Visibility fields

    There's not really any reason to not have the visibility default to
    inherited, and this saves us the trouble of checking everywhere for
    whether we have a visibility or not.
    Mark-Simulacrum committed Sep 13, 2019
    Configuration menu
    Copy the full SHA
    ec349be View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8a9dab3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3f144e1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    aa4055c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e0e0c37 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    98c94f6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c265180 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f4bb5a7 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f5ed0fd View commit details
    Browse the repository at this point in the history
  11. Move cache into Context, avoid TLS

    This doesn't move everything over as cache() is pretty annoying to
    remove fully, but it gets the ball rolling.
    Mark-Simulacrum committed Sep 13, 2019
    Configuration menu
    Copy the full SHA
    6e0b0d4 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0ad789a View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2019

  1. Add a comment to Compiler::compile().

    `Compiler::compile()` is different to all the other `Compiler` methods
    because it lacks a `Queries` entry. It only has one call site, which is
    in a test that doesn't need its specific characteristics.
    
    This patch replaces that call with a call to `Compile::link()`, which is
    similar enough for the test's purposes. It also notes that the method is
    an illustrative example of how `Compiler` can be used.
    nnethercote committed Sep 18, 2019
    Configuration menu
    Copy the full SHA
    2521189 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2019

  1. Configuration menu
    Copy the full SHA
    645cdca View commit details
    Browse the repository at this point in the history
  2. rename libsyntax::ext::tt to mbe

    mbe stands for macro-by-example
    matklad committed Sep 22, 2019
    Configuration menu
    Copy the full SHA
    827a5b2 View commit details
    Browse the repository at this point in the history
  3. rename tt -> mbe, part 2

    matklad committed Sep 22, 2019
    Configuration menu
    Copy the full SHA
    49f849c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e30c516 View commit details
    Browse the repository at this point in the history
  5. docstring for mbe module

    matklad committed Sep 22, 2019
    Configuration menu
    Copy the full SHA
    636b354 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9fd75f5 View commit details
    Browse the repository at this point in the history
  7. push TokenTree::parse down

    matklad committed Sep 22, 2019
    Configuration menu
    Copy the full SHA
    9835697 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    81fe857 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2019

  1. Delete iter-order-by.md

    KodrAus authored Sep 23, 2019
    Configuration menu
    Copy the full SHA
    4ea371e View commit details
    Browse the repository at this point in the history
  2. Remove unused dependencies

    sinkuu committed Sep 23, 2019
    Configuration menu
    Copy the full SHA
    0423c2a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5f58834 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    61f1692 View commit details
    Browse the repository at this point in the history
  5. Remove pointless or

    Mark-Simulacrum committed Sep 23, 2019
    Configuration menu
    Copy the full SHA
    583a81d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    53acfc3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cac7e5f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    059163f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ae8b3e8 View commit details
    Browse the repository at this point in the history
  10. Add parser recovery for const $ident = $expr;.

    Then use the diagnostics-stealing API to stash parser
    errors and enrich them with type information in typeck.
    Centril committed Sep 23, 2019
    Configuration menu
    Copy the full SHA
    62d8584 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    62fc4d3 View commit details
    Browse the repository at this point in the history
  12. update test

    Use assert_eq and assert_ne over comparison operators.
    andrewbanchich authored Sep 23, 2019
    Configuration menu
    Copy the full SHA
    8acf958 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    f70665a View commit details
    Browse the repository at this point in the history
  14. Merge pull request rust-lang#28 from rust-lang/master

    Sync to rust-lang/rust master
    BaoshanPang authored Sep 23, 2019
    Configuration menu
    Copy the full SHA
    2753233 View commit details
    Browse the repository at this point in the history
  15. Merge pull request rust-lang#26 from rust-lang/master

    Sync to rust-lang/rust master
    n-salim authored Sep 23, 2019
    Configuration menu
    Copy the full SHA
    cd88dae View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    4fd9b99 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    c9e4816 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    b548814 View commit details
    Browse the repository at this point in the history
  19. Merge pull request rust-lang#29 from Wind-River/cleanup

    remove rtp.rs and move rtpSpawn, RTP_ID_ERROR to libc
    n-salim authored Sep 23, 2019
    Configuration menu
    Copy the full SHA
    75ecbe2 View commit details
    Browse the repository at this point in the history
  20. Fixed issue from rust-lang#64447

    hman523 committed Sep 23, 2019
    Configuration menu
    Copy the full SHA
    fa2cfaf View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2019

  1. Configuration menu
    Copy the full SHA
    a6da0e9 View commit details
    Browse the repository at this point in the history
  2. fix one typo

    Guanqun Lu committed Sep 24, 2019
    Configuration menu
    Copy the full SHA
    5aa5d57 View commit details
    Browse the repository at this point in the history
  3. fix several issues in String docs

    - In some places &str was shown instead of String.
    - into_bytes is the reverse of from_utf8
    
    Fixes rust-lang#63797
    jordins committed Sep 24, 2019
    Configuration menu
    Copy the full SHA
    62dc794 View commit details
    Browse the repository at this point in the history
  4. Fix coherence checking for impl trait in type aliases

    Fixes rust-lang#63677
    
    RFC rust-lang#2071 (impl-trait-existential-types) does not explicitly state how
    impl trait type alises should interact with coherence. However, there's
    only one choice which makes sense - coherence should look at the
    underlying type (i.e. the 'defining' type of the impl trait) of the type
    alias, just like we do for non-impl-trait type aliases.
    
    Specifically, impl trait type alises which resolve to a local type
    should be treated like a local type with respect to coherence (e.g.
    impl trait type aliases which resolve to a forieign type should be
    treated as a foreign type, and those that resolve to a local type should
    be treated as a local type).
    
    Since neither inherent impls nor direct trait impl (i.e. `impl MyType`
    or `impl MyTrait for MyType`) are allowd for type aliases, this
    usually does not come up. Before we ever attempt to do coherence
    checking, we will have errored out if an impl trait type alias was used
    directly in an 'impl' clause.
    
    However, during trait selection, we sometimes need to prove bounds like
    'T: Sized' for some type 'T'. If 'T' is an impl trait type alias, this
    requires to know the coherence behavior for impl trait type aliases when
    we perform coherence checking.
    
    Note: Since determining the underlying type of an impl trait type alias
    requires us to perform body type checking, this commit causes us to type
    check some bodies easlier than we otherwise would have. However, since
    this is done through a query, this shouldn't cause any problems
    
    For completeness, I've added an additional test of the coherence-related
    behavior of impl trait type aliases.
    Aaron1011 committed Sep 24, 2019
    Configuration menu
    Copy the full SHA
    33e1dd7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e8cf46e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    61cfe92 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7b71abd View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#63356 - ali-raheem:issue#63183, r=KodrAus

    Issue#63183: Add fs::read_dir() and ReadDir warning about iterator order + example
    
    As per rust-lang#63183
    
    Add warning about iterator order to read_dir and ReadDir, add example of explicitly ordering direntrys.
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    c623aa4 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#63934 - Aaron1011:fix/impl-trait-coherence,…

    … r=nikomatsakis
    
    Fix coherence checking for impl trait in type aliases
    
    **UPDATE**: This PR now treats all opaque types as remote. The original description appears below, but is no longer accurate.
    
    Fixes rust-lang#63677
    
    [RFC 2071](rust-lang/rfcs#2071) (impl-trait-existential-types) does not explicitly state how `type_alias_impl_trait` should interact with coherence. However, there's only one choice which makes sense - coherence should look at the underlying type (i.e. the *"defining"* type of the `impl Trait`) of the type alias, just like we do for non-`impl Trait` type aliases.
    
    Specifically, `impl Trait` type aliases that resolve to a local type should be treated like a local type with respect to coherence (e.g. `impl Trait` type aliases which resolve to a foreign type should be treated as a foreign type, and those that resolve to a local type should be treated as a local type).
    
    Since neither inherent impls nor direct trait impl (i.e. `impl MyType` or `impl MyTrait for MyType`) are allowed for type aliases, this usually does not come up. Before we ever attempt to do coherence checking, we will have errored out if an `impl Trait` type alias was used directly in an `impl` clause.
    
    However, during trait selection, we sometimes need to prove bounds like `T: Sized` for some type `T`. If `T` is an impl trait type alias, this requires to know the coherence behavior for `impl Trait` type aliases when we perform coherence checking.
    
    Note: Since determining the underlying type of an `impl Trait` type alias requires us to perform body type checking, this commit causes us to type check some bodies easier than we otherwise would have. However, since this is done through a query, this shouldn't cause any problems
    
    For completeness, I've added an additional test of the coherence-related behavior of `impl Trait` type aliases.
    
    cc rust-lang#63063
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    94628af View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#64016 - nnethercote:Compiler-fiddling, r=ol…

    …i-obk
    
    Streamline `Compiler`
    
    A few commits to clean up `Compiler`.
    
    r? @Zoxc
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    ad0b78d View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#64296 - KodrAus:chore/iter_order_by, r=Centril

    Document the unstable iter_order_by library feature
    
    Tracking issue: rust-lang#64295
    
    Follow-up for: rust-lang#62205
    
    References the tracking issue and adds a page to the unstable book for the new unstable `iter_order_by` feature.
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    e74d953 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#64443 - Mark-Simulacrum:rustdoc-clean-1, r=…

    …GuillaumeGomez
    
    rustdoc: general cleanup
    
    Review should be conducted commit-by-commit.
    
    There are some general cleanup commits in the end, which are somewhat related but can be easily split into another PR, so just let me know.
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    4a58b14 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#64622 - ecstatic-morse:cycle-detector, r=ol…

    …i-obk
    
    Add a cycle detector for generic `Graph`s and `mir::Body`s
    
    Cycle detection is one way to differentiate the upcoming `const_loop` feature flag (rust-lang#52000) from the `const_if_match` one (rust-lang#49146). It would be possible to use the existing implementation of strongly-connected components for this but less efficient.
    
    The ["tri-color" terminology](http://www.cs.cornell.edu/courses/cs2112/2012sp/lectures/lec24/lec24-12sp.html) is common in introductory data structures and algorithms courses: black nodes are settled, grey nodes are visited, and white nodes have no state. This particular implementation is iterative and uses a well-known technique where "node settled" events are kept on the stack alongside nodes to visit. When a settled event is popped, we know that all successors of that node have been visited and themselves settled. If we encounter a successor node that has been visited (is on the stack) but not yet settled, we have found a cycle.
    
    r? @eddyb
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    e00bd27 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#64689 - matklad:refactor-mbe, r=petrochenkov

    Refactor macro by example
    
    This doesn't do anything useful yet, and just moves code around and restricts visibility
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    6a4be43 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#64698 - Centril:infer-const-with-stash, r=e…

    …stebank
    
    Recover on `const X = 42;` and infer type + Error Stash API
    
    Here we:
    
    1. Introduce a notion of the "error stash".
    
       This is a map in the `Handler` to which you can `err.stash(...)` away your diagnostics and then steal them in a later "phase" of the compiler (e.g. stash in parser, steal in typeck) to enrich them with more information that isn't available in the previous "phase".
    
        I believe I've covered all the bases to make sure these diagnostics are actually emitted eventually even under `#[cfg(FALSE)]` but please check my logic.
    
    2. Recover when parsing `[const | static mut?] $ident = $expr;` which has a missing type.
    
        Use the "error stash" to stash away the error and later steal the error in typeck where we emit the error as `MachineApplicable` with the actual inferred type. This builds on rust-lang#62804.
    
    cc rust-lang/rfcs#2545
    
    r? @estebank
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    0d0f753 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#64702 - sinkuu:deps, r=jonas-schievink

    Remove unused dependencies
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    9e12827 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#64717 - andrewbanchich:master, r=joshtriplett

    update mem::discriminant test to use assert_eq and assert_ne over comparison operators
    
    Use assert_eq and assert_ne over comparison operators.
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    8db83a0 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#64720 - Wind-River:master, r=alexcrichton

     remove rtp.rs, and move rtpSpawn and RTP_ID_ERROR to libc
    
    r? @alexcrichton
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    e861424 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#64721 - hman523:issue64447, r=estebank

    Fixed issue from rust-lang#64447
    
    Did two tiny fixes. One is a micro optimization since we know that max is going to be assigned a `usize`, we do not have to worry about a possible negative number.
    The other issue that was fixed is that the max from the children isn't updated correctly. Now it will use `sub_result` instead of `primary` and will properly get the needed value.
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    bea1933 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    1252e70 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#64737 - jordins:master, r=steveklabnik

    fix several issues in String docs
    
    - In some places &str was shown instead of String.
    - into_bytes is the reverse of from_utf8
    
    Fixes rust-lang#63797
    
    I've retaken the work done in this PR: rust-lang#63865 which for some reason was closed.
    and just done a minor change (I hope you don't mind @sam09 ).
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    477bdcd View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#64742 - pietroalbini:relnotes-fixes, r=Mark…

    …-Simulacrum
    
    relnotes: make compatibility section more sterile and fix rustc version
    
    r? @Mark-Simulacrum
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    c9dbaec View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#64748 - Centril:fix-64744, r=estebank

    Fix rust-lang#64744. Account for the Zero sub-pattern case.
    
    Fixes rust-lang#64744.
    
    r? @estebank
    Centril authored Sep 24, 2019
    Configuration menu
    Copy the full SHA
    aeb2414 View commit details
    Browse the repository at this point in the history