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 13 pull requests #122131

Closed
wants to merge 42 commits into from

Commits on Jul 24, 2023

  1. compiler: allow transmute of ZST arrays with generics

    Extend the `SizeSkeleton` evaluator to shortcut zero-sized arrays, thus
    considering `[T; 0]` to have a compile-time fixed-size of 0.
    
    The existing evaluator already deals with generic arrays under the
    feature-guard `transmute_const_generics`. However, it merely allows
    comparing fixed-size types with fixed-size types, and generic types with
    generic types. For generic types, it merely compares whether their
    arguments match (ordering them first). Even if their exact sizes are not
    known at compile time, it can ensure that they will eventually be the
    same.
    
    This patch extends this by shortcutting the size-evaluation of zero
    sized arrays and thus allowing size comparisons of `()` with `[T; 0]`,
    where one contains generics and the other does not.
    
    This code is guarded by `transmute_const_generics` (rust-lang#109929), even
    though it is unclear whether it should be. However, this assumes that a
    separate stabilization PR is required to move this out of the feature
    guard.
    
    Initially reported in rust-lang#98104.
    dvdhrm committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    14be58a View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2023

  1. Configuration menu
    Copy the full SHA
    547f3ce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6e9ca48 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

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

Commits on Feb 15, 2024

  1. Configuration menu
    Copy the full SHA
    5441523 View commit details
    Browse the repository at this point in the history
  2. Update library/std/src/fs.rs

    Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
    haydonryan and m-ou-se committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    9539feb View commit details
    Browse the repository at this point in the history
  3. Update library/std/src/fs.rs

    Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
    haydonryan and m-ou-se committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    b5e1ca3 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2024

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

Commits on Mar 1, 2024

  1. Configuration menu
    Copy the full SHA
    f27a22c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    78fb977 View commit details
    Browse the repository at this point in the history
  3. Move capacity_overflow function to make ui tests change less

    Code changes in raw_vec require blessing UI tests every time
    kornelski committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    784e6a1 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. Bubble up the TyCtxtFeed

    oli-obk committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    2149c45 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    31d0a64 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3b9dfd3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    30f2ec2 View commit details
    Browse the repository at this point in the history
  5. Get rid of feed_local_def_id

    oli-obk committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    5a0c46a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    890dd58 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3845be6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c696d4c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ef00fae View commit details
    Browse the repository at this point in the history
  10. Implement MaybeUninit::fill{,_with,_from}

    ACP: rust-lang/libs-team#156
    
    Signed-off-by: Andrew Wock <ajwock@gmail.com>
    ajwock committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    0a00749 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2024

  1. Add missing background color for top-level rust documentation page an…

    …d increase contrast by setting text color to black
    GuillaumeGomez committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    b69607c View commit details
    Browse the repository at this point in the history
  2. Dynamically size sigaltstk in std

    On modern Linux with Intel AMX and 1KiB matrices,
    Arm SVE with potentially 2KiB vectors,
    and RISCV Vectors with up to 16KiB vectors,
    we must handle dynamic signal stack sizes.
    
    We can do so unconditionally by using getauxval,
    but assuming it may return 0 as an answer,
    thus falling back to the old constant if needed.
    workingjubilee committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    9da004e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8e45d0f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ee1c691 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9891d6a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    52bc7ce View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. Configuration menu
    Copy the full SHA
    bf9782d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1a2bc11 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#113525 - workingjubilee:handle-dynamic-mins…

    …igstksz, r=m-ou-se
    
    Dynamically size sigaltstk in std
    
    On modern Linux with Intel AMX and 1KiB matrices,
    Arm SVE with potentially 2KiB vectors,
    and RISCV Vectors with up to 16KiB vectors,
    we must handle dynamic signal stack sizes.
    
    We can do so unconditionally by using getauxval,
    but assuming it may return 0 as an answer,
    thus falling back to the old constant if needed.
    
    Fixes rust-lang#107795
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    07afa65 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#114009 - dvdhrm:pr/transmzst, r=pnkfelix

    compiler: allow transmute of ZST arrays with generics
    
    Extend the `SizeSkeleton` evaluator to shortcut zero-sized arrays, thus considering `[T; 0]` to have a compile-time fixed-size of 0.
    
    The existing evaluator already deals with generic arrays under the feature-guard `transmute_const_generics`. However, it merely allows comparing fixed-size types with fixed-size types, and generic types with generic types. For generic types, it merely compares whether their arguments match (ordering them first). Even if their exact sizes are not known at compile time, it can ensure that they will eventually be the same.
    
    This patch extends this by shortcutting the size-evaluation of zero sized arrays and thus allowing size comparisons of `()` with `[T; 0]`, where one contains generics and the other does not.
    
    This code is guarded by `transmute_const_generics` (rust-lang#109929), even though it is unclear whether it should be. However, this assumes that a separate stabilization PR is required to move this out of the feature guard.
    
    Initially reported in rust-lang#98104.
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    0cd0ad6 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#116793 - WaffleLapkin:target_rules_the_back…

    …end, r=cjgillot
    
    Allow targets to override default codegen backend
    
    Implements rust-lang/compiler-team#670.
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    9ed2a53 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#118623 - haydonryan:master, r=workingjubilee

    Improve std::fs::read_to_string example
    
    Resolves  [rust-lang#118621](rust-lang#118621)
    
    For the original code to succeed it requires address.txt to contain a socketaddress, however it is much easier to follow if this is just any strong - eg address could be a street address or just text.
    
    Also changed the variable name from "foo" to something more meaningful as cargo clippy warns you against using foo as a placeholder.
    
    ```
    $ cat main.rs
    use std::fs;
    use std::error::Error;
    
    fn main() -> Result<(), Box<dyn Error>> {
        let addr: String = fs::read_to_string("address.txt")?.parse()?;
        println!("{}", addr);
        Ok(())
    }
    
    $ cat address.txt
    123 rusty lane
    san francisco 94999
    
    $ cargo run
        Finished dev [unoptimized + debuginfo] target(s) in 0.00s
         Running `/home/haydon/workspace/rust-test-pr/tester/target/debug/tester`
    123 rusty lane
    san francisco 94999
    
    ```
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    06f20f6 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#120504 - kornelski:try_with_capacity, r=Ama…

    …nieu
    
    Vec::try_with_capacity
    
    Related to rust-lang#91913
    
    Implements try_with_capacity for `Vec`, `VecDeque`, and `String`. I can follow it up with more collections if desired.
    
    `Vec::try_with_capacity()` is functionally equivalent to the current stable:
    
    ```rust
    let mut v = Vec::new();
    v.try_reserve_exact(n)?
    ```
    
    However, `try_reserve` calls non-inlined `finish_grow`, which requires old and new `Layout`, and is designed to reallocate memory. There is benefit to using `try_with_capacity`, besides syntax convenience, because it generates much smaller code at the call site with a direct call to the allocator. There's codegen test included.
    
    It's also a very desirable functionality for users of `no_global_oom_handling` (Rust-for-Linux), since it makes a very commonly used function available in that environment (`with_capacity` is used much more frequently than all `(try_)reserve(_exact)`).
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    8d31644 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#121089 - oli-obk:create_def_feed, r=petroch…

    …enkov
    
    Remove `feed_local_def_id`
    
    best reviewed commit by commit
    
    Basically I returned `TyCtxtFeed` from `create_def` and then preserved that in the local caches
    
    based on rust-lang#121084
    
    r? ```@petrochenkov```
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    5171011 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#121280 - ajwock:maybeuninit_fill, r=Amanieu

    Implement MaybeUninit::fill{,_with,_from}
    
    ACP: rust-lang/libs-team#156
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    ef8b1df View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#122087 - GuillaumeGomez:fix-rust-index-page…

    …, r=notriddle
    
    Add missing background color for top-level rust documentation page and increase contrast by setting text color to black
    
    Fixes rust-lang#121954.
    
    r? `@notriddle`
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    3e865a9 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#122104 - RalfJung:rust, r=ChrisDenton

    Rust is a proper name: rust → Rust
    
    I only went over the library where it might be user-visible -- I noticed this in the `time` docs.
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    440c35a View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#122110 - WaffleLapkin:miri-temp, r=RalfJung

    Make `x t miri` respect `MIRI_TEMP`
    
    (I don't want to override `TMPDIR`, as that might affect other things)
    
    r? `@RalfJung`
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    c6dfdc7 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#122114 - saethlin:cant-find-crate-spam, r=W…

    …affleLapkin
    
    Make not finding core a fatal error
    
    Similar to rust-lang#120472, this prevents terminal spam. In particular, it makes the good diagnostic visible when you try to use a target that's not installed.
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    a88c35d View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#122115 - clubby789:cancel-recoverr, r=compi…

    …ler-errors
    
    Cancel parsing ever made during recovery
    
    Fixes rust-lang#122112
    
    It would be nice if diagnostics from recovery were automatically cancelled... 🤔
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    3a4b2c1 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#122126 - workingjubilee:every-os-in-the-wor…

    …ld-belongs-to-unix, r=ChrisDenton
    
    Fix `tidy --bless` on  ̶X̶e̶n̶i̶x̶ Windows
    
    As reported in rust-lang#120628 (comment) the requested `tidy --bless` implementation didn't take into account the fact that earlier the linting code canonicalized things to use the OS path separator. This makes it so that the path separator is always rewritten back as '/', which should fix the variance there.
    
    r? `@ChrisDenton`
    workingjubilee committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    c22cf59 View commit details
    Browse the repository at this point in the history