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 14 pull requests #81102

Closed
wants to merge 108 commits into from
Closed

Commits on Dec 17, 2020

  1. Add Roadmap for 2021

    flip1995 committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    c06793b View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2020

  1. Configuration menu
    Copy the full SHA
    469281c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    83a458a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    275988c View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2020

  1. Configuration menu
    Copy the full SHA
    af480a6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0afe2db View commit details
    Browse the repository at this point in the history
  3. Address review comments

    phansch committed Dec 30, 2020
    Configuration menu
    Copy the full SHA
    b81111b View commit details
    Browse the repository at this point in the history

Commits on Dec 31, 2020

  1. Fix blessing of test output in subdirectories

    The core issue was the usage of `reference_file_path.file_name()`, which
    provided a non-existent path if the file to be updated was in a
    subdirectory.
    
    Instead we have to provide the whole path after 'tests/ui/' as the
    'filename'. This part of the path is called `test_name` in the code now.
    phansch committed Dec 31, 2020
    Configuration menu
    Copy the full SHA
    6b37932 View commit details
    Browse the repository at this point in the history
  2. s/test_dir/test_suite_dir

    This should make the code slightly more understandable
    phansch committed Dec 31, 2020
    Configuration menu
    Copy the full SHA
    6909055 View commit details
    Browse the repository at this point in the history

