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

Closed

Commits on Sep 19, 2023

  1. Add type field to json diagnostic outputs

    Currently the json-formatted outputs have no way to unambiguously
    determine which kind of message is being output. A consumer can look for
    specific fields in the json object (eg "message"), but there's no
    guarantee that in future some other kind of output will have a field of
    the same name.
    
    This PR adds a `"type"` field to add json outputs which can be used to
    unambiguously determine which kind of output it is. The mapping is:
    
    diagnostic: regular compiler diagnostics
    artifact: artifact notifications
    future_incompat: Report of future incompatibility
    unused_extern: Unused crate warnings/errors
    
    This matches the "internally tagged" representation for serde enums.
    jsgf committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    5c81706 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    62ad57b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    54267dd View commit details
    Browse the repository at this point in the history
  4. Use serde_json::to_writer for JsonEmitter::emit

    Avoids an unnecessary intermediate string.
    jsgf committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    00adbb2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    da3df9c View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2023

  1. Use $message_type as the tag

    `type` turned out to be controversial.
    jsgf committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    8f08458 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2023

  1. Update docs too

    jsgf committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    8aa4fb5 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2023

  1. Merge commit 'e4fe941b11a55c5005630696e9b6d81c65f7bd04' into subtree-…

    …update_cg_gcc_2023-10-25
    antoyo committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    9f4f90b View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2023

  1. Merge commit '09ce29d0591a21e1abae22eac4d41ffd32993af8' into subtree-…

    …update_cg_gcc_2023-10-25
    antoyo committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    ff57d70 View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2023

  1. Configuration menu
    Copy the full SHA
    249969c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    34e6386 View commit details
    Browse the repository at this point in the history
  3. Fix config.sh script

    GuillaumeGomez committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    a37446b View commit details
    Browse the repository at this point in the history
  4. Pass --sysroot option

    GuillaumeGomez committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    1075b80 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a13408d View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2023

  1. Fix vector compilation error

    antoyo committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    9149bec View commit details
    Browse the repository at this point in the history
  2. Merge pull request rust-lang#368 from rust-lang/fix/vector-error

    Fix vector compilation error
    antoyo authored Nov 3, 2023
    Configuration menu
    Copy the full SHA
    f20f6bb View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2023

  1. Configuration menu
    Copy the full SHA
    cc2af1f View commit details
    Browse the repository at this point in the history
  2. Merge pull request rust-lang#374 from rust-lang/fix/eh-frame

    Do not emit .eh_frame section if using -Cpanic=abort
    antoyo authored Nov 8, 2023
    Configuration menu
    Copy the full SHA
    551ea4b View commit details
    Browse the repository at this point in the history
  3. Set the .comment section

    antoyo committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    4dbfa4d View commit details
    Browse the repository at this point in the history
  4. Merge pull request rust-lang#377 from rust-lang/feature/comment-section

    Feature/comment section
    antoyo authored Nov 8, 2023
    Configuration menu
    Copy the full SHA
    c6bc7ec View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2023

  1. Configuration menu
    Copy the full SHA
    b2add8a View commit details
    Browse the repository at this point in the history
  2. interpret: simplify handling of shifts by no longer trying to handle …

    …signed and unsigned shift amounts in the same branch
    RalfJung committed Nov 12, 2023
    Configuration menu
    Copy the full SHA
    31493c7 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2023

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

Commits on Nov 15, 2023

  1. Add arm64e-apple-ios target

    arttet committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    f5e3492 View commit details
    Browse the repository at this point in the history
  2. Add arm64e-apple-darwin target

    arttet committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    a787208 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2023

  1. Configuration menu
    Copy the full SHA
    10127d9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3ffbb48 View commit details
    Browse the repository at this point in the history
  3. Bump cfg(bootstrap)s

    Mark-Simulacrum committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    a6493c1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    12efa53 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2023

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

Commits on Nov 18, 2023

  1. Configuration menu
    Copy the full SHA
    4d8b25c View commit details
    Browse the repository at this point in the history
  2. Fix CI

    antoyo committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    a3b6444 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2023

  1. Configuration menu
    Copy the full SHA
    f34e7f4 View commit details
    Browse the repository at this point in the history
  2. Merge pull request rust-lang#387 from rust-lang/sync_from_rust_2023_1…

    …1_17
    
    Sync from rust 2023/11/17
    antoyo authored Nov 19, 2023
    Configuration menu
    Copy the full SHA
    2e8386e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    13959bf View commit details
    Browse the repository at this point in the history
  4. Merge commit '2e8386e9fb3506cef991d04f8b3bc78f9a0c2630' into subtree-…

    …update_cg_gcc_2023-11-17
    antoyo committed Nov 19, 2023
    Configuration menu
    Copy the full SHA
    fa696af View commit details
    Browse the repository at this point in the history
  5. Pass TyCtxt by value

    antoyo committed Nov 19, 2023
    Configuration menu
    Copy the full SHA
    326f241 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    488dcb7 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2023

  1. Rollup merge of rust-lang#115526 - arttet:master, r=jackh726

    Add arm64e-apple-ios & arm64e-apple-darwin targets
    
    This introduces
    
    *  `arm64e-apple-ios`
    *  `arm64e-apple-darwin`
    
    Rust targets for support `arm64e` architecture on `iOS` and `Darwin`.
    
    So, this is a first approach for integrating to the Rust compiler.
    
    ## Tier 3 Target Policy
    
    > * A tier 3 target must have a designated developer or developers (the "target
    maintainers") on record to be CCed when issues arise regarding the target.
    (The mechanism to track and CC such developers may evolve over time.)
    
    I will be the target maintainer.
    
    > * Targets must use naming consistent with any existing targets; for instance, a
    target for the same CPU or OS as an existing Rust target should use the same
    name for that CPU or OS. Targets should normally use the same names and
    naming conventions as used elsewhere in the broader ecosystem beyond Rust
    (such as in other toolchains), unless they have a very good reason to
    diverge. Changing the name of a target can be highly disruptive, especially
    once the target reaches a higher tier, so getting the name right is important
    even for a tier 3 target.
    Target names should not introduce undue confusion or ambiguity unless
    absolutely necessary to maintain ecosystem compatibility. For example, if
    the name of the target makes people extremely likely to form incorrect
    beliefs about what it targets, the name should be changed or augmented to
    disambiguate it.
    If possible, use only letters, numbers, dashes and underscores for the name.
    Periods (.) are known to cause issues in Cargo.
    
    The target names `arm64e-apple-ios`, `arm64e-apple-darwin` were derived from `aarch64-apple-ios`, `aarch64-apple-darwin`.
    In this [ticket,](rust-lang#73628) people discussed the best suitable names for these targets.
    
    > In some cases, the arm64e arch might be "different". For example:
    > * `thread_set_state` might fail with (os/kern) protection failure if we try to call it from arm64 process to arm64e process.
    > * The returning value of dlsym is PAC signed on arm64e, while left untouched on arm64
    > * Some function like pthread_create_from_mach_thread requires a PAC signed function pointer on arm64e, which is not required on arm64.
    
    So, I have chosen them because there are similar triplets in LLVM. I think there are no more suitable names for these targets.
    
    > * Tier 3 targets may have unusual requirements to build or use, but must not
    create legal issues or impose onerous legal terms for the Rust project or for
    Rust developers or users.
    The target must not introduce license incompatibilities.
    Anything added to the Rust repository must be under the standard Rust
    license (MIT OR Apache-2.0).
    The target must not cause the Rust tools or libraries built for any other
    host (even when supporting cross-compilation to the target) to depend
    on any new dependency less permissive than the Rust licensing policy. This
    applies whether the dependency is a Rust crate that would require adding
    new license exceptions (as specified by the tidy tool in the
    rust-lang/rust repository), or whether the dependency is a native library
    or binary. In other words, the introduction of the target must not cause a
    user installing or running a version of Rust or the Rust tools to be
    subject to any new license requirements.
    Compiling, linking, and emitting functional binaries, libraries, or other
    code for the target (whether hosted on the target itself or cross-compiling
    from another target) must not depend on proprietary (non-FOSS) libraries.
    Host tools built for the target itself may depend on the ordinary runtime
    libraries supplied by the platform and commonly used by other applications
    built for the target, but those libraries must not be required for code
    generation for the target; cross-compilation to the target must not require
    such libraries at all. For instance, rustc built for the target may
    depend on a common proprietary C runtime library or console output library,
    but must not depend on a proprietary code generation library or code
    optimization library. Rust's license permits such combinations, but the
    Rust project has no interest in maintaining such combinations within the
    scope of Rust itself, even at tier 3.
    "onerous" here is an intentionally subjective term. At a minimum, "onerous"
    legal/licensing terms include but are not limited to: non-disclosure
    requirements, non-compete requirements, contributor license agreements
    (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms,
    requirements conditional on the employer or employment of any particular
    Rust developers, revocable terms, any requirements that create liability
    for the Rust project or its developers or users, or any requirements that
    adversely affect the livelihood or prospects of the Rust project or its
    developers or users.
    
    No dependencies were added to Rust.
    
    > * Neither this policy nor any decisions made regarding targets shall create any
    binding agreement or estoppel by any party. If any member of an approving
    Rust team serves as one of the maintainers of a target, or has any legal or
    employment requirement (explicit or implicit) that might affect their
    decisions regarding a target, they must recuse themselves from any approval
    decisions regarding the target's tier status, though they may otherwise
    participate in discussions.
    >    * This requirement does not prevent part or all of this policy from being
    cited in an explicit contract or work agreement (e.g. to implement or
    maintain support for a target). This requirement exists to ensure that a
    developer or team responsible for reviewing and approving a target does not
    face any legal threats or obligations that would prevent them from freely
    exercising their judgment in such approval, even if such judgment involves
    subjective matters or goes beyond the letter of these requirements.
    
    Understood.
    I am not a member of a Rust team.
    
    > * Tier 3 targets should attempt to implement as much of the standard libraries
    as possible and appropriate (core for most targets, alloc for targets
    that can support dynamic memory allocation, std for targets with an
    operating system or equivalent layer of system-provided functionality), but
    may leave some code unimplemented (either unavailable or stubbed out as
    appropriate), whether because the target makes it impossible to implement or
    challenging to implement. The authors of pull requests are not obligated to
    avoid calling any portions of the standard library on the basis of a tier 3
    target not implementing those portions.
    
    Understood.
    `std` is supported.
    
    > * The target must provide documentation for the Rust community explaining how
    to build for the target, using cross-compilation if possible. If the target
    supports running binaries, or running tests (even if they do not pass), the
    documentation must explain how to run such binaries or tests for the target,
    using emulation if possible or dedicated hardware if necessary.
    
    Building is described in the derived target doc.
    
    > * Tier 3 targets must not impose burden on the authors of pull requests, or
    other developers in the community, to maintain the target. In particular,
    do not post comments (automated or manual) on a PR that derail or suggest a
    block on the PR based on a tier 3 target. Do not send automated messages or
    notifications (via any medium, including via `@)` to a PR author or others
    involved with a PR regarding a tier 3 target, unless they have opted into
    such messages.
    >    * Backlinks such as those generated by the issue/PR tracker when linking to
    an issue or PR are not considered a violation of this policy, within
    reason. However, such messages (even on a separate repository) must not
    generate notifications to anyone involved with a PR who has not requested
    such notifications.
    
    Understood.
    
    > * Patches adding or updating tier 3 targets must not break any existing tier 2
    or tier 1 target, and must not knowingly break another tier 3 target without
    approval of either the compiler team or the maintainers of the other tier 3
    target.
    >     * In particular, this may come up when working on closely related targets,
    such as variations of the same architecture with different features. Avoid
    introducing unconditional uses of features that another variation of the
    target may not have; use conditional compilation or runtime detection, as
    appropriate, to let each target run code supported by that target.
    
    These targets are not fully ABI compatible with arm64e code.
    
    rust-lang#73628
    compiler-errors authored Nov 20, 2023
    Configuration menu
    Copy the full SHA
    9eadd36 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#115691 - jsgf:typed-json-diags, r=est31

    Add `$message_type` field to distinguish json diagnostic outputs
    
    Currently the json-formatted outputs have no way to unambiguously determine which kind of message is being output. A consumer can look for specific fields in the json object (eg "message"), but there's no guarantee that in future some other kind of output will have a field of the same name.
    
    This PR adds a `"type"` field to add json outputs which can be used to unambiguously determine which kind of output it is. The mapping is:
    
    `diagnostic`: regular compiler diagnostics
    `artifact`: artifact notifications
    `future_incompat`: Future incompatibility report
    `unused_extern`: Unused crate warnings/errors
    
    This matches the "internally tagged" representation for serde enums.
    compiler-errors authored Nov 20, 2023
    Configuration menu
    Copy the full SHA
    d6e0380 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#117828 - Nilstrieb:astconv-hashmaps, r=petr…

    …ochenkov
    
    Avoid iterating over hashmaps in astconv
    compiler-errors authored Nov 20, 2023
    Configuration menu
    Copy the full SHA
    a7eab90 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#117832 - RalfJung:interpret-shift, r=cjgillot

    interpret: simplify handling of shifts by no longer trying to handle signed and unsigned shift amounts in the same branch
    
    While we're at it, also update comments in codegen and MIR building related to shifts, and fix the overflow error printed by Miri on negative shift amounts.
    compiler-errors authored Nov 20, 2023
    Configuration menu
    Copy the full SHA
    e95c3a3 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#117891 - compiler-errors:recover-for-dyn, r…

    …=davidtwco
    
    Recover `dyn` and `impl` after `for<...>`
    
    Recover `dyn` and `impl` after `for<...>` in types. Reuses the logic for parsing bare trait objects, so it doesn't fix cases like `for<'a> dyn Trait + dyn Trait` or anything, but that seems somewhat of a different issue.
    
    Parsing recovery logic is a bit involved, but I couldn't find a way to simplify it.
    
    Fixes rust-lang#117882
    compiler-errors authored Nov 20, 2023
    Configuration menu
    Copy the full SHA
    7df7567 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#117957 - the8472:pidfd-wait, r=Mark-Simulacrum

    if available use a Child's pidfd for kill/wait
    
    This should get us closer to stabilization of pidfds since they now do something useful. And they're `CLOEXEC` now.
    
    ```
    $ strace -ffe clone,sendmsg,recvmsg,execve,kill,pidfd_open,pidfd_send_signal,waitpid,waitid ./x test std --no-doc -- pidfd
    
    [...]
    running 1 tests
    strace: Process 816007 attached
    [pid 816007] pidfd_open(816006, 0)      = 3
    [pid 816007] clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f0c6b787990) = 816008
    strace: Process 816008 attached
    [pid 816007] recvmsg(3,  <unfinished ...>
    [pid 816008] pidfd_open(816008, 0)      = 3
    [pid 816008] sendmsg(4, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="", iov_len=0}], msg_iovlen=1, msg_control=[{cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[3]}], msg_controllen=24, msg_flags=0}, 0) = 0
    [pid 816007] <... recvmsg resumed>{msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="", iov_len=0}], msg_iovlen=1, msg_control=[{cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[4]}], msg_controllen=24, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 0
    [pid 816008] execve("/usr/bin/false", ["false"], 0x7ffcf2100048 /* 105 vars */) = 0
    [pid 816007] waitid(P_PIDFD, 4,  <unfinished ...>
    [pid 816008] +++ exited with 1 +++
    [pid 816007] <... waitid resumed>{si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=816008, si_uid=1001, si_status=1, si_utime=0, si_stime=0}, WEXITED, NULL) = 0
    [pid 816007] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=816008, si_uid=1001, si_status=1, si_utime=0, si_stime=0} ---
    [pid 816007] clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLDstrace: Process 816009 attached
    , child_tidptr=0x7f0c6b787990) = 816009
    [pid 816007] recvmsg(3,  <unfinished ...>
    [pid 816009] pidfd_open(816009, 0)      = 3
    [pid 816009] sendmsg(5, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="", iov_len=0}], msg_iovlen=1, msg_control=[{cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[3]}], msg_controllen=24, msg_flags=0}, 0) = 0
    [pid 816007] <... recvmsg resumed>{msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="", iov_len=0}], msg_iovlen=1, msg_control=[{cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[5]}], msg_controllen=24, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 0
    [pid 816009] execve("/usr/bin/sleep", ["sleep", "1000"], 0x7ffcf2100048 /* 105 vars */) = 0
    [pid 816007] waitid(P_PIDFD, 5, {}, WNOHANG|WEXITED, NULL) = 0
    [pid 816007] pidfd_send_signal(5, SIGKILL, NULL, 0) = 0
    [pid 816007] waitid(P_PIDFD, 5,  <unfinished ...>
    [pid 816009] +++ killed by SIGKILL +++
    [pid 816007] <... waitid resumed>{si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=816009, si_uid=1001, si_status=SIGKILL, si_utime=0, si_stime=0}, WEXITED, NULL) = 0
    [pid 816007] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=816009, si_uid=1001, si_status=SIGKILL, si_utime=0, si_stime=0} ---
    [pid 816007] +++ exited with 0 +++
    ```
    compiler-errors authored Nov 20, 2023
    Configuration menu
    Copy the full SHA
    e97ff13 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#117994 - compiler-errors:throw-away-regions…

    …-in-coherence, r=lcnr
    
    Ignore but do not assume region obligations from unifying headers in negative coherence
    
    Partly addresses a FIXME that was added in rust-lang#112875. Just as we can throw away the nested trait/projection obligations from unifying two impl headers, we can also just throw away the region obligations too.
    
    I removed part of the FIXME that was incorrect, namely:
    > Given that the only region constraints we get are involving inference regions in the root, it shouldn't matter, but still sus.
    
    This is not true when unifying `fn(A)` and `for<'b> fn(&'b B)` which ends up with placeholder region outlives from non-root universes. I'm pretty sure this is okay, though it would be nice if we were to use them as assumptions. See the `explicit` revision of the test I committed, which still fails.
    
    Fixes rust-lang#117986
    
    r? lcnr, feel free to reassign tho.
    compiler-errors authored Nov 20, 2023
    Configuration menu
    Copy the full SHA
    848de8e View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#118068 - antoyo:subtree-update_cg_gcc_2023-…

    …11-17, r=cjgillot
    
    subtree update cg_gcc 2023/11/17
    compiler-errors authored Nov 20, 2023
    Configuration menu
    Copy the full SHA
    ad735c9 View commit details
    Browse the repository at this point in the history