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

Merged
merged 35 commits into from
Jun 5, 2024
Merged

Rollup of 10 pull requests #126037

merged 35 commits into from
Jun 5, 2024

Commits on May 5, 2024

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

    OliverKillane committed May 5, 2024
    Configuration menu
    Copy the full SHA
    f3dcf65 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. Update compiler/rustc_error_codes/src/error_codes/E0582.md

    Co-authored-by: Felix S Klock II <pnkfelix@pnkfx.org>
    OliverKillane and pnkfelix committed May 14, 2024
    Configuration menu
    Copy the full SHA
    a5d0988 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

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

Commits on May 24, 2024

  1. Configuration menu
    Copy the full SHA
    d6e4fe5 View commit details
    Browse the repository at this point in the history
  2. And more general error

    pacak committed May 24, 2024
    Configuration menu
    Copy the full SHA
    b70fb41 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9f8b1ca View commit details
    Browse the repository at this point in the history

Commits on May 30, 2024

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

Commits on Jun 1, 2024

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

Commits on Jun 3, 2024

  1. wipe bootstrap build before switching to bumped rustc

    Technically, wiping bootstrap builds can increase the build time.
    But in practice, trying to manually resolve post-bump issues and
    even accidentally removing the entire build directory will result
    in a much greater loss of time. After all, the bootstrap build process
    is not a particularly lengthy operation.
    
    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    92f85f1 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2024

  1. Configuration menu
    Copy the full SHA
    e609c9b View commit details
    Browse the repository at this point in the history
  2. Add Span::trim_end

    This is the counterpart of `Span::trim_start`.
    Zalathar committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    df96cba View commit details
    Browse the repository at this point in the history
  3. coverage: Return a nested vector from initial span extraction

    This will allow the span extractor to produce multiple separate buckets,
    instead of just one flat list of spans.
    Zalathar committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    9c931c0 View commit details
    Browse the repository at this point in the history
  4. coverage: Build up initial spans by appending to a vector

    This is less elegant than returning an iterator, but more flexible.
    Zalathar committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    464dee2 View commit details
    Browse the repository at this point in the history
  5. coverage: Use hole spans to carve up coverage spans into separate buc…

    …kets
    
    This performs the same task as the hole-carving code in the main span refiner,
    but in a separate earlier pass.
    Zalathar committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    6d1557f View commit details
    Browse the repository at this point in the history
  6. coverage: Remove hole-carving code from the main span refiner

    Now that hole spans are handled by a separate earlier pass, this code never
    sees hole spans, and therefore doesn't need to deal with them.
    Zalathar committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    c57a1d1 View commit details
    Browse the repository at this point in the history
  7. std::unix::fs::get_path: using fcntl codepath for netbsd instead.

    on netbsd, procfs is not as central as on linux/solaris thus
    can be perfectly not mounted.
    Thus using fcntl with F_GETPATH, the kernel deals with MAXPATHLEN
    internally too.
    devnexen committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    fd648a3 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. Use a LocalDefId for HirTyLowerer::item_def_id, since we only eve…

    …r (can) use it for local items
    oli-obk committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    dc020ae View commit details
    Browse the repository at this point in the history
  2. Simplify some code paths and remove an unused field

    `ct_infer` and `lower_ty` will correctly result in an error constant or type respectively, as they go through a `HirTyLowerer` method (just like `HirTyLowerer::allow_infer` is a method implemented by both implementors
    oli-obk committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    9d387d1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    abd308b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6a2e15a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7870674 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4146b82 View commit details
    Browse the repository at this point in the history
  7. Unify optional param info with object lifetime default boolean into a…

    …n enum that exhaustively supports all call sites
    oli-obk committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    c8a331a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a8e091d View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#124746 - OliverKillane:E0582-explain-assoc-…

    …types-improvement, r=pnkfelix
    
    `rustc --explain E0582` additional example
    
    ## Context
    *From rust-lang#124744*
    
    Expands the example for E0582, an error ensuring that lifetime in a function's return type is sufficiently constrained (e.g. actually tied to some input type), to show an additional example where one sees the lifetime occurring syntactically among the relevant function input types, but is nonetheless rejected by rustc because a syntactic occurrence is not always sufficient.
    matthiaskrgr committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    28deff4 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#125407 - pacak:no-lending-iterators, r=pnkf…

    …elix
    
    Detect when user is trying to create a lending `Iterator` and give a custom explanation
    
    The scope for this diagnostic is to detect lending iterators specifically and it's main goal is to help beginners to understand that what they are trying to implement might not be possible for `Iterator` trait specifically.
    
    I ended up to changing the wording from originally proposed in the ticket because it might be misleading otherwise: `Data` might have a lifetime parameter but it can be unrelated to items user is planning to return.
    
    Fixes rust-lang#125337
    matthiaskrgr committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    49f9504 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#125505 - aDotInTheVoid:middle-idl, r=pnkfelix

    Add intra-doc-links to rustc_middle crate-level docs.
    
    Makes it slightly faster to find these modules, as you don't need to hunt for them in the big list.
    matthiaskrgr committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    efc3fdc View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#125792 - compiler-errors:dont-drop-upcast-c…

    …and, r=lcnr
    
    Don't drop `Unsize` candidate in intercrate mode
    
    Fixes rust-lang#125767
    matthiaskrgr committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    e174512 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#125819 - oli-obk:localize, r=fmease

    Various `HirTyLowerer` cleanups
    
    Previously there was some ad-hoc specialization going on, because you could call `allows_infer`, which basically was deciding between whether the trait object was backed by `FnCtxt` or by `ItemCtxt`. I moved all the different logic into dedicated methods on `HirTyLowerer` and removed `allows_infer`
    
    best reviewed commit-by-commit
    matthiaskrgr committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    94c19c6 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#125861 - name1e5s:fix/rpath_null_panic, r=m…

    …ichaelwoerister
    
    rustc_codegen_ssa: fix `get_rpath_relative_to_output` panic when lib only contains file name
    
    <!--
    If this PR is related to an unstable feature or an otherwise tracked effort,
    please link to the relevant tracking issue here. If you don't know of a related
    tracking issue or there are none, feel free to ignore this.
    
    This PR will get automatically assigned to a reviewer. In case you would like
    a specific user to review your work, you can assign it to them by using
    
        r​? <reviewer name>
    -->
    
    When compiles program with `-C rpath=yes` but with no output filename specified, or with filename ONLY, we will get an ICE for now. Fix it by treat empty `output` path in `get_rpath_relative_to_output`  as current dir.
    
    Before this patch:
    
    ```bash
    rustc -C prefer_dynamic=yes -C rpath=yes -O h.rs  # ICE, no output filename specified
    rustc -o hello -C prefer_dynamic=yes -C rpath=yes -O h.rs # ICE, output filename has no path
    rustc -o ./hello -C prefer_dynamic=yes -C rpath=yes -O h.rs # Works
    ```
    
    All those examples work after the patch.
    
    Close rust-lang#119571.
    Close rust-lang#125785.
    matthiaskrgr committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    e2ea7d8 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#125911 - onur-ozkan:wipe-broken-cache, r=al…

    …bertlarsan68
    
    delete bootstrap build before switching to bumped rustc
    
    Technically, wiping bootstrap builds can increase the build time. But in practice, trying to manually resolve post-bump issues and even accidentally removing the entire build directory will result in a much greater loss of time. After all, the bootstrap build process is not a particularly lengthy operation.
    
    Workaround for rust-lang#125578
    matthiaskrgr committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    ebc66fd View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#125921 - Zalathar:buckets, r=oli-obk

    coverage: Carve out hole spans in a separate early pass
    
    When extracting spans from MIR for use in coverage instrumentation, we sometimes need to identify *hole spans* (currently just closures), and carve up the other spans so that they don't overlap with holes.
    
    This PR simplifies the main coverage-span-refiner by extracting the hole-carving process into a separate early pass. That pass produces a series of independent buckets, and we run the span-refiner on each bucket separately.
    
    There is almost no difference in the resulting mappings, other than in some edge cases involving macros.
    matthiaskrgr committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    79bb336 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#125940 - devnexen:unix_fs_netbsd_get_path, …

    …r=cuviper
    
    std::unix::fs::get_path: using fcntl codepath for netbsd instead.
    
    on netbsd, procfs is not as central as on linux/solaris thus can be perfectly not mounted.
    Thus using fcntl with F_GETPATH, the kernel deals with MAXPATHLEN internally too.
    matthiaskrgr committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    808ad60 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#126022 - lcnr:generalize-alias-bivariant, r…

    …=compiler-errors
    
    set `has_unconstrained_ty_var` when generalizing aliases in bivariant contexts
    
    this previously prevented the `regression-31157` benchmark from building
    
    r? `@compiler-errors`
    matthiaskrgr committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    dd2e1a3 View commit details
    Browse the repository at this point in the history