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 #72575

Merged
merged 12 commits into from
May 25, 2020
Merged

Rollup of 4 pull requests #72575

merged 12 commits into from
May 25, 2020

Commits on May 17, 2020

  1. Emit a better diagnostic when function actually has a 'self' parameter

    Fixes rust-lang#66898
    
    When we are unable to resolve a reference to `self`, we current assume
    that the containing function doesn't have a `self` parameter, and
    emit an error message accordingly.
    
    However, if the reference to `self` was created by a macro invocation,
    then resolution will correctly fail, due to hygiene. In this case, we
    don't want to tell the user that the containing fuction doesn't have a
    'self' paramter if it actually has one.
    
    This PR checks for the precense of a 'self' parameter, and adjusts the
    error message we emit accordingly.
    
    TODO: The exact error message we emit could probably be improved. Should
    we explicitly mention hygiene?
    Aaron1011 committed May 17, 2020
    Configuration menu
    Copy the full SHA
    b684448 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2020

  1. Configuration menu
    Copy the full SHA
    0385239 View commit details
    Browse the repository at this point in the history
  2. note for ty::Error.

    lcnr committed May 20, 2020
    Configuration menu
    Copy the full SHA
    ecab35b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5a5017e View commit details
    Browse the repository at this point in the history
  4. comment return sites

    lcnr committed May 20, 2020
    Configuration menu
    Copy the full SHA
    ea47fdf View commit details
    Browse the repository at this point in the history
  5. Add tests for opaque types

    lcnr committed May 20, 2020
    Configuration menu
    Copy the full SHA
    a5a4ec9 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2020

  1. Configuration menu
    Copy the full SHA
    3fcb0f4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    632f3de View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#72153 - lcnr:exhaustively-match, r=pnkfelix

    exhaustively check `ty::Kind` during structural match checking
    
    This was prone to errors as we may forget new kinds in the future.
    
    I am also not yet sure about some kinds.
    
    `ty::GeneratorWitness(..) | ty::Infer(_) | ty::Placeholder(_) | ty::UnnormalizedProjection(..)  | ty::Bound(..)` might be unreachable here.
    
    We may want to forbid `ty::Projection`, similar to `ty::Param`.
    
    `ty::Opaque` seems fine afaict, should not be possible in a match atm.
    
    I believe `ty::Foreign` should not be structurally match, as I don't even know what
    that would actually mean.
    
    r? @pnkfelix cc @eddyb
    Dylan-DPC authored May 25, 2020
    Configuration menu
    Copy the full SHA
    d5250c1 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#72308 - Aaron1011:fix/hygiene-error-message…

    …, r=matthewjasper
    
    Emit a better diagnostic when function actually has a 'self' parameter
    
    Fixes rust-lang#66898
    
    When we are unable to resolve a reference to `self`, we current assume
    that the containing function doesn't have a `self` parameter, and
    emit an error message accordingly.
    
    However, if the reference to `self` was created by a macro invocation,
    then resolution will correctly fail, due to hygiene. In this case, we
    don't want to tell the user that the containing fuction doesn't have a
    'self' paramter if it actually has one.
    
    This PR checks for the precense of a 'self' parameter, and adjusts the
    error message we emit accordingly.
    
    TODO: The exact error message we emit could probably be improved. Should
    we explicitly mention hygiene?
    Dylan-DPC authored May 25, 2020
    Configuration menu
    Copy the full SHA
    65607fb View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#72560 - JohnTitor:glacier, r=Mark-Simulacrum

    Enable `glacier` command via triagebot
    
    I noticed this was required by rust-lang#72554 (comment).
    Dylan-DPC authored May 25, 2020
    Configuration menu
    Copy the full SHA
    c579102 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#72567 - GuillaumeGomez:cleanup-e0608, r=Dyl…

    …an-DPC
    
    Clean up E0608 explanation
    
    r? @Dylan-DPC
    Dylan-DPC authored May 25, 2020
    Configuration menu
    Copy the full SHA
    aa8d64b View commit details
    Browse the repository at this point in the history