Commits on Jan 1, 2021

  1. field_reassign_with_default: don't expand macros in suggestion

    fixes rust-lang#6522
    
    changelog: field_reassign_with_default: don't expand macros in lint suggestion (rust-lang#6522)
    matthiaskrgr committed Jan 1, 2021
    Configuration menu
    Copy the full SHA
    5d48b91 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2021

  1. Configuration menu
    Copy the full SHA
    ba4bf4f View commit details
    Browse the repository at this point in the history
  2. Add lint

    Jarcho committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    1853f8b View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6520 - phansch:update-changelog, r=flip1995

    Update CHANGELOG for Rust 1.50
    
    changelog: none
    
    r? `@flip1995`
    bors committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    78f6009 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    053afe4 View commit details
    Browse the repository at this point in the history
  5. Fix clone_on_copy test

    Jarcho committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    9427e03 View commit details
    Browse the repository at this point in the history
  6. Fix lint errors

    Jarcho committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    d37ee6f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b498870 View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#6531 - matthiaskrgr:6522, r=ebroto

    field_reassign_with_default: don't expand macros in suggestion
    
    fixes rust-lang#6522
    
    changelog: field_reassign_with_default: don't expand macros in lint suggestion (rust-lang#6522)
    bors committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    592f7eb View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#6518 - ThibsG:CopyException, r=ebroto

    Ensure `Copy` exception in trait definition for `wrong_self_conventio…
    
    Add a test case to ensure `Copy` exception is preserved also in trait definition, when passing `self` by value.
    
    Follow up of rust-lang#6316
    
    changelog: none
    bors committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    a02806e View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2021

  1. Fix docs: use type inference

    Jarcho committed Jan 3, 2021
    Configuration menu
    Copy the full SHA
    7b5f549 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2021

  1. Auto merge of rust-lang#6525 - phansch:fix-bless-in-subdirs, r=flip1995

    Fix blessing of test output in subdirectories
    
    The core issue was the usage of `reference_file_path.file_name()`, which
    provided a non-existent path if the file to be updated was in a
    subdirectory.
    
    Instead we have to provide the whole path after 'tests/ui/' as the
    'filename'. This part of the path is called `test_name` in the code now.
    
    changelog: none
    bors committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    8951916 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d141cdc View commit details
    Browse the repository at this point in the history
  3. collapsible_if: split collapsible_else_if into its own lint so we can…

    … enable/disable it particularly
    
    This splits up clippy::collapsible_if into collapsible_if for
    if x {
      if y { }
    }
    =>
    if x && y { }
    
    and collapsible_else_if for
    
    if x {
    } else {
     if y { }
    }
    
    =>
    if x {
    
    } else if y {
    
    }
    
    so that we can lint for only the latter but not the first if we desire.
    
    changelog: collapsible_if: split up linting for if x {} else { if y {} } into collapsible_else_if lint
    matthiaskrgr committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    6dcec6a View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6544 - matthiaskrgr:else_if, r=flip1995

    collapsible_if: split collapsible_else_if into its own lint so we can enable/disable it particularly
    
    This splits up clippy::collapsible_if into collapsible_if for
    if x {
      if y { }
    }
    =>
    if x && y { }
    
    and collapsible_else_if for
    
    if x {
    } else {
     if y { }
    }
    
    =>
    if x {
    
    } else if y {
    
    }
    
    so that we can lint for only the latter but not the first if we desire.
    
    changelog: collapsible_if: split up linting for if x {} else { if y {} } into collapsible_else_if lint
    bors committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    dd1929e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ba87acb View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#6507 - bengsparks:lint/issue6410, r=flip1995

    Needless Question Mark Lint
    
    Fixes rust-lang#6410, i.e the needless question mark lint
    
    changelog: [`needless_question_mark`] New lint
    bors committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    ae9ae97 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7acfa44 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cbbb188 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#6548 - camsteffen:bless-internal, r=flip1995

    Add ui-internal to cargo dev bless
    
    changelog: internal
    bors committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    445eb99 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    bc97f5d View commit details
    Browse the repository at this point in the history
  11. Run cargo dev fmt

    nahuakang committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    a8d47b4 View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#6538 - Jarcho:vec_init_then_push, r=llogiq

    New lint: vec_init_then_push
    
    fixes: rust-lang#1483
    
    This will trigger on `new`, `default`, and `with_capacity` when the given capacity is less than or equal to the number of push calls. Is there anything else this should trigger on?
    
    changelog: Added lint: `vec_init_then_push`
    bors committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    976850b View commit details
    Browse the repository at this point in the history
  13. Add a new lint ptr_as_ptr,

    which checks for `as` casts between raw pointers
    without changing its mutability
    and suggest replacing it with `pointer::cast`.
    rail-rain committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    4b478a5 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    dfa5d7e View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2021

  1. Auto merge of rust-lang#6547 - camsteffen:curse-outdated, r=phansch

    Curse outdated test output
    
    changelog: internal
    
    Change `cargo dev bless` to only include test output that was generated since the last build of clippy. This is especially useful when running tests with `TESTNAME=...`. The feature may be disabled by `cargo dev bless --ignore-timestamp`.
    bors committed Jan 5, 2021
    Configuration menu
    Copy the full SHA
    dd52066 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6513 - nahuakang:fix/empty_enum_lint_never_ty…

    …pe, r=flip1995
    
    Fix: Empty enum never type suggested only if the feature is enabled
    
    This PR addresses [Issue 6422](rust-lang/rust-clippy#6422). Instead of always recommending `never type` for empty enums, Clippy would only recommend [the lint](https://rust-lang.github.io/rust-clippy/master/index.html#empty_enum) if [LatePass.TyCtxt](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html) has `features().never_type` enabled.
    
    - \[ ] Followed [lint naming conventions][lint_naming]
    - \[x] Added passing UI tests (including committed `.stderr` file)
    - \[x] `cargo test` passes locally
    - \[x] Executed `cargo dev update_lints`
    - \[x] Added lint documentation
    - \[x] Run `cargo dev fmt`
    ---
    
    *Please write a short comment explaining your change (or "none" for internal only changes)*
    changelog: Only trigger [`empty_enum`] lint if `never_type` feature is enabled.
    bors committed Jan 5, 2021
    Configuration menu
    Copy the full SHA
    311186b View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6542 - rail-rain:ptr_as_ptr, r=flip1995

    Add a new lint `ptr_as_ptr`
    
    This PR adds a new lint `ptr_as_ptr` which checks for `as` casts between raw pointers without changing its mutability and suggest replacing it with `pointer::cast`. Closes rust-lang#5890.
    
    Open question: should this lint be `pedantic` or `style`? I set it `pedantic` for now because the original post suggests using it, but I think the lint also fits well to `style`.
    
    ---
    
    changelog: New lint `ptr_as_ptr`
    bors committed Jan 5, 2021
    Configuration menu
    Copy the full SHA
    a6b72d3 View commit details
    Browse the repository at this point in the history
  4. Tiny Symbol cleanup

    * Renames `sym.rs` to `sym_helper.rs` so that the `sym as rustc_sym` is no longer needed.
    * Removes one needless `symbol` from a path
    phansch committed Jan 5, 2021
    Configuration menu
    Copy the full SHA
    ea885d9 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#6551 - phansch:tiny-symbol-cleanup, r=flip1995

    Tiny Symbol cleanup
    
    * Renames `sym.rs` to `sym_helper.rs` so that the `sym as rustc_sym` is no longer needed.
    * Removes one needless `symbol` from a path
    
    changelog: none
    bors committed Jan 5, 2021
    Configuration menu
    Copy the full SHA
    42b9e92 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a8825e9 View commit details
    Browse the repository at this point in the history
  7. Revert "Auto merge of rust-lang#79637 - spastorino:revert-trait-inher…

    …itance-self, r=Mark-Simulacrum"
    
    This reverts commit b4def89, reversing
    changes made to 7dc1e85.
    spastorino committed Jan 5, 2021
    Configuration menu
    Copy the full SHA
    03c0e58 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    92f2bbb View commit details
    Browse the repository at this point in the history
  9. Use Symbol instead of Ident as an assoc_name to prevent ICEs

    An ICE happens when certain code is compiled in incremental compilation
    mode and there are two `Ident`s that have the same `StableHash` value
    but are considered different by `Eq` and `Hash`.
    spastorino committed Jan 5, 2021
    Configuration menu
    Copy the full SHA
    455a0e1 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2021

  1. Auto merge of rust-lang#6553 - phansch:field-reassign-with-default-ma…

    …cros, r=flip1995
    
    Fix derive and macro related false positives in `field_reassign_with_default`
    
    Closes rust-lang#6545
    
    changelog: Fix derive and macro related false positives in [`field_reassign_with_default`]
    bors committed Jan 6, 2021
    Configuration menu
    Copy the full SHA
    efccfe8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8a45ffa View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6554 - sozysozbot:master, r=flip1995

    Fix typo: `which which can be` -> `which can be`
    
    Fixed a typo in the explanation of https://rust-lang.github.io/rust-clippy/master/index.html#large_types_passed_by_value : `which which can be` -> `which can be`
    
    changelog: none
    bors committed Jan 6, 2021
    Configuration menu
    Copy the full SHA
    8e5c5a6 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2021

  1. Configuration menu
    Copy the full SHA
    f50ded0 View commit details
    Browse the repository at this point in the history
  2. Change env var used for testing Clippy

    This changes the variable used for testing Clippy in the internal test
    suite:
    
    ```
    CLIPPY_TESTS -> __CLIPPY_INTERNAL_TESTS
    ```
    
    `CLIPPY_TESTS` is understandably used in environments of Clippy users,
    so we shouldn't use it in our test suite.
    flip1995 committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    547ce0d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2b3c0ad View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6558 - stanislav-tkach:patch-2, r=flip1995

    Fix typo: `irrevelent` -> `irrelevant`
    
    changelog: none
    bors committed Jan 7, 2021
    Configuration menu
    Copy the full SHA
    e15bef9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7d42172 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    aa9adbf View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2021

  1. Configuration menu
    Copy the full SHA
    0e14a75 View commit details
    Browse the repository at this point in the history
  2. Move is_hir_ty_cfg_dependant to util,

    add stuff on pointer::cast` to the document for `cast_ptr_alignment`
    and fix line numbers in the test.
    rail-rain committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    ee9b47d View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6566 - giraffate:reduce_the_span_in_from_over…

    …_into, r=Manishearth
    
    Reduce the span in `from_over_into` to impl header
    
    A follow up of rust-lang/rust-clippy#6476 (comment)
    > That item might be quite large. We may want to reduce the span to the `impl` header.
    
    changelog: none
    bors committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    2950c8e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    24c700b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    121c65f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    76ccfb4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cc26919 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7871eba View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#6569 - camsteffen:symbol-comparison, r=Manish…

    …earth
    
    Internal lint symbol comparisons
    
    changelog: none
    
    * Added awareness of `rustc_span::symbol::kw::*` symbols.
    * Compare with const symbols: `symbol.as_str() == "self"` => `symbol == kw::SelfLower`
    * Don't compare symbols by string: `a.as_str() == b.as_str()` => `a == b`
    * Lint comparing with `to_ident_string` or `to_string` instead of `Symbol::as_str`.
    bors committed Jan 8, 2021
    Configuration menu
    Copy the full SHA
    68bcd20 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2021

  1. Configuration menu
    Copy the full SHA
    8a6fea4 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#6571 - ThibsG:BoxedLocalTrait, r=phansch

    Fix FP for `boxed_local` lint in default trait fn impl
    
    Fix FP on default trait function implementation on `boxed_local` lint.
    
    Maybe I checked too much when looking if `self` is carrying `Self` in its bound type.
    I can't find a good test case for this, so it could be too much conservative.
    Let me know if you think only detecting `self` parameter is enough.
    
    Fixes: rust-lang#4804
    
    changelog: none
    bors committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    ee0598e View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6565 - giraffate:small_fixes_of_doc_in_needle…

    …ss_question_mark, r=phansch
    
    Small fixes of doc in `needless_question_mark`
    
    changelog: none
    bors committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    583715f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9e45a23 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2021

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

