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 10 pull requests #83146

Closed
wants to merge 39 commits into from

Commits on Mar 11, 2021

  1. Inline Attribute::has_name

    tmiasko committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    1ba71ab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4943190 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2021

  1. Add reproduction test

    oli-obk committed Mar 12, 2021
    Configuration menu
    Copy the full SHA
    2eeddcc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7154563 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b42e258 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7a318ae View commit details
    Browse the repository at this point in the history
  5. Replace type_alias_impl_trait by min_type_alias_impl_trait with n…

    …o actual changes in behaviour
    
    This makes `type_alias_impl_trait` not actually do anything anymore
    oli-obk committed Mar 12, 2021
    Configuration menu
    Copy the full SHA
    375e243 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ed4c2d1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    bc9019f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9a36840 View commit details
    Browse the repository at this point in the history
  9. 🍼 for tidy

    oli-obk committed Mar 12, 2021
    Configuration menu
    Copy the full SHA
    6fb5716 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2021

  1. Refactor check_doc_attrs body

    This change makes it easier to follow the control flow.
    
    I also moved the end-of-line comments attached to some symbols to before
    the symbol listing. This allows rustfmt to format the code; otherwise no
    formatting occurs (see rust-lang/rustfmt#4750).
    camelid committed Mar 13, 2021
    Configuration menu
    Copy the full SHA
    9613a88 View commit details
    Browse the repository at this point in the history
  2. Lint non-meta doc attributes

    E.g., `#[doc(123)]`.
    camelid committed Mar 13, 2021
    Configuration menu
    Copy the full SHA
    7189c05 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7e972a3 View commit details
    Browse the repository at this point in the history
  4. Add another test case

    camelid committed Mar 13, 2021
    Configuration menu
    Copy the full SHA
    fe64970 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2021

  1. Add hyphen to "crate level"

    "crate level attribute" -> "crate-level attribute"
    camelid committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    5134047 View commit details
    Browse the repository at this point in the history
  2. Update rustdoc-ui versions of the doc-attr test

    It seems there are two copies of it: one in `src/test/ui/attributes/`
    and one in `src/test/rustdoc-ui/`. I'm guessing this is to test that the
    lint is emitted both when you run the compiler and when you run rustdoc.
    camelid committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    13884dc View commit details
    Browse the repository at this point in the history
  3. Remove unused opt_local_def_id_to_hir_id function

    Found while investigating rust-lang#82933 - all LocalDefIds are expected to have
    HirIds, there's no point in pretending otherwise.
    jyn514 committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    e161a2f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    71a784d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5ec0540 View commit details
    Browse the repository at this point in the history
  6. Minor refactoring in try_index_step

    Merges `if-let` and `if x.is_some() { ... }` blocks
    osa1 committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    6ddd840 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    14038c7 View commit details
    Browse the repository at this point in the history
  8. Tweak diagnostics

    - Tweak lint message
    - Display multi-segment paths correctly
    camelid committed Mar 14, 2021
    Configuration menu
    Copy the full SHA
    13076f9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8f40e11 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2021

  1. Don't encode file information for span with a dummy location

    Fixes rust-lang#83112
    
    The location information for a dummy span isn't real, so don't encode
    it. This brings the incr comp cache code into line with the Span
    `StableHash` impl, which doesn't hash the location information for dummy
    spans.
    
    Previously, we would attempt to load the 'original' file from a dummy
    span - if the file id changed (e.g. due to being moved on disk), we would get an
    ICE, since the Span was still valid due to its hash being unchanged.
    Aaron1011 committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    7429c68 View commit details
    Browse the repository at this point in the history
  2. Introduce proc_macro_back_compat lint, and emit for time-macros-impl

    Now that future-incompat-report support has landed in nightly Cargo, we
    can start to make progress towards removing the various proc-macro
    back-compat hacks that have accumulated in the compiler.
    
    This PR introduces a new lint `proc_macro_back_compat`, which results in
    a future-incompat-report entry being generated. All proc-macro
    back-compat warnings will be grouped under this lint. Note that this
    lint will never actually become a hard error - instead, we will remove
    the special cases for various macros, which will cause older versions of
    those crates to emit some other error.
    
    I've added code to fire this lint for the `time-macros-impl` case. This
    is the easiest case out of all of our current back-compat hacks - the
    crate was renamed to `time-macros`, so seeing a filename with
    `time-macros-impl` guarantees that an older version of the parent `time`
    crate is in use.
    
    When Cargo's future-incompat-report feature gets stabilized, affected
    users will start to see future-incompat warnings when they build their
    crates.
    Aaron1011 committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    f190bc4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4bc1434 View commit details
    Browse the repository at this point in the history
  4. ⬆️ rust-analyzer

    lnicola committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    ebe51cf View commit details
    Browse the repository at this point in the history
  5. Custom error on literal names from other languages

    This detects all Java literal types and all single word C data types,
    and suggests the corresponding Rust literal type.
    syvb committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    5eae9af View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#82898 - oli-obk:tait_🧊, r=nikomatsakis

    Add a `min_type_alias_impl_trait` feature gate
    
    This new feature gate only permits type alias impl trait to be constrained by function and trait method return types. All other possible constraining sites like const/static types, closure return types and binding types are now forbidden and gated under the `type_alias_impl_trait` and `impl_trait_in_bindings` feature gates (which are both marked as incomplete, as they have various ways to ICE the compiler or cause query cycles where they shouldn't).
    
    r? ``@nikomatsakis``
    
    This is best reviewed commit-by-commit
    Dylan-DPC authored Mar 15, 2021
    Configuration menu
    Copy the full SHA
    ecd039f View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#82989 - Smittyvb:other-lang-literal-errors,…

    … r=varkor
    
    Custom error on literal names from other languages
    
    This detects all Java literal types and all single word C data types, and suggests the corresponding Rust literal type.
    Dylan-DPC authored Mar 15, 2021
    Configuration menu
    Copy the full SHA
    3bf9af2 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#83054 - tmiasko:rustc_layout_scalar_valid_r…

    …ange, r=davidtwco
    
    Validate rustc_layout_scalar_valid_range_{start,end} attributes
    
    Fixes rust-lang#82251, fixes rust-lang#82981.
    Dylan-DPC authored Mar 15, 2021
    Configuration menu
    Copy the full SHA
    46a3ce3 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#83098 - camelid:more-doc-attr-check, r=davi…

    …dtwco
    
    Find more invalid doc attributes
    
    - Lint on `#[doc(123)]`, `#[doc("hello")]`, etc.
    - Lint every attribute; e.g., will now report two warnings for `#[doc(foo, bar)]`
    - Add hyphen to "crate level"
    - Display paths like `#[doc(foo::bar)]` correctly instead of as an empty string
    Dylan-DPC authored Mar 15, 2021
    Configuration menu
    Copy the full SHA
    18abf7b View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#83108 - jyn514:remove-unused, r=estebank

    Remove unused `opt_local_def_id_to_hir_id` function
    
    Found while investigating rust-lang#82933 - all LocalDefIds are expected to have
    HirIds, there's no point in pretending otherwise.
    Dylan-DPC authored Mar 15, 2021
    Configuration menu
    Copy the full SHA
    d2d590a View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#83110 - hyksm:fix-typo, r=jonas-schievink

    Fix typos in `library/core/src/ptr/mod.rs` and `library/std/src/sys_common/thread_local_dtor.rs`
    
    adress -> address
    Dylan-DPC authored Mar 15, 2021
    Configuration menu
    Copy the full SHA
    da1e67a View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#83113 - osa1:refactor_try_index_step, r=jon…

    …as-schievink
    
    Minor refactoring in try_index_step
    
    Merges `if-let` and `if x.is_some() { ... }` blocks
    Dylan-DPC authored Mar 15, 2021
    Configuration menu
    Copy the full SHA
    8e73867 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#83127 - Aaron1011:time-macros-impl-warn, r=…

    …petrochenkov
    
    Introduce `proc_macro_back_compat` lint, and emit for `time-macros-impl`
    
    Now that future-incompat-report support has landed in nightly Cargo, we
    can start to make progress towards removing the various proc-macro
    back-compat hacks that have accumulated in the compiler.
    
    This PR introduces a new lint `proc_macro_back_compat`, which results in
    a future-incompat-report entry being generated. All proc-macro
    back-compat warnings will be grouped under this lint. Note that this
    lint will never actually become a hard error - instead, we will remove
    the special cases for various macros, which will cause older versions of
    those crates to emit some other error.
    
    I've added code to fire this lint for the `time-macros-impl` case. This
    is the easiest case out of all of our current back-compat hacks - the
    crate was renamed to `time-macros`, so seeing a filename with
    `time-macros-impl` guarantees that an older version of the parent `time`
    crate is in use.
    
    When Cargo's future-incompat-report feature gets stabilized, affected
    users will start to see future-incompat warnings when they build their
    crates.
    Dylan-DPC authored Mar 15, 2021
    Configuration menu
    Copy the full SHA
    2c82116 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#83132 - Aaron1011:fix/incr-cache-dummy, r=e…

    …stebank
    
    Don't encode file information for span with a dummy location
    
    Fixes rust-lang#83112
    
    The location information for a dummy span isn't real, so don't encode
    it. This brings the incr comp cache code into line with the Span
    `StableHash` impl, which doesn't hash the location information for dummy
    spans.
    
    Previously, we would attempt to load the 'original' file from a dummy
    span - if the file id changed (e.g. due to being moved on disk), we would get an
    ICE, since the Span was still valid due to its hash being unchanged.
    Dylan-DPC authored Mar 15, 2021
    Configuration menu
    Copy the full SHA
    b70cce6 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#83141 - lnicola:rust-analyzer-2021-03-15, r…

    …=jonas-schievink
    
    ⬆️ rust-analyzer
    Dylan-DPC authored Mar 15, 2021
    Configuration menu
    Copy the full SHA
    6b865da View commit details
    Browse the repository at this point in the history