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

Closed
wants to merge 34 commits into from

Commits on Aug 28, 2024

  1. Configuration menu
    Copy the full SHA
    736ab66 View commit details
    Browse the repository at this point in the history
  2. Suggest the struct variant pattern syntax on usage of unit variant pa…

    …ttern for a struct variant
    tunawasabi committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    2ddcbca View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. Don't leave debug locations for constants sitting on the builder inde…

    …finitely.
    
    Because constants are currently emitted *before* the prologue, leaving the
    debug location on the IRBuilder spills onto other instructions in the prologue
    and messes up both line numbers as well as the point LLVM chooses to be the
    prologue end.
    
    Example LLVM IR (irrelevant IR elided):
    Before:
    
    define internal { i64, i64 } @_ZN3tmp3Foo18var_return_opt_try17he02116165b0fc08cE(ptr align 8 %self) !dbg !347 {
    start:
      %self.dbg.spill = alloca [8 x i8], align 8
      %_0 = alloca [16 x i8], align 8
      %residual.dbg.spill = alloca [0 x i8], align 1
        #dbg_declare(ptr %residual.dbg.spill, !353, !DIExpression(), !357)
      store ptr %self, ptr %self.dbg.spill, align 8, !dbg !357
        #dbg_declare(ptr %self.dbg.spill, !350, !DIExpression(), !358)
    
    After:
    
    define internal { i64, i64 } @_ZN3tmp3Foo18var_return_opt_try17h00b17d08874ddd90E(ptr align 8 %self) !dbg !347 {
    start:
      %self.dbg.spill = alloca [8 x i8], align 8
      %_0 = alloca [16 x i8], align 8
      %residual.dbg.spill = alloca [0 x i8], align 1
        #dbg_declare(ptr %residual.dbg.spill, !353, !DIExpression(), !357)
      store ptr %self, ptr %self.dbg.spill, align 8
        #dbg_declare(ptr %self.dbg.spill, !350, !DIExpression(), !358)
    
    Note in particular how !357 from %residual.dbg.spill's dbg_declare no longer
    falls through onto the store to %self.dbg.spill. This fixes argument values
    at entry when the constant is a ZST (e.g. <Option as Try>::Residual). This
    fixes rust-lang#130003 (but note that it does *not* fix issues with argument values and
    non-ZST constants, which emit their own stores that have debug info on them,
    like rust-lang#128945).
    khuey committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    7ed9f94 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2024

  1. Fix linking error when compiling for 32-bit watchOS

    In rust-lang#124748, I mistakenly conflated
    "not SjLj" to mean "ARM EHABI", which isn't true, watchOS armv7k
    (specifically only that architecture) uses a third unwinding method
    called "DWARF CFI".
    madsmtm committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    f98ca32 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. Configuration menu
    Copy the full SHA
    713828d View commit details
    Browse the repository at this point in the history
  2. Report the note when specified in diagnostic::on_unimplemented

    Signed-off-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
    FedericoBruzzone committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    4cecf42 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8f81597 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    49b3df9 View commit details
    Browse the repository at this point in the history
  5. Clarify docs for std::collections

    Page affected: https://doc.rust-lang.org/std/collections/index.html#performance
    
    Changes:
    
    - bulleted conventions
    - expanded definitions on terms used
    - more accessible language
    - merged Sequence and Map performance cost tables
    root-goblin authored and workingjubilee committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    4198594 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    180eace View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c40ee79 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3daa951 View commit details
    Browse the repository at this point in the history
  9. clean up internal comments about float semantics

    - remove an outdated FIXME
    - add reference to floating-point semantics issue
    
    Co-authored-by: Jubilee <workingjubilee@gmail.com>
    RalfJung and workingjubilee committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    e556c13 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. update stdarch

    RalfJung committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    b44f1dd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    542a6c6 View commit details
    Browse the repository at this point in the history
  3. Fix false positive with missing_docs and #[test]

    Since rust-lang#130025, the compiler don't ignore missing_docs when compiling the tests.
    But there is now a false positive warning for every `#[test]`
    
    For example, this code
    ```rust
    //! Crate docs
    
    fn just_a_test() {}
    ```
    
    Would emit this warning when running `cargo test`
    
    ```
    warning: missing documentation for a constant
     --> src/lib.rs:5:1
      |
    4 | #[test]
      | ------- in this procedural macro expansion
    5 | fn just_a_test() {}
      | ^^^^^^^^^^^^^^^^^^^
    ```
    ogoffart committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    6eddbb7 View commit details
    Browse the repository at this point in the history
  4. Make SearchPath::new public

    Vetle Rasmussen committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    9566163 View commit details
    Browse the repository at this point in the history
  5. Use #[doc(hidden)] instead of #[allow(missing_docs)] on the const…

    … generated for `#[test]`
    ogoffart committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    5d456df View commit details
    Browse the repository at this point in the history
  6. Use doc(hidden) instead of allow(missing_docs) in the test harness

    So that it doesn't fail with `forbid(missing_docs)`
    
    Fixes rust-lang#130218
    ogoffart committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    cc34d64 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    41dc5d3 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#129260 - wafarm:dont-suggest-closures, r=co…

    …mpiler-errors
    
    Don't suggest adding return type for closures with default return type
    
    Follow up of rust-lang#129223
    
    r? `@compiler-errors`
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    e6c3b67 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#129520 - tunawasabi:suggest-adding-struct-p…

    …attern-syntax, r=compiler-errors
    
    Suggest the correct pattern syntax on usage of unit variant pattern for a struct variant
    
    Closes rust-lang#126243
    
    I add a suggestion on usage of unit variant pattern for a struct variant.
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    47b5185 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#129696 - RalfJung:stdarch, r=Amanieu

    update stdarch
    
    The goal is mostly to pull in rust-lang/stdarch#1633.
    
    r? `@Amanieu`
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    027a105 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#129759 - dingxiangfei2009:stabilize-const-r…

    …efs-to-static, r=petrochenkov
    
    Stabilize `const_refs_to_static`
    
    Close rust-lang#128183
    Tracked by rust-lang#119618
    cc `@nikomatsakis`
    
    Meanwhile, I am cooking a sub-section in the language reference.
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    4cda52d View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#129835 - RalfJung:float-tests, r=workingjub…

    …ilee
    
    enable const-float-classify test, and test_next_up/down on 32bit x86
    
    The  test_next_up/down tests have been disabled on all 32bit x86 targets, which goes too far -- they should definitely work on our (tier 1) i686 target, it is only without SSE that we might run into trouble due to rust-lang#114479. However, I cannot reproduce that trouble any more -- maybe that got fixed by rust-lang#123351?
    
    The  const-float-classify test relied on const traits "because we can", and got disabled when const traits got removed. That's an unfortunate reduction in test coverage of our float functionality, so let's restore the test in a way that does not rely on const traits.
    
    The const-float tests are actually testing runtime behavior as well, and I don't think that runtime behavior is covered anywhere else. Probably they shouldn't be called "const-float", but we don't have a `tests/ui/float` folder... should I create one and move them there? Are there any other ui tests that should be moved there?
    
    I also removed some FIXME referring to not use x87 for Rust-to-Rust-calls -- that has happened in rust-lang#123351 so this got fixed indeed. Does that mean we can simplify all that float code again? I am not sure how to test it. Is running the test suite with an i586 target enough?
    
    Cc `@tgross35` `@workingjubilee`
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    16a1186 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#129866 - root-goblin:patch-1, r=workingjubilee

    Clarify documentation labelling and definitions for std::collections
    
    Page affected: https://doc.rust-lang.org/std/collections/index.html#performance
    
    Changes:
    - bulleted conventions
    - expanded definitions on terms used
    - more accessible language
    - more informative headings
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    3a54e98 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#130052 - khuey:clear-dilocation-after-const…

    …-emission, r=michaelwoerister
    
    Don't leave debug locations for constants sitting on the builder indefinitely
    
    Because constants are currently emitted *before* the prologue, leaving the debug location on the IRBuilder spills onto other instructions in the prologue and messes up both line numbers as well as the point LLVM chooses to be the prologue end.
    
    Example LLVM IR (irrelevant IR elided):
    Before:
    ```
    define internal { i64, i64 } `@_ZN3tmp3Foo18var_return_opt_try17he02116165b0fc08cE(ptr` align 8 %self) !dbg !347 { start:
      %self.dbg.spill = alloca [8 x i8], align 8
      %_0 = alloca [16 x i8], align 8
      %residual.dbg.spill = alloca [0 x i8], align 1
        #dbg_declare(ptr %residual.dbg.spill, !353, !DIExpression(), !357)
      store ptr %self, ptr %self.dbg.spill, align 8, !dbg !357
        #dbg_declare(ptr %self.dbg.spill, !350, !DIExpression(), !358)
    ```
    After:
    ```
    define internal { i64, i64 } `@_ZN3tmp3Foo18var_return_opt_try17h00b17d08874ddd90E(ptr` align 8 %self) !dbg !347 { start:
      %self.dbg.spill = alloca [8 x i8], align 8
      %_0 = alloca [16 x i8], align 8
      %residual.dbg.spill = alloca [0 x i8], align 1
        #dbg_declare(ptr %residual.dbg.spill, !353, !DIExpression(), !357)
      store ptr %self, ptr %self.dbg.spill, align 8
        #dbg_declare(ptr %self.dbg.spill, !350, !DIExpression(), !358)
    ```
    Note in particular how !357 from %residual.dbg.spill's dbg_declare no longer falls through onto the store to %self.dbg.spill. This fixes argument values at entry when the constant is a ZST (e.g. `<Option as Try>::Residual`). This fixes rust-lang#130003 (but note that it does *not* fix issues with argument values and non-ZST constants, which emit their own stores that have debug info on them, like rust-lang#128945).
    
    r? `@michaelwoerister`
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    dfdc5b6 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#130077 - madsmtm:watchos-arm-unwind, r=work…

    …ingjubilee
    
    Fix linking error when compiling for 32-bit watchOS
    
    In rust-lang#124494 (or rust-lang#124748), I mistakenly conflated "not SjLj" to mean "ARM EHABI", which isn't true, 32-bit watchOS uses a third unwinding method called "DWARF CFI".
    
    So this PR is effectively a revert of rust-lang#124494, with a few more comments explaining what's going on.
    
    Fixes rust-lang#130071.
    
    r? Mark-Simulacrum (since you reviewed the original)
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    37e6ace View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#130123 - FedericoBruzzone:master, r=compile…

    …r-errors
    
    Report the `note` when specified in `diagnostic::on_unimplemented`
    
    Before this PR the `note` field was completely ignored for some reason, now it is shown (I think) correctly during the hir typechecking phase.
    
    1. Report the `note` when specified in `diagnostic::on_unimplemented`
    2. Added a test for unimplemented trait diagnostic
    3. Added a test for custom unimplemented trait diagnostic
    
    Close rust-lang#130084
    
    P.S. This is my first PR to rustc.
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    7a2b05f View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#130156 - nebulark:test_buildinfo, r=jieyouxu

    Add test for S_OBJNAME & update test for LF_BUILDINFO cl and cmd
    
    Update the unit test for checking cl and cmd in LF_BUILDINFO. With llvm-pdbutil we can now more specifically check if the string appears at the right location instead of just checking whether the string exists at all.
    Context: rust-lang#96475
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    8b3e984 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#130206 - GrigorenkoPV:WSAEDQUOT, r=ChrisDenton

    Map `WSAEDQUOT` to `ErrorKind::FilesystemQuotaExceeded`
    
    cc rust-lang#86442
    
    As summarized in rust-lang#130190, there seems to be a consensus that this should be done.
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    c4e2002 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#130207 - GrigorenkoPV:ERROR_CANT_RESOLVE_FI…

    …LENAME, r=ChrisDenton
    
    Map `ERROR_CANT_RESOLVE_FILENAME` to `ErrorKind::FilesystemLoop`
    
    cc rust-lang#86442
    
    As summarized in rust-lang#130188, there seems to be a consensus that this should be done.
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    c60f562 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#130219 - ogoffart:missing-docs-test, r=Urgau

    Fix false positive with `missing_docs` and `#[test]`
    
    Since rust-lang#130025, the compiler don't ignore missing_docs when compiling the tests. But there is now a false positive warning for every `#[test]`
    
    For example, this code
    ```rust
    //! Crate docs
    
    fn just_a_test() {}
    ```
    
    Would emit this warning when running `cargo test`
    
    ```
    warning: missing documentation for a constant
     --> src/lib.rs:5:1
      |
    4 | #[test]
      | ------- in this procedural macro expansion
    5 | fn just_a_test() {}
      | ^^^^^^^^^^^^^^^^^^^
    ```
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    0b4c281 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#130221 - vetleras:pub_search_path_new, r=ch…

    …enyukang
    
    Make SearchPath::new public
    
    I'm writing a tool that uses `rustc_interface`, and would like to construct `SearchPath` with its `new` method.
    
    As all three fields in `SearchPath` are public anyway, the proposed change should not change the privacy or encapsulation of the struct.
    workingjubilee committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    2f4edab View commit details
    Browse the repository at this point in the history