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 11 pull requests #78528

Merged
merged 111 commits into from
Oct 30, 2020
Merged

Rollup of 11 pull requests #78528

merged 111 commits into from
Oct 30, 2020

Commits on Oct 12, 2020

  1. docs: Reword str::strip_prefix and strip_suffix a bit

    "Some is returned with <some value>" is an awkward construction.
    The use of the passive voice is a bit odd, and doesn't seem like the
    house style.
    
    So say instead "returns X, wrapped in `Some`", for which there is some
    other precedent in stdlib.
    
    Instead of repeating "with the prefix removed", say "after the
    prefix".  This is a bit clearer that the original is not modified.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 12, 2020
    Configuration menu
    Copy the full SHA
    dbb0583 View commit details
    Browse the repository at this point in the history
  2. docs: Reword slice::strip_prefix and strip_suffix a bit

    The stabilisation issue, #73413, has an open item for documentation.
    I looked at the docs and it is all there, but I felt it could do with
    some minor wording improvement.
    
    I looked at the `str::strip_prefix` docs for a template.  (That
    resulted in me slightly changing that doc too.)
    
    I de-linkified `None` and `Some`, as I felt that rather noisy..  I
    searched stdlib, and these don't seem to be usually linkified.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 12, 2020
    Configuration menu
    Copy the full SHA
    b7974bd View commit details
    Browse the repository at this point in the history
  3. docs: Rewrap str::strip_prefix and strip_suffix back to 100

    Requested-by: @LukasKalbertodt
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 12, 2020
    Configuration menu
    Copy the full SHA
    4549c77 View commit details
    Browse the repository at this point in the history
  4. docs: Rewrap slice::strip_prefix and strip_suffix back to 100

    Requested-by: @LukasKalbertodt
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 12, 2020
    Configuration menu
    Copy the full SHA
    6f5e96f View commit details
    Browse the repository at this point in the history
  5. docs: slice::strip_prefix and strip_suffix, fold in sentence

    Roughly as requested by @LukasKalbertodt.  I still prefer clearly
    making these two cases.
    
    Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
    ijackson committed Oct 12, 2020
    Configuration menu
    Copy the full SHA
    22358c6 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2020

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

Commits on Oct 19, 2020

  1. Configuration menu
    Copy the full SHA
    114cb21 View commit details
    Browse the repository at this point in the history
  2. Add linter for a single element for loop

    Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
    patrickelectric committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    ec23db9 View commit details
    Browse the repository at this point in the history
  3. tests: if_same_then_else2: Ignore single_element_loop lint

    Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
    patrickelectric committed Oct 19, 2020
    Configuration menu
    Copy the full SHA
    ba1ca19 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    65b52d8 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2020

  1. Add lint for holding RefCell Ref across an await

    Daniel Smith committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    57bf80f View commit details
    Browse the repository at this point in the history
  2. fmt

    Daniel Smith committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    8727169 View commit details
    Browse the repository at this point in the history
  3. update_lints

    Daniel Smith committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    070a751 View commit details
    Browse the repository at this point in the history
  4. Better naming post copy/paste

    Daniel Smith committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    0f4abbf View commit details
    Browse the repository at this point in the history
  5. Add another test case

    Daniel Smith committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    b3a427d View commit details
    Browse the repository at this point in the history
  6. Move existing lint into shared file

    Daniel Smith committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    3ed69cd View commit details
    Browse the repository at this point in the history
  7. Move refcell lint into shared module

    Daniel Smith committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    ee20eba View commit details
    Browse the repository at this point in the history
  8. Convert the await holding lints to correctness

    Daniel Smith committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    d8c6bce View commit details
    Browse the repository at this point in the history
  9. Merge lints into one pass

    Daniel Smith committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    86f2b29 View commit details
    Browse the repository at this point in the history
  10. Separate tests for each lint

    Daniel Smith committed Oct 21, 2020
    Configuration menu
    Copy the full SHA
    4d33225 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2020

  1. Configuration menu
    Copy the full SHA
    4a4f998 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e70817e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c693de3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f2da0c7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6533d8b View commit details
    Browse the repository at this point in the history
  6. Address review comments

    geoffreycopin committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    e8f12d2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    02f0110 View commit details
    Browse the repository at this point in the history
  8. Fix test file

    geoffreycopin committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    30f80c3 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2020

  1. clippy_lints: Update empty_loop lint

    We also update the documentation to note that the remediations are
    different for `std` and `no_std` crates.
    
    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    3807634 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cdb555f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6caeed1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d46edd9 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2020

  1. Configuration menu
    Copy the full SHA
    62f60e1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d21ae0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    71ac0c0 View commit details
    Browse the repository at this point in the history
  4. Fix inconsistencies in handling of inert attributes on statements

    When the 'early' and 'late' visitors visit an attribute target, they
    activate any lint attributes (e.g. `#[allow]`) that apply to it.
    This can affect warnings emitted on sibiling attributes. For example,
    the following code does not produce an `unused_attributes` for
    `#[inline]`, since the sibiling `#[allow(unused_attributes)]` suppressed
    the warning.
    
    ```rust
    trait Foo {
        #[allow(unused_attributes)] #[inline] fn first();
        #[inline] #[allow(unused_attributes)] fn second();
    }
    ```
    
    However, we do not do this for statements - instead, the lint attributes
    only become active when we visit the struct nested inside `StmtKind`
    (e.g. `Item`).
    
    Currently, this is difficult to observe due to another issue - the
    `HasAttrs` impl for `StmtKind` ignores attributes for `StmtKind::Item`.
    As a result, the `unused_doc_comments` lint will never see attributes on
    item statements.
    
    This commit makes two interrelated fixes to the handling of inert
    (non-proc-macro) attributes on statements:
    
    * The `HasAttr` impl for `StmtKind` now returns attributes for
      `StmtKind::Item`, treating it just like every other `StmtKind`
      variant. The only place relying on the old behavior was macro
      which has been updated to explicitly ignore attributes on item
      statements. This allows the `unused_doc_comments` lint to fire for
      item statements.
    * The `early` and `late` lint visitors now activate lint attributes when
      invoking the callback for `Stmt`. This ensures that a lint
      attribute (e.g. `#[allow(unused_doc_comments)]`) can be applied to
      sibiling attributes on an item statement.
    
    For now, the `unused_doc_comments` lint is explicitly disabled on item
    statements, which preserves the current behavior. The exact locatiosn
    where this lint should fire are being discussed in PR #78306
    Aaron1011 committed Oct 24, 2020
    Configuration menu
    Copy the full SHA
    33f3cfc View commit details
    Browse the repository at this point in the history
  5. Add large_types_passed_by_value lint

    Refactor trivially_copy_pass_by_ref and the new lint into pass_by_ref_or_value module
    
    Update stderr of conf_unknown_key test
    
    Rename lint to large_types_passed_by_value
    
    Increase `pass_by_value_size_limit` default value to 256
    
    Improve rules for `large_types_passed_by_value`
    
    Improve tests for `large_types_passed_by_value`
    
    Improve documentation for `large_types_passed_by_value`
    
    Make minor corrections to pass_by_ref_or_value.rs suggested by clippy itself
    
    Fix `large_types_passed_by_value` example and improve docs
    
    pass_by_ref_or_value: Tweak check for mut annotation in params
    
    large_types_passed_by_value: add tests for pub trait, trait impl and inline attributes
    cauebs committed Oct 24, 2020
    Configuration menu
    Copy the full SHA
    e8731a9 View commit details
    Browse the repository at this point in the history
  6. Auto merge of #6135 - cauebs:master, r=ebroto

    Add large_types_passed_by_value lint
    
    Creates a new lint that checks for large function parameters passed by value. ~Types that are Copy were ignored, because I understand they are explicitly marked as being cheap (or just acceptable) to copy. Arrays were excluded from that restriction because they are always Copy, independently of the size, if the elements are Copy.~ Only Copy types are considered, because if a type is not Copy it cannot be dereferenced, as pointed out by `@ebroto,` and that would require analyzing the whole function body to check if the argument is moved somewhere else. `self` and `mut` parameters are also skipped.
    
    I refactored `trivially_copy_pass_by_ref` and the new lint into a new `pass_by_ref_or_value` module, since both share most of their implementations, as was pointed out to me in #4499.
    
    ~Some questions that remain:~
    ~1. Should `self` be disregarded for this lint?~
    ~2. Should we special case types like Vec and String when suggesting changes? (to slices and &str)~
    ~3. What should be the default size limit?~
    ~4. Are there any special cases I'm missing?~
    
    I ask the maintainers to add the `hacktoberfest-accepted` label if this PR is decent, even if there are some minor details to work out, but I do intend to stick around and finish the job.
    
    Fixes #4499
    
    changelog: Add new lint [`large_types_passed_by_value`]
    bors committed Oct 24, 2020
    Configuration menu
    Copy the full SHA
    5c78d26 View commit details
    Browse the repository at this point in the history
  7. Auto merge of #6190 - montrivo:manual_result_unwrap_or, r=ebroto

    manual_unwrap_or / support Result::unwrap_or
    
    Implements partially #5923.
    
    changelog: support Result::unwrap_or in manual_unwrap_or
    bors committed Oct 24, 2020
    Configuration menu
    Copy the full SHA
    29979ad View commit details
    Browse the repository at this point in the history
  8. Auto merge of #6187 - geoffreycopin:master, r=ebroto

    Lint unnecessary int-to-int and float-to-float casts
    
    This is an implementation of a lint that detects unnecessary casts of number literals, as discussed here:
    rust-lang/rust-clippy#6116
    
    ---
    
    changelog: lint unnecessary as-casts of literals when they could be written using literal syntax.
    bors committed Oct 24, 2020
    Configuration menu
    Copy the full SHA
    b06856e View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2020

  1. Auto merge of #6029 - Daniel-B-Smith:refcell_ref_await, r=flip1995

    Add lint for holding RefCell Ref across an await
    
    Fixes #6008
    
    This introduces the lint await_holding_refcell_ref. For async functions, we iterate
    over all types in generator_interior_types and look for `core::cell::Ref` or `core::cell::RefMut`. If we find one then we emit a lint.
    
    Heavily cribs from: rust-lang/rust-clippy#5439
    
    changelog: introduce the await_holding_refcell_ref lint
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    a675778 View commit details
    Browse the repository at this point in the history
  2. Auto merge of #6109 - patrickelectric:single_element_for_check, r=fli…

    …p1995
    
    Add linter for a single element for loop
    
    changelog: Fixes #1540, check for vectors that contain a single element in a for loop
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    e0e617a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f82f9c2 View commit details
    Browse the repository at this point in the history
  4. Auto merge of #6181 - cgm616:undropped-manually-drops, r=flip1995

    Add new lint for undropped ManuallyDrop values
    
    Adds a new lint for the following code:
    
    ```rust
    struct S;
    
    impl Drop for S {
        fn drop(&mut self) {
            println!("drip drop");
        }
    }
    
    fn main() {
        // This will not drop the `S`!!!
        drop(std::mem::ManuallyDrop::new(S));
        unsafe {
            // This will.
            std::mem::ManuallyDrop::drop(&mut std::mem::ManuallyDrop::new(S));
        }
    }
    ```
    
    The inner value of a `ManuallyDrop` will not be dropped unless the proper, unsafe drop function is called on it. This lint makes sure that a user does not accidently use the wrong function and forget to drop a `ManuallyDrop` value.
    
    Fixes #5581.
    
    ---
    
    *Please keep the line below*
    changelog: none
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    6b01c39 View commit details
    Browse the repository at this point in the history
  5. Change lint doc test

    FrancisMurillo committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    fb8a9cb View commit details
    Browse the repository at this point in the history
  6. Run update_lints

    FrancisMurillo committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    ec0c3af View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    77e34a6 View commit details
    Browse the repository at this point in the history
  8. Use sugg_lint_and_help

    FrancisMurillo committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    292cb9b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e7e03b7 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of #78326 - Aaron1011:fix/min-stmt-lints, r=petrochenkov

    Split out statement attributes changes from #78306
    
    This is the same as PR #78306, but `unused_doc_comments` is modified to explicitly ignore statement items (which preserves the current behavior).
    
    This shouldn't have any user-visible effects, so it can be landed without lang team discussion.
    
    ---------
    When the 'early' and 'late' visitors visit an attribute target, they
    activate any lint attributes (e.g. `#[allow]`) that apply to it.
    This can affect warnings emitted on sibiling attributes. For example,
    the following code does not produce an `unused_attributes` for
    `#[inline]`, since the sibiling `#[allow(unused_attributes)]` suppressed
    the warning.
    
    ```rust
    trait Foo {
        #[allow(unused_attributes)] #[inline] fn first();
        #[inline] #[allow(unused_attributes)] fn second();
    }
    ```
    
    However, we do not do this for statements - instead, the lint attributes
    only become active when we visit the struct nested inside `StmtKind`
    (e.g. `Item`).
    
    Currently, this is difficult to observe due to another issue - the
    `HasAttrs` impl for `StmtKind` ignores attributes for `StmtKind::Item`.
    As a result, the `unused_doc_comments` lint will never see attributes on
    item statements.
    
    This commit makes two interrelated fixes to the handling of inert
    (non-proc-macro) attributes on statements:
    
    * The `HasAttr` impl for `StmtKind` now returns attributes for
      `StmtKind::Item`, treating it just like every other `StmtKind`
      variant. The only place relying on the old behavior was macro
      which has been updated to explicitly ignore attributes on item
      statements. This allows the `unused_doc_comments` lint to fire for
      item statements.
    * The `early` and `late` lint visitors now activate lint attributes when
      invoking the callback for `Stmt`. This ensures that a lint
      attribute (e.g. `#[allow(unused_doc_comments)]`) can be applied to
      sibiling attributes on an item statement.
    
    For now, the `unused_doc_comments` lint is explicitly disabled on item
    statements, which preserves the current behavior. The exact locatiosn
    where this lint should fire are being discussed in PR #78306
    JohnTitor authored Oct 25, 2020
    Configuration menu
    Copy the full SHA
    df85532 View commit details
    Browse the repository at this point in the history
  11. Auto merge of #6162 - josephlr:empty-loop-no-std, r=flip1995

    Update empty_loop documentation/message.
    
    Originally part of #6161, but now this PR only deals with `std` crates
    
    This change:
      - Updates the `std` message .
      - Updates the docs to mention how the busy loops should be fixed
        - Gives examples of how to do this for `no_std` targets
      - Updates the tests/stderr files to test this change.
    
    changelog: Update `empty_loop` lint documentation
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    fd62c18 View commit details
    Browse the repository at this point in the history
  12. Auto merge of #6103 - FrancisMurillo:mut_mutex_lock, r=flip1995

    Add lint for `&mut Mutex::lock`
    
    Fixes #1765
    
    changelog: Add lint [`mut_mutex_lock`] for `&mut Mutex::lock` and suggests using `&mut Mutex::get_mut` instead.
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    399732b View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    d571389 View commit details
    Browse the repository at this point in the history
  14. Auto merge of #6177 - rust-lang:manual-range-contains, r=flip1995

    New lint: manual-range-contains
    
    This fixes #1110, at least for the contains-suggesting part.
    
    - \[x] 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`
    ---
    
    changelog: new lint: manual-range-contains
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    90cb25d View commit details
    Browse the repository at this point in the history
  15. Auto merge of #6198 - montrivo:needless-lifetime, r=flip1995

    needless-lifetime / multiple where clause predicates regression
    
    Closes #6159.
    
    changelog: fix regression in needless-lifetimes
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    38be214 View commit details
    Browse the repository at this point in the history
  16. Auto merge of #6211 - ThibsG:NeedlessBoolCfg, r=flip1995

    No lint with `cfg!` and fix sugg for macro in `needless_bool` lint
    
    Don't lint if `cfg!` macro is one of the operand.
    Fix suggestion when the span originated from a macro, using `hir_with_macro_callsite`.
    
    Fixes: #3973
    
    changelog: none
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    718bb28 View commit details
    Browse the repository at this point in the history
  17. Auto merge of #6222 - JohnTitor:redundant-local-def-id, r=flip1995

    Remove redundant `expect_local()` call
    
    The field `owner` of `HirId` is `LocalDefId` and `hir_id.owner.to_def_id().expect_local()` is redundant. I wonder they were introduced in some rustups.
    
    changelog: none
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    9c9aa2d View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    db8380c View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    f5a88b6 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    0c0f8db View commit details
    Browse the repository at this point in the history
  21. Fix logic mistake

    cgm616 committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    e7e4b35 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    3ce820b View commit details
    Browse the repository at this point in the history
  23. Add test case

    giraffate committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    2f5d418 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    312bbff View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    77746b9 View commit details
    Browse the repository at this point in the history
  26. Auto merge of #6224 - flip1995:rustup, r=flip1995

    Rustup
    
    r? `@ghost`
    
    changelog: none
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    4242ef8 View commit details
    Browse the repository at this point in the history
  27. Auto merge of #6183 - cgm616:hex_bin_digit_grouping, r=flip1995

    Hex bin digit grouping
    
    This revives and updates an old pr (#3391) for the current API.
    
    Closes #2538.
    
    ---
    
    *Please keep the line below*
    changelog: Add [`unusual_byte_groupings`] lint.
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    eceebc3 View commit details
    Browse the repository at this point in the history
  28. Auto merge of #6194 - giraffate:remove_an_extra_blank_line, r=flip1995

    Remove an extra blank line in doc examples
    
    It seems to be an extra blank line in doc example.
    
    changelog: none
    
    <img width="1141" alt="スクリーンショット 2020-10-19 10 32 21" src="https://user-images.githubusercontent.com/17407489/96392372-d0583200-11f6-11eb-9aab-f7e8f87eb04e.png">
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    15f6fb9 View commit details
    Browse the repository at this point in the history
  29. Auto merge of #6202 - giraffate:fix_invalid_suggestion_in_needless_co…

    …llect_test, r=flip1995
    
    Fix an invalid suggestion in `needless_collect` test
    
    A test, https://github.com/rust-lang/rust-clippy/blob/master/tests/ui/needless_collect_indirect.rs#L11-L12, suggests following codes, but the suggested codes don't work. An example is here: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6947d9f2806a83f41cc5eb8e39b09d0b.
    ```
    error: avoid using `collect()` when not needed
      --> $DIR/needless_collect_indirect.rs:11:5
       |
    LL | /     let indirect_contains = sample.iter().collect::<VecDeque<_>>();
    LL | |     indirect_contains.contains(&&5);
       | |____^
       |
    help: Check if the original Iterator contains an element instead of collecting then checking
       |
    LL |
    LL |     sample.iter().any(|x| x == &&5);
    ```
    
    changelog: none
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    83bb5ec View commit details
    Browse the repository at this point in the history
  30. Update triagebot.toml

    flip1995 authored Oct 25, 2020
    Configuration menu
    Copy the full SHA
    80b2168 View commit details
    Browse the repository at this point in the history
  31. Auto merge of #6225 - rust-lang:flip1995-patch-1, r=flip1995

    Update triagebot.toml
    
    r? `@ghost`
    changelog: none
    bors committed Oct 25, 2020
    Configuration menu
    Copy the full SHA
    afbac89 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2020

  1. Remove lint from clippy

    nathanwhit committed Oct 26, 2020
    Configuration menu
    Copy the full SHA
    a1bb10e View commit details
    Browse the repository at this point in the history
  2. rustc_span: improve bounds checks in byte_pos_to_line_and_col

    The effect of this change is to consider edge-case spans that start or
    end at the position one past the end of a file to be valid during span
    hashing and encoding. This change means that these spans will be
    preserved across incremental compilation sessions when they are part of
    a serialized query result, instead of causing the dummy span to be used.
    tgnottingham committed Oct 26, 2020
    Configuration menu
    Copy the full SHA
    df59a44 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2020

  1. Do not ICE on invalid input

    estebank committed Oct 27, 2020
    Configuration menu
    Copy the full SHA
    cd259db View commit details
    Browse the repository at this point in the history
  2. Add invalid_paths internal lint

    Michael Wright committed Oct 27, 2020
    Configuration menu
    Copy the full SHA
    66d56fe View commit details
    Browse the repository at this point in the history
  3. Fix invalid paths

    Michael Wright committed Oct 27, 2020
    Configuration menu
    Copy the full SHA
    f79c4af View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    650e3cb View commit details
    Browse the repository at this point in the history
  5. Auto merge of #6244 - mikerite:invalid_paths_20201027, r=flip1995

    New internal lint: Invalid paths
    
    Add a new internal lint that detects invalid paths in the `util::paths` and fix some invalid paths found.
    
    This commit partially addresses #6047 but the lint would have to be run before running tests to close that issue.
    
    changelog: none
    bors committed Oct 27, 2020
    Configuration menu
    Copy the full SHA
    8823684 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    09e7053 View commit details
    Browse the repository at this point in the history
  7. improve MATCH_LIKE_MATCHES_MACRO lint

    - add tests
    - refactor match_same_arms lint
    - prioritize match_expr_like_matches_macro over match_same_arms
    alex-700 committed Oct 27, 2020
    Configuration menu
    Copy the full SHA
    2b7dd31 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    47dad31 View commit details
    Browse the repository at this point in the history
  9. Auto merge of #6216 - alex-700:improve-match-like-matches-lint, r=ebroto

    Improve match like matches lint
    
    fixes #6186
    
    changelog: improve MATCH_LIKE_MATCHES_MACRO lint
    bors committed Oct 27, 2020
    Configuration menu
    Copy the full SHA
    de83f09 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2020

  1. Configuration menu
    Copy the full SHA
    a3bff69 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8e988e1 View commit details
    Browse the repository at this point in the history
  3. cargo dev update_lints

    giraffate committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    dace756 View commit details
    Browse the repository at this point in the history
  4. Fix reference

    giraffate committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    ffc2e66 View commit details
    Browse the repository at this point in the history
  5. Use double_neg.stderr

    giraffate committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    c42a22d View commit details
    Browse the repository at this point in the history
  6. Update cargo

    ehuss committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    72016f4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a50d9e7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e83e79f View commit details
    Browse the repository at this point in the history
  9. Auto merge of #6257 - giraffate:sync-from-rust, r=ebroto

    Rustup
    
    changelog: none
    bors committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    645ef50 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    77da566 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    bd7cbae View commit details
    Browse the repository at this point in the history
  12. Fix broken intra-doc link

    camelid committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    e0eed3c View commit details
    Browse the repository at this point in the history
  13. Don't say you "should" use fully qualified syntax

    That recommendation was removed last year; there isn't a particular
    style that is officially recommended anymore.
    camelid committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    4e30e10 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2020

  1. Dogfood {exclusive,half-open} ranges in compiler (nfc)

    In particular, this allows us to write more explicit matches that
    avoid the pitfalls of using a fully general fall-through case, yet
    remain fairly ergonomic. Less logic is in guard cases, more is in
    the actual exhaustive case analysis.
    
    No functional changes.
    workingjubilee committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    0e88db7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e83666f View commit details
    Browse the repository at this point in the history
  3. Added test for issue #78498

    SkiFire13 committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    1f6f917 View commit details
    Browse the repository at this point in the history
  4. Fix typos

    bugadani committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    3fba948 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of #75078 - ijackson:slice-strip, r=steveklabnik

    Improve documentation for slice strip_* functions
    
    Prompted by the stabilisation tracking issue #73413 I looked at the docs for `strip_prefix` and `strip_suffix` for both `str` and `slice`, and I felt they could be slightly improved.
    
    Thanks for your attention.
    jonas-schievink authored Oct 29, 2020
    Configuration menu
    Copy the full SHA
    2168210 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of #76138 - camelid:rc-fully-qualified-syntax, r=stevekl…

    …abnik
    
    Explain fully qualified syntax for `Rc` and `Arc`
    
    Also cleaned up some other small things.
    
    @rustbot modify labels: T-doc
    jonas-schievink authored Oct 29, 2020
    Configuration menu
    Copy the full SHA
    a384a58 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of #78244 - workingjubilee:dogfood-fancy-ranges, r=varkor

    Dogfood {exclusive,half-open} ranges in compiler (nfc)
    
    In particular, this allows us to write more explicit matches that
    avoid the pitfalls of using a fully general fall-through case, yet
    remain fairly ergonomic. Less logic is in guard cases, more is in
    the actual exhaustive case analysis.
    
    No functional changes.
    jonas-schievink authored Oct 29, 2020
    Configuration menu
    Copy the full SHA
    9867e54 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of #78422 - estebank:fix-78372, r=pnkfelix

    Do not ICE on invalid input
    
    Fix #78372.
    jonas-schievink authored Oct 29, 2020
    Configuration menu
    Copy the full SHA
    7fa9e39 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of #78423 - tgnottingham:caching_source_map_bounds_check…

    …, r=oli-obk
    
    rustc_span: improve bounds checks in byte_pos_to_line_and_col
    
    The effect of this change is to consider edge-case spans that start or
    end at the position one past the end of a file to be valid during span
    hashing and encoding. This change means that these spans will be
    preserved across incremental compilation sessions when they are part of
    a serialized query result, instead of causing the dummy span to be used.
    jonas-schievink authored Oct 29, 2020
    Configuration menu
    Copy the full SHA
    151db25 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of #78431 - Rustin-Liu:rustin-patch-lint, r=estebank

    Prefer new associated numeric consts in float error messages
    
    Fix #78382
    jonas-schievink authored Oct 29, 2020
    Configuration menu
    Copy the full SHA
    31cfe63 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of #78462 - danielframpton:fixnullisa, r=nagisa

    Use unwrapDIPtr because the Scope may be null.
    
    I ran into an assertion when using debug information on Windows with LLVM assertions enabled.
    
    It seems like we are using unwrap here (which in turn calls isa and requires the pointer to be non-null) but we expect the value to be null because that is what we are passing from rustc.
    
    This change uses unwrapDIPtr which explicitly allows nullptr.
    
    The FFI prototype for this method on the rust side has the `LLVMMetadataRef` parameter as `Scope: Option<&'a DIScope>`, and we always pass `None` when `msvc_like_names` is true.
    jonas-schievink authored Oct 29, 2020
    Configuration menu
    Copy the full SHA
    38c3409 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of #78493 - ehuss:update-cargo, r=ehuss

    Update cargo
    
    8 commits in dd83ae55c871d94f060524656abab62ec40b4c40..becb4c282b8f37469efb8f5beda45a5501f9d367
    2020-10-20 19:31:26 +0000 to 2020-10-28 16:41:55 +0000
    - List available packages if providing `--package` with an empty value (rust-lang/cargo#8808)
    - Add a future-compatibility warning on allowed feature name characters. (rust-lang/cargo#8814)
    - New namespaced features implementation. (rust-lang/cargo#8799)
    - Remove redundant "For example, " (rust-lang/cargo#8810)
    - Document platform-specific build-dependencies (rust-lang/cargo#8809)
    - Remove some unused code. (rust-lang/cargo#8807)
    - Some minor clippy fixes. (rust-lang/cargo#8804)
    - Update TOML website links. (rust-lang/cargo#8803)
    jonas-schievink authored Oct 29, 2020
    Configuration menu
    Copy the full SHA
    a01e5f8 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of #78499 - SkiFire13:fix-string-retain, r=m-ou-se

    Prevent String::retain from creating non-utf8 strings when abusing panic
    
    Fixes #78498
    
    The idea is the same as `Vec::drain`, set the len to 0 so that nobody can observe the broken invariant if it escapes the function (in this case if `f` panics)
    jonas-schievink authored Oct 29, 2020
    Configuration menu
    Copy the full SHA
    48c4afb View commit details
    Browse the repository at this point in the history
  14. Rollup merge of #78505 - ebroto:clippyup, r=oli-obk

    Update Clippy - temporary_cstring_as_ptr deprecation
    
    In #75671 `clippy::temporary_cstr_as_ptr` was removed instead of being deprecated. This will trigger an error (unknown lint) for users that refer to that lint to e.g. allow it, instead of a more informative warning.
    
    This update should fix that for nightly users.
    
    r? @oli-obk
    jonas-schievink authored Oct 29, 2020
    Configuration menu
    Copy the full SHA
    1d6e20e View commit details
    Browse the repository at this point in the history
  15. Rollup merge of #78527 - bugadani:typo3, r=jonas-schievink

    Fix some more typos
    jonas-schievink authored Oct 29, 2020
    Configuration menu
    Copy the full SHA
    e656e60 View commit details
    Browse the repository at this point in the history