Commits on Jan 11, 2021

  1. Auto merge of rust-lang#6575 - flip1995:stop_linting_deps, r=Manishearth

    Change env var used for testing Clippy
    
    This changes the variable used for testing Clippy in the internal test
    suite:
    
    ```
    CLIPPY_TESTS -> __CLIPPY_INTERNAL_TESTS
    ```
    
    `CLIPPY_TESTS` is understandably used in environments of Clippy users,
    so we shouldn't use it in our test suite.
    
    changelog: Fix oversight which caused Clippy to lint deps in some environments.
    
    Once again fixes rust-lang/rust-clippy#3874
    bors committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    1eed27f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b7071b2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    53f8731 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6557 - rail-rain:extending_cast_ptr_alignment…

    …, r=phansch
    
    Catch `pointer::cast` too in `cast_ptr_alignment`
    
    Fixes rust-lang#4708
    
    Although there were some discussion in the issue, this PR implements the original feature. I think `cast_ptr_alignment` should exist as it is, separated from `ptr_as_ptr`.
    
    ---
    
    changelog: Extend `cast_ptr_alignment` lint for the `pointer::cast` method
    bors committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    7f4599a View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2021

  1. Auto merge of rust-lang#6462 - flip1995:roadmap, r=flip1995,llogiq,ki…

    …llercup,Manishearth,oli-obk,matthiaskrgr,phansch,mikerite,mcarton,yaahc,ebroto
    
    Roadmap for 2021
    
    [Rendered](https://github.com/flip1995/rust-clippy/blob/roadmap/doc/roadmap-2021.md)
    
    This is the first time Clippy gets its own roadmap. The reason for this roadmap is, that with the Rust language growing, also Clippy is growing. With this keeping track of and implementing bigger projects gets quite hard. This roadmap should help in exactly this regard.
    
    After having the approval of this roadmap by the Clippy team, we want to know from the community:
    
    - What do you think in general about this roadmap?
    - Are there any pain points in Clippy, that should be included here?
    - What of the points listed here has the highest priority for you?
    
    We're looking forward to getting your feedback!
    
    changelog: Add roadmap for Clippy 2021
    
    r? `@rust-lang/clippy`
    bors committed Jan 12, 2021
    Configuration menu
    Copy the full SHA
    13ca5c8 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2021

  1. Configuration menu
    Copy the full SHA
    ea02849 View commit details
    Browse the repository at this point in the history
  2. Separate out a hir::Impl struct

    This makes it possible to pass the `Impl` directly to functions, instead
    of having to pass each of the many fields one at a time. It also
    simplifies matches in many cases.
    jyn514 committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    dfb41f4 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#6584 - giraffate:make_references_to_issues_li…

    …nks, r=llogiq
    
    Make a reference a link in doc
    
    I think it's incovenient that references in doc are just a text.
    
    changelog: none
    bors committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    00586df View commit details
    Browse the repository at this point in the history
  4. Update rust-analyzer

    lnicola committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    61a6468 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#77524 - Patryk27:fixes/66228, r=estebank

    Rework diagnostics for wrong number of generic args (fixes rust-lang#66228 and rust-lang#71924)
    
    This PR reworks the `wrong number of {} arguments` message, so that it provides more details and contextual hints.
    bors committed Jan 13, 2021
    Configuration menu
    Copy the full SHA
    dcd8c8e View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2021

  1. Auto merge of rust-lang#79328 - c410-f3r:hir-if, r=matthewjasper

    Reintroduce hir::ExprKind::If
    
    Basically copied and paste rust-lang#59288/rust-lang/rust-clippy#4080 with some modifications.
    
    The vast majority of tests were fixed and now there are only a few remaining. Since I am still unable to figure out the missing pieces, any help with the following list is welcome.
    
    - [ ] **Unnecessary `typeck` exception**: [Cheated on this one to make CI green.](https://github.com/rust-lang/rust/pull/79328/files#diff-3faee9ba23fc54a12b7c43364ba81f8c5660045c7e1d7989a02a0cee1c5b2051)
    - [x] **Incorrect span**: [Span should reference `then` and `else` separately.](https://github.com/rust-lang/rust/pull/79328/files#diff-cf2c46e82222ee4b1037a68fff8a1af3c4f1de7a6b3fd798aacbf3c0475abe3d)
    - [x] **New note regarding `assert!`**: [Modified but not "wrong". Maybe can be a good thing?](https://github.com/rust-lang/rust/pull/79328/files#diff-9e0d7c89ed0224e2b62060c957177c27db43c30dfe3c2974cb6b5091cda9cfb5)
    - [x] **Inverted report location**: [Modified but not "wrong". Locations were inverted.](https://github.com/rust-lang/rust/pull/79328/files#diff-f637ce7c1f68d523a165aa9651765df05e36c4d7d279194b1a6b28b48a323691)
    - [x] **`src/test/ui/point-to-type-err-cause-on-impl-trait-return.rs` has weird errors**: [Not sure why this is happening.](https://github.com/rust-lang/rust/pull/79328/files#diff-c823c09660f5b112f95e97e8ff71f1797b6c7f37dbb3d16f8e98bbaea8072e95)
    - [x] **Missing diagnostic**: [???](https://github.com/rust-lang/rust/pull/79328/files#diff-6b8ab09360d725ba4513933827f9796b42ff9522b0690f80b76de067143af2fc)
    bors committed Jan 14, 2021
    Configuration menu
    Copy the full SHA
    7b3af41 View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2021

  1. Configuration menu
    Copy the full SHA
    9bd037d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c5ba9a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f18cf82 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#6586 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: FP fix: [`needless_return`] no longer triggers inside macros.
    bors committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    953f024 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3e236b3 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2021

  1. Allow downloading LLVM on Windows

    - Don't ignore packaging `llvm/lib/` for `rust-dev` when LLVM is linked
    statically
    - Add `link-type.txt` so bootstrap knows whether llvm was linked
      statically or dynamically
    - Don't assume CI LLVM is linked dynamically in `bootstrap::config`
    - Fall back to dynamic linking if `link-type.txt` doesn't exist
    - Fix existing bug that split the output of `llvm-config` on lines, not spaces
    - Enable building LLVM tests
    
      This works around the following llvm bug:
    
      ```
      llvm-config: error: component libraries and shared library
    
      llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest.a
      llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest_main.a
      llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVMTestingSupport.a
      thread 'main' panicked at 'command did not execute successfully: "/home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--libfiles"
      ```
    
      I'm not sure why llvm-config thinks these are required, but to avoid
      the error, this builds them anyway.
    
    - Temporarily set windows as the try builder. This should be reverted
      before merging.
    
    - Bump version of `download-ci-llvm-stamp`
    
      `src/llvm-project` hasn't changed, but the generated tarball has.
    
    - Only special case MacOS when dynamic linking. Static linking works fine.
    - Store `link-type.txt` to the top-level of the tarball
    
      This allows writing the link type unconditionally. Previously, bootstrap
      had to keep track of whether the file IO *would* succeed (it would fail
      if `lib/` didn't exist), which was prone to bugs.
    
    - Make `link-type.txt` required
    
      Anyone downloading this from CI should be using a version of bootstrap
      that matches the version of the uploaded artifacts. So a missing
      link-type indicates a bug in x.py.
    jyn514 committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    6766070 View commit details
    Browse the repository at this point in the history
  2. Add all tier 1 platforms to supported platforms for "if-available"

    ... and update the comment in `config.toml.example`
    jyn514 committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    5c4adbe View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8b702e0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c17ed34 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    53989e4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    50ee0b2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    65b5e43 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    28501c0 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    15f0921 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    76003f3 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5a706cf View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7f9a2cf View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#79298 - lcnr:new-elysium, r=matthewjasper

    correctly deal with late-bound lifetimes in anon consts
    
    adds support for using late bound lifetimes of the parent context in anon consts.
    ```rust
    #![feature(const_generics)]
    const fn inner<'a>() -> usize where &'a (): Sized { 3 }
    
    fn test<'a>() {
        let _: [u8; inner::<'a>()];
    }
    ```
    The lifetime `'a` is late bound in `test` so it's not included in its generics but is instead dealt with separately in borrowck.
    This didn't previously work for anon consts as they have to use the late bound lifetimes of their parent which has
    to be explicitly handled.
    
    r? `@matthewjasper` cc `@varkor` `@eddyb`
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    f6f754a View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#80031 - petrochenkov:builtina, r=estebank

    resolve: Reject ambiguity built-in attr vs different built-in attr
    
    Fixes rust-lang#79798.
    
    Resolution ensures that inert attributes cannot be used through imports like this, but built-in attributes don't go through initial resolution (only through resolution validation), so we have to keep some extra data (the built-in attribute name) to prevent it from happening.
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    c06ff92 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#80635 - sexxi-goose:use-place-instead-of-sy…

    …mbol, r=nikomatsakis`
    
    Improve diagnostics when closure doesn't meet trait bound
    
    Improves the diagnostics when closure doesn't meet trait bound by modifying `TypeckResuts::closure_kind_origins` such that `hir::Place` is used instead of `Symbol`. Using `hir::Place` to describe which capture influenced the decision of selecting a trait a closure satisfies to (Fn/FnMut/FnOnce, Copy) allows us to show precise path in the diagnostics when `capture_disjoint_field` feature is enabled.
    
    Closes rust-lang/project-rfc-2229/issues/21
    
    r? `@nikomatsakis`
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    803d616 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#80732 - spastorino:trait-inheritance-self2,…

    … r=nikomatsakis
    
    Allow Trait inheritance with cycles on associated types take 2
    
    This reverts the revert of rust-lang#79209 and fixes the ICEs that's occasioned by that PR exposing some problems that are addressed in rust-lang#80648 and rust-lang#79811.
    For easier review I'd say, check only the last commit, the first one is just a revert of the revert of rust-lang#79209 which was already approved.
    
    This also could be considered part or the actual fix of rust-lang#79560 but I guess for that to be closed and fixed completely we would need to land rust-lang#80648 and rust-lang#79811 too.
    
    r? `@nikomatsakis`
    cc `@Aaron1011`
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    d2009f0 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#80765 - petrochenkov:traitsinscope, r=matth…

    …ewjasper
    
    resolve: Simplify collection of traits in scope
    
    "Traits in scope" for a given location are collected by walking all scopes in type namespace, collecting traits in them and pruning traits that don't have an associated item with the given name and namespace.
    
    Previously we tried to prune traits using some kind of hygienic resolution for associated items, but that was complex and likely incorrect, e.g. in rust-lang#80762 correction to visibilites of trait items caused some traits to not be in scope anymore.
    I previously had some comments and concerns about this in rust-lang#65351.
    
    In this PR we are doing some much simpler pruning based on `Symbol` and `Namespace` comparisons, it should be enough to throw away 99.9% of unnecessary traits.
    It is not necessary for pruning to be precise because for trait aliases, for example, we don't do any pruning at all, and precise hygienic resolution for associated items needs to be done in typeck anyway.
    
    The somewhat unexpected effect is that trait imports introduced by macros 2.0 now bring traits into scope due to the removed hygienic check on associated item names.
    I'm not sure whether it is desirable or not, but I think it's acceptable for now.
    The old check was certainly incorrect because macros 2.0 did bring trait aliases into scope.
    If doing this is not desirable, then we should come up with some other way to avoid bringing traits from macros 2.0 into scope, that would accommodate for trait aliases as well.
    
    ---
    
    The PR also contains a couple of pure refactorings
    - Scope walk is done by using `visit_scopes` instead of a hand-rolled version.
    - Code is restructured to accomodate for rustdoc that also wants to query traits in scope, but doesn't want to filter them by associated items at all.
    
    r? `@matthewjasper`
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    589864d View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#80865 - oliviacrain:proj_based, r=RalfJung

    Use PlaceRef projection abstractions more consistently in rustc_mir
    
    PlaceRef contains abstractions for dealing with the `projections` array. This PR uses these abstractions more consistently within the `rustc_mir` crate.
    
    See associated issue: rust-lang#80647.
    
    r? `@RalfJung`
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    42801b4 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#80932 - jyn514:download-windows-llvm, r=Mar…

    …k-Simulacrum
    
    Allow downloading LLVM on Windows and MacOS
    
    - Don't ignore packaging `llvm/lib/` for `rust-dev` when LLVM is linked
    statically
    - Add `link-type.txt` so bootstrap knows whether llvm was linked
      statically or dynamically
    - Don't assume CI LLVM is linked dynamically in `bootstrap::config`
    - Fall back to dynamic linking if `link-type.txt` doesn't exist
    - Fix existing bug that split the output of `llvm-config` on lines, not spaces
    - Only special case MacOS when dynamic linking. Static linking works fine.
    - Enable building LLVM tests
    
      This works around the following llvm bug:
    
      ```
      llvm-config: error: component libraries and shared library
    
      llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest.a
      llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest_main.a
      llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVMTestingSupport.a
      thread 'main' panicked at 'command did not execute successfully: "/home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--libfiles"
      ```
    
      I'm not sure why llvm-config thinks these are required, but to avoid
      the error, this builds them anyway.
    
    - Bump version of `download-ci-llvm-stamp`
    
      `src/llvm-project` hasn't changed, but the generated tarball has.
    
    Fixes rust-lang#77084.
    
    # Current Status
    
    This works on both MacOS and Windows! 🎉 🎉 Thanks to `@nagisa,` `@halkcyon,` `@Lokathor,` `@jryans,` and `@poliorcetics` for helping me test!
    
    The `if-available` check now supports all tier 1 platforms. Although only x64 apple and x64 msvc have been tested, none of the changes here are Windows or Mac specific, and I expect this to work anywhere that LLVM artifacts are uploaded to CI (i.e. the `rust-dev` component exists).
    
    ## Windows
    
    Note that if you have an old version of MSVC build tools you'll need to update them. VS Build Tools 2019 14.28 and later are known to work. With old tools, you may see an error like the following:
    
    ```
    error LNK2001: unresolved external symbol __imp___std_init_once_complete
    ```
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    b2d8614 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    ab62218 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#81038 - flip1995:clippyup, r=Manishearth

    Update Clippy
    
    Biweekly Clippy update
    
    r? `@Manishearth`
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    f25652d View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#81064 - Mark-Simulacrum:support-stage1-chec…

    …k, r=jyn514
    
    Support non-stage0 check
    
    Seems to work locally - a full stage 1 check succeeds, building std (because we can't get away with checking it), and then checking the compiler and other tools. This ran into the problem that a unconditional x.py check in stage 1 *both* checks and builds stage 1 std, and then has to clean up because for some reason the rmeta and rlib artifacts conflict (though I'm not actually entirely sure why, but it doesn't seem worth digging in in too much detail).
    
    Ideally we wouldn't be building and checking like that but it's a minor worry as checking std is pretty fast and you can avoid it if you're aiming for speed by passing the compiler (e.g., compiler/rustc) explicitly.
    
    r? `@jyn514`
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    85c6462 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#81071 - osa1:fix_81006, r=estebank

    rustc_parse_format: Fix character indices in find_skips
    
    Fixes rust-lang#81006
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    a5a259f View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#81082 - ssomers:btree_cleanup_comments, r=M…

    …ark-Simulacrum
    
    BTreeMap: clean up a few more comments
    
    And mark `pop` as unsafe.
    r? `@Mark-Simulacrum`
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    5bc3f8c View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#81084 - LingMan:map, r=oli-obk

    Use Option::map instead of open-coding it
    
    r? `@oli-obk`
    `@rustbot` modify labels +C-cleanup +T-compiler
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    6b66591 View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#81095 - LingMan:unwrap, r=oli-obk

    Use Option::unwrap_or instead of open-coding it
    
    r? `@oli-obk` Noticed this while we were talking about the other PR just now 😆
    `@rustbot` modify labels +C-cleanup +T-compiler
    m-ou-se committed Jan 16, 2021
    Configuration menu
    Copy the full SHA
    576c3d5 View commit details
    Browse the repository at this point in the history