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 12 pull requests #117404

Closed
wants to merge 40 commits into from

Commits on Oct 28, 2023

  1. Configuration menu
    Copy the full SHA
    351d532 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    04fa124 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2023

  1. Configuration menu
    Copy the full SHA
    552abdc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    82b447a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5e6c313 View commit details
    Browse the repository at this point in the history
  4. Remove memoffset dependency from rustc_query_impl.

    The comment explains it's for `unstable_offset_of`, but `offset_of` is
    now stable.
    nnethercote committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    28e60de View commit details
    Browse the repository at this point in the history
  5. Clean up rustc_*/Cargo.toml.

    - Sort dependencies and features sections.
    - Add `tidy` markers to the sorted sections so they stay sorted.
    - Remove empty `[lib`] sections.
    - Remove "See more keys..." comments.
    
    Excluded files:
    - rustc_codegen_{cranelift,gcc}, because they're external.
    - rustc_lexer, because it has external use.
    - stable_mir, because it has external use.
    nnethercote committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    8ff624a View commit details
    Browse the repository at this point in the history
  6. On object safety error, mention new enum as alternative

    When we encounter a `dyn Trait` that isn't object safe, look for its
    implementors. If there's one, mention using it directly If there are
    less than 9, mention the possibility of creating a new enum and using
    that instead.
    
    Account for object unsafe `impl Trait on dyn Trait {}`.  Make a
    distinction between public and sealed traits.
    
    Fix rust-lang#80194.
    estebank committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    8c04999 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2023

  1. Delay parsing of --cfg and --check-cfg options.

    By storing the unparsed values in `Config` and then parsing them within
    `run_compiler`, the parsing functions can use the main symbol interner,
    and not create their own short-lived interners.
    
    This change also eliminates the need for one `EarlyErrorHandler` in
    rustdoc, because parsing errors can be reported by another, slightly
    later `EarlyErrorHandler`.
    nnethercote committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    678e01a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bfcff79 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8e4ac98 View commit details
    Browse the repository at this point in the history
  4. Make Cfg and CheckCfg non-generic.

    They now only ever contains symbols.
    nnethercote committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    5c6a12c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    371f972 View commit details
    Browse the repository at this point in the history
  6. Remove out-of-date comment.

    It was added in 51938c6, a commit with
    a 7,720 line diff and a one line commit message. Even then the comment
    was incorrect; there was a removed a `build_output_filenames` call with
    a `&[]` argument in rustdoc, but the commit removed that call. In such a
    large commit, it's easy for small errors to occur.
    nnethercote committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    85e56e8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a60d643 View commit details
    Browse the repository at this point in the history
  8. Remove check_output.

    Using `find` and `any` from `std` makes the code shorter and clearer.
    nnethercote committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    95b0088 View commit details
    Browse the repository at this point in the history
  9. improve and fix x install

    Fix: Write access check of `prefix` and `sysconfdir`
    when DESTDIR is present.
    
    Improvement: Instead of repeatedly reading `DESTDIR` within
    each `fn prepare_dir` usage, read it once and pass it to
    the `fn prepare_dir`.
    
    Signed-off-by: onur-ozkan <[email protected]>
    onur-ozkan committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    4b14048 View commit details
    Browse the repository at this point in the history
  10. Streamline collect_crate_types.

    - The early return can be right at the top.
    - The control flow is simplified with `if let`.
    - The `collect` isn't necessary.
    - The "Unconditionally" comment is erroneously duplicated from
      `check_attr_crate_type`, and can be removed.
    nnethercote committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    be8fd8b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    90862f6 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    0c381ec View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    745c600 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    bc926f7 View commit details
    Browse the repository at this point in the history
  15. Fix missing leading space in suggestion

    For a local pattern with no space between `let` and `(` e.g.:
    
      let(_a) = 3;
    
    we were previously suggesting this illegal code:
    
      let_a =3;
    
    After this change the suggestion will instead be:
    
      let _a =3;
    
    (Note the space after `let`)
    gurry committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    a2486db View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    82f34fd View commit details
    Browse the repository at this point in the history
  17. Fix bad-c-variadic error being emitted multiple times

    If a function incorrectly contains multiple `...` args, and is also not
    foreign or `unsafe extern "C"`, only emit the latter error once.
    nicholasbishop committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    8508e65 View commit details
    Browse the repository at this point in the history
  18. Explicitly reject const C-variadic functions

    Trying to use C-variadics in a const function would previously fail with
    an error like "destructor of `VaListImpl<'_>` cannot be evaluated at
    compile-time".
    
    Add an explicit check for const C-variadics to provide a clearer error:
    "functions cannot be both `const` and C-variadic".
    nicholasbishop committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    f91b5ce View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    58a80c8 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    ac9c5bd View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#112463 - fmease:rustdoc-elide-x-crate-def-g…

    …en-args, r=GuillaumeGomez
    
    rustdoc: elide cross-crate default generic arguments
    
    Elide cross-crate generic arguments if they coincide with their default.
    TL;DR: Most notably, no more `Box<…, Global>` in `std`'s docs, just `Box<…>` from now on.
    Fixes rust-lang#80379.
    
    Also helps with rust-lang#44306. Follow-up to rust-lang#103885, rust-lang#107637.
    
    r? `@ghost`
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    adce189 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#117068 - nnethercote:clean-up-Cargo-toml, r…

    …=wesleywiser
    
    Clean up `compiler/rustc*/Cargo.toml`
    
    Mostly by sorting dependencies, plus some other minor things.
    
    r? `@wesleywiser`
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    e37cabe View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#117132 - estebank:issue-80194, r=petrochenkov

    On object safety error, mention new enum as alternative
    
    When we encounter a `dyn Trait` that isn't object safe, look for its implementors. If there's one, mention using it directly If there are less than 9, mention the possibility of creating a new enum and using that instead.
    
    Fix rust-lang#80194.
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    c7e6301 View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#117317 - RalfJung:track-caller, r=oli-obk

    share some track_caller logic between interpret and codegen
    
    Also move the code that implements the track_caller intrinsics out of the core interpreter engine -- it's just a helper creating a const-allocation, doesn't need to be part of the interpreter core.
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    ead3561 View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#117356 - he32:netbsd-mipsel, r=oli-obk

    Add support for mipsel-unknown-netbsd, 32-bit LE mips.
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    7d129fd View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#117357 - tmiasko:terminate, r=wesleywiser

    Rename a few remaining references to abort terminator
    
    Follow up to e3f2edc
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    adc6f2e View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#117370 - nicholasbishop:bishop-better-c-var…

    …iadic-errors, r=oli-obk
    
    C-variadic error improvements
    
    A couple improvements for c-variadic errors:
    
    1. Fix the bad-c-variadic error being emitted multiple times. If a function incorrectly contains multiple `...` args, and is also not foreign or `unsafe extern "C"`, only emit the latter error once rather than once per `...`.
    
    2. Explicitly reject `const` C-variadic functions. Trying to use C-variadics in a const function would previously fail with an error like "destructor of `VaListImpl<'_>` cannot be evaluated at compile-time". Add an explicit check for const C-variadics to provide a clearer error: "functions cannot be both `const` and C-variadic". This also addresses one of the concerns in rust-lang#44930: "Ensure that even when this gets stabilized for regular functions, it is still rejected on const fn."
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    52a5271 View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#117376 - nnethercote:rustc_interface-more, …

    …r=oli-obk
    
    More `rustc_interface` cleanups
    
    In particular, following up rust-lang#117268 with more improvement to `--cfg`/`--check-cfg` handling.
    
    r? `@oli-obk`
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    4c84a8a View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#117383 - onur-ozkan:fix-x-install, r=albert…

    …larsan68
    
    improve and fix `x install`
    
    Fix: Write access check of `prefix` and `sysconfdir` when DESTDIR is present.
    
    Improvement: Instead of repeatedly reading `DESTDIR` within each `fn prepare_dir` usage, read it once and pass it to the `fn prepare_dir`.
    
    Fixes rust-lang#117203
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    5d6645d View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#117389 - oli-obk:gen_fn, r=compiler-errors

    Some diagnostics improvements of `gen` blocks
    
    These are leftovers from rust-lang#116447
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    284e95f View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#117390 - chenyukang:yukang-fix-117284-unuse…

    …d-macro, r=estebank
    
    Fix unused variables lint issue for args in macro
    
    Fixes rust-lang#117284
    r? ```@estebank```
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    a4df941 View commit details
    Browse the repository at this point in the history
  32. Rollup merge of rust-lang#117395 - gurry:117380-wrong-parent-sugg, r=…

    …Nilstrieb
    
    Fix missing leading space in suggestion
    
    For a local pattern with no space between `let` and `(` e.g.:
    ```rust
      let(_a) = 3;
    ```
    we were previously suggesting this illegal code:
    ```rust
      let_a = 3;
    ```
    After this change the suggestion will instead be:
    ```rust
      let _a = 3;
    ```
    Fixes rust-lang#117380
    GuillaumeGomez authored Oct 30, 2023
    Configuration menu
    Copy the full SHA
    bf6f582 View commit details
    Browse the repository at this point in the history