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 9 pull requests #128142

Merged
merged 27 commits into from
Jul 24, 2024
Merged

Rollup of 9 pull requests #128142

merged 27 commits into from
Jul 24, 2024

Commits on Jul 2, 2024

  1. Add edge-case examples to {count,leading,trailing}_{ones,zeros} met…

    …hods
    
    Some architectures (i386) do not define a "count leading zeros" instruction,
    they define a "find first set bit" instruction (`bsf`) whose result is undefined
    when given zero (ie none of the bits are set). Of this family of bitwise
    operations, I always forget which of these things is potentially undefined for
    zero, and I'm also not 100% sure that Rust provides a hard guarantee for the
    results of these methods when given zero. So I figured there are others who have
    these same uncertainties, and it would be good to resolve them and answer the
    question via extending these doc examples/tests.
    
    See https://en.wikipedia.org/wiki/Find_first_set#Hardware_support for more info
    on i386 and `bsf` on zero.
    fitzgen committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    91af6b5 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2024

  1. Reset sigpipe not supported for vxworks

    B I Mohammed Abbas committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    6519c14 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2024

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

Commits on Jul 15, 2024

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

Commits on Jul 22, 2024

  1. Configuration menu
    Copy the full SHA
    c807ac0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5c2b36a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b30fdec View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    921de9d View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. Allow unused unsafe for vxworks in read_at and write at

    B I Mohammed Abbas committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    2561d91 View commit details
    Browse the repository at this point in the history
  2. Disable dirfd for vxworks, Return unsupported error from set_times an…

    …d lchown for vxworks
    B I Mohammed Abbas committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    a598ca0 View commit details
    Browse the repository at this point in the history
  3. Cfg disable on_broken_pipe_flag_used() for vxworks

    B I Mohammed Abbas committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    5c9f376 View commit details
    Browse the repository at this point in the history
  4. Update process vxworks, set default stack size of 256 Kib for vxworks…

    …. User can set the stack size using RUST_MIN_STACK, with min size of libc::PTHREAD_STACK_MIN(4kib)
    B I Mohammed Abbas committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    786ad3d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    23e346e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b82f878 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2024

  1. Add chroot unsupported implementation for VxWorks

    B I Mohammed Abbas committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    0ea5694 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9b87fbc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7cd25b1 View commit details
    Browse the repository at this point in the history
  4. Improve spans on evaluated cfg_attrs.

    When converting something like `#![cfg_attr(cond, attr)]` into
    `#![attr]`, we currently duplicate the `#` token and the `!` token. But
    weirdly, there is also this comment:
    
    // We don't really have a good span to use for the synthesized `[]`
    // in `#[attr]`, so just use the span of the `#` token.
    
    Maybe that comment used to be true? But now it is false: we can
    duplicate the existing delimiters (and their spans and spacing), much
    like we do for the `#` and `!`.
    
    This commit does that, thus removing the incorrect comment, and
    improving the spans on `Group`s in a few proc-macro tests.
    nnethercote committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    ac26b88 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#126152 - RalfJung:size_of_val_raw, r=saethlin

    size_of_val_raw: for length 0 this is safe to call
    
    For motivation, see rust-lang/unsafe-code-guidelines#465, specifically around [here](rust-lang/unsafe-code-guidelines#465 (comment)).
    Cc `@rust-lang/opsem`
    matthiaskrgr authored Jul 24, 2024
    Configuration menu
    Copy the full SHA
    130d15e View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#127252 - fitzgen:edge-cases-for-bitwise-ope…

    …rations, r=m-ou-se
    
    Add edge-case examples to `{count,leading,trailing}_{ones,zeros}` methods
    
    Some architectures (i386) do not define a "count leading zeros" instruction, they define a "find first set bit" instruction (`bsf`) whose result is undefined when given zero (ie none of the bits are set). Of this family of bitwise operations, I always forget which of these things is potentially undefined for zero, and I'm also not 100% sure that Rust provides a hard guarantee for the results of these methods when given zero. So I figured there are others who have these same uncertainties, and it would be good to resolve them and answer the question via extending these doc examples/tests.
    
    See https://en.wikipedia.org/wiki/Find_first_set#Hardware_support for more info on i386 and `bsf` on zero.
    matthiaskrgr authored Jul 24, 2024
    Configuration menu
    Copy the full SHA
    720c6f1 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#127374 - estebank:wrong-generic-args, r=oli…

    …-obk
    
    Tweak "wrong # of generics" suggestions
    
    Fix incorrect suggestion, make verbose and change message to make more sense when it isn't a span label.
    matthiaskrgr authored Jul 24, 2024
    Configuration menu
    Copy the full SHA
    91c03ef View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#127457 - donno2048:master, r=albertlarsan68

    Make tidy fast without compromising case alternation
    
    Fixes tidy speed issue but still catches case-alternation, enabled for other `style.rs` files, and also detects test files better.
    r? `@albertlarsan68`
    `@Nilstrieb`
    matthiaskrgr authored Jul 24, 2024
    Configuration menu
    Copy the full SHA
    122b0b2 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#127480 - biabbas:vxworks, r=workingjubilee

    Fix build failure on vxworks rust-lang#127084
    
    PR to address issue rust-lang#127084 .
    1. Skip `reset_segpipe` for vxworks
    2. Return unimplemented error for vxworks from settimes and lchown
    3. Temporarily skip dirfd for vxworks
    4. Add allow unused unsafe on read_at and write_at functions in unix/fs.rs
    5. Using cfg disable ON_BROKEN_PIPE_FLAG_USED and on_broken_pipe_flag_used() for vxworks
    6. Remove old crate::syscommon::thread::min_stack() reference from process_vxworks.rs and update to set stack size of rtpthread
    
    Thank you.
    matthiaskrgr authored Jul 24, 2024
    Configuration menu
    Copy the full SHA
    ce523d6 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#127733 - GrigorenkoPV:don't-forget, r=Amanieu

    Replace some `mem::forget`'s with `ManuallyDrop`
    
                  > but I would like to see a larger effort to replace all uses of `mem::forget`.
    
    _Originally posted by `@saethlin` in rust-lang#127584 (comment)
    
    So,
    r? `@saethlin`
    
    Sorry, I have finished writing all of this before I got your response.
    matthiaskrgr authored Jul 24, 2024
    Configuration menu
    Copy the full SHA
    34abb96 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#128120 - compiler-errors:async-fn-name, r=o…

    …li-obk
    
    Gate `AsyncFn*` under `async_closure` feature
    
    T-lang has not come to a consensus on the naming of async closure callable bounds, and as part of allowing the async closures RFC merge, we agreed to place `AsyncFn` under the same gate as `async Fn` so that these syntaxes can be evaluated in parallel.
    
    See rust-lang/rfcs#3668 (comment)
    
    r? oli-obk
    matthiaskrgr authored Jul 24, 2024
    Configuration menu
    Copy the full SHA
    e342efe View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#128131 - ChrisDenton:stuff, r=workingjubilee

    Import `c_void` rather than using the full path
    
    Follow up to rust-lang#128092. As requested, this imports `c_void` in more places. I also fixed up some imports to use `core` for core types instead of `crate`. While that is not strictly necessary, I think ideally things in `sys/pal` should only depend on itself or core so that the code is less spaghetti. We're far away from that ideal at the moment but I can at least try to slowly move in that direction.
    
    Also this forbids `unsafe_op_in_unsafe_fn` for library/std/src/sys/pal/windows by fixing up the remaining unsafe bits that are just punting their unsafe requirements onto the caller of the `unsafe` function (or definition macro).
    
    <!--
    r? workingjubilee
    -->
    matthiaskrgr authored Jul 24, 2024
    Configuration menu
    Copy the full SHA
    f3a7c3f View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#128133 - nnethercote:fix-cfg_attr-spans, r=…

    …petrochenkov
    
    Improve spans on evaluated `cfg_attr`s.
    
    When converting something like `#![cfg_attr(cond, attr)]` into `#![attr]`, we currently duplicate the `#` token and the `!` token. But weirdly, there is also this comment:
    
    // We don't really have a good span to use for the synthesized `[]`
    // in `#[attr]`, so just use the span of the `#` token.
    
    Maybe that comment used to be true? But now it is false: we can duplicate the existing delimiters (and their spans and spacing), much like we do for the `#` and `!`.
    
    This commit does that, thus removing the incorrect comment, and improving the spans on `Group`s in a few proc-macro tests.
    
    `@petrochenkov`
    matthiaskrgr authored Jul 24, 2024
    Configuration menu
    Copy the full SHA
    2dc88bf View commit details
    Browse the repository at this point in the history