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 8 pull requests #87242

Merged
merged 19 commits into from
Jul 18, 2021
Merged

Rollup of 8 pull requests #87242

merged 19 commits into from
Jul 18, 2021

Commits on Jun 30, 2021

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

Commits on Jul 2, 2021

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

Commits on Jul 14, 2021

  1. Remove unnecessary CrateNum from Cache.externs

    It can be found from ExternalCrate.
    jyn514 committed Jul 14, 2021
    Configuration menu
    Copy the full SHA
    e32ecee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a30fa08 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2021

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

Commits on Jul 16, 2021

  1. Configuration menu
    Copy the full SHA
    0d3d6f0 View commit details
    Browse the repository at this point in the history
  2. Consider all fields when comparing DllImports, to remove nondetermini…

    …nsm in multiple-definitions test
    ricobbe committed Jul 16, 2021
    Configuration menu
    Copy the full SHA
    ce59f1a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9b874c4 View commit details
    Browse the repository at this point in the history
  4. rustc_middle: remove redundant clone

    found while looking through some clippy lint warnings
    matthiaskrgr committed Jul 16, 2021
    Configuration menu
    Copy the full SHA
    6ffb6c4 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2021

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

Commits on Jul 18, 2021

  1. Rollup merge of rust-lang#86763 - JohnTitor:test-63355, r=oli-obk

    Add a regression test for issue-63355
    
    Closes rust-lang#63355
    r? ``@nikomatsakis``
    JohnTitor committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    76300d5 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#86814 - Aaron1011:inner-doc-recover, r=este…

    …bank
    
    Recover from a misplaced inner doc comment
    
    Fixes rust-lang#86781
    JohnTitor committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    469935f View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#86843 - FabianWolff:issue-86820, r=lcnr

    Check that const parameters of trait methods have compatible types
    
    This PR fixes rust-lang#86820. The problem is that this currently passes the type checker:
    ```rust
    trait Tr {
        fn foo<const N: u8>(self) -> u8;
    }
    
    impl Tr for f32 {
        fn foo<const N: bool>(self) -> u8 { 42 }
    }
    ```
    i.e. the type checker fails to check whether const parameters in `impl` methods have the same type as the corresponding declaration in the trait. With my changes, I get, for the above code:
    ```
    error[E0053]: method `foo` has an incompatible const parameter type for trait
     --> test.rs:6:18
      |
    6 |     fn foo<const N: bool>(self) -> u8 { 42 }
      |                  ^
      |
    note: the const parameter `N` has type `bool`, but the declaration in trait `Tr::foo` has type `u8`
     --> test.rs:2:18
      |
    2 |     fn foo<const N: u8>(self) -> u8;
      |                  ^
    
    error: aborting due to previous error
    ```
    This fixes rust-lang#86820, where an ICE happens later on because the trait method is declared with a const parameter of type `u8`, but the `impl` uses one of type `usize`:
    > `expected int of size 8, but got size 1`
    JohnTitor committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    783efd2 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#86889 - jyn514:crate-cleanup, r=camelid

    rustdoc: Cleanup ExternalCrate
    
    - Remove unnecessary CrateNum from Cache.externs
    - Remove trival impl Clean for CrateNum
    JohnTitor committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    eef5108 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#87092 - ricobbe:fix-raw-dylib-multiple-defi…

    …nitions, r=petrochenkov
    
    Remove nondeterminism in multiple-definitions test
    
    Compare all fields in `DllImport` when sorting to avoid nondeterminism in the error for multiple inconsistent definitions of an extern function.  Restore the multiple-definitions test.
    
    Resolves rust-lang#87084.
    JohnTitor committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    81d0b70 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#87170 - xFrednet:clippy-5393-add-diagnostic…

    …-items, r=Manishearth,oli-obk
    
    Add diagnostic items for Clippy
    
    This adds a bunch of diagnostic items to `std`/`core`/`alloc` functions, structs and traits used in Clippy. The actual refactorings in Clippy to use these items will be done in a different PR in Clippy after the next sync.
    
    This PR doesn't include all paths Clippy uses, I've only gone through the first 85 lines of Clippy's [`paths.rs`](https://github.com/rust-lang/rust-clippy/blob/ecf85f4bdc319f9d9d853d1fff68a8a25e64c7a8/clippy_utils/src/paths.rs) (after rust-lang/rust-clippy#7466) to get some feedback early on. I've also decided against adding diagnostic items to methods, as it would be nicer and more scalable to access them in a nicer fashion, like adding a `is_diagnostic_assoc_item(did, sym::Iterator, sym::map)` function or something similar (Suggested by `@camsteffen` [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/Diagnostic.20Item.20Naming.20Convention.3F/near/225024603))
    
    There seems to be some different naming conventions when it comes to diagnostic items, some use UpperCamelCase (`BinaryHeap`) and some snake_case (`hashmap_type`). This PR uses UpperCamelCase for structs and traits and snake_case with the module name as a prefix for functions. Any feedback on is this welcome.
    
    cc: rust-lang/rust-clippy#5393
    
    r? `@Manishearth`
    JohnTitor committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    07faa2e View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#87183 - RalfJung:option-doctest, r=jyn514

    fix typo in compile_fail doctest
    
    Fixes a typo introduced by rust-lang#86211. For some reason this typo makes Miri go all crazy when running libcore doctests (rust-lang/miri#1852). Kudos to ``@hyd-dev`` for noticing the typo.
    
    Cc ``@tlyu`` ``@joshtriplett``
    JohnTitor committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    c1ee9a3 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#87205 - matthiaskrgr:clippy_cln, r=oli-obk

    rustc_middle: remove redundant clone
    
    found while looking through some clippy lint warnings
    JohnTitor committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    810e478 View commit details
    Browse the repository at this point in the history