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

Closed
wants to merge 29 commits into from

Commits on Jan 23, 2024

  1. compiletest: reduce useless regex rebuilds

    before:
    
    ==8812== Total:     2,374,977,159 bytes in 6,840,026 blocks
    ==8812== At t-gmax: 8,090,486 bytes in 3,389 blocks
    ==8812== At t-end:  3,185,454 bytes in 757 blocks
    ==8812== Reads:     1,873,472,286 bytes
    ==8812== Writes:    1,249,411,589 bytes
    
    ==11212== I   refs:      6,370,244,180
    
    after:
    
    ==18725== Total:     429,769,246 bytes in 957,259 blocks
    ==18725== At t-gmax: 8,058,316 bytes in 3,502 blocks
    ==18725== At t-end:  3,045,261 bytes in 1,097 blocks
    ==18725== Reads:     431,872,599 bytes
    ==18725== Writes:    214,738,653 bytes
    
    ==20839== I   refs:      1,873,010,089
    klensy committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    ad6432c View commit details
    Browse the repository at this point in the history
  2. reduce bufreader size from default(8kb) to 1kb

    Headers WAY less than 1kb anyway, so this can be improved more?
    
    before
    
    ==18725== Total:     429,769,246 bytes in 957,259 blocks
    ==18725== At t-gmax: 8,058,316 bytes in 3,502 blocks
    ==18725== At t-end:  3,045,261 bytes in 1,097 blocks
    ==18725== Reads:     431,872,599 bytes
    ==18725== Writes:    214,738,653 bytes
    
    after
    
    ==49344== Total:     201,418,575 bytes in 957,174 blocks
    ==49344== At t-gmax: 7,937,250 bytes in 3,310 blocks
    ==49344== At t-end:  3,035,637 bytes in 1,076 blocks
    ==49344== Reads:     431,607,448 bytes
    ==49344== Writes:    210,731,540 bytes
    klensy committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    e78d685 View commit details
    Browse the repository at this point in the history
  3. don't collect found paths into BTreeSet:

    keeping order of inserted Paths having high cost on hot path, collect into HashSet instead and sort afterward.
    
    from 1,858,963,938 to 1,448,975,825 I refs.
    klensy committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    0710ebb View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

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

Commits on Feb 10, 2024

  1. Implement Instant for UEFI

    - Uses Timestamp Protocol if present. Else use rdtsc for x86 and x86-64
    
    Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
    Ayush1325 committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    1793bc9 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2024

  1. Configuration menu
    Copy the full SHA
    4a2939b View commit details
    Browse the repository at this point in the history
  2. Implement sys/thread for UEFI

    Since UEFI has no concept of threads, most of this module can be
    ignored. However, implementing parts that make sense.
    
    - Implement sleep
    - Implement available_parallelism
    
    Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
    Ayush1325 committed Feb 11, 2024
    Configuration menu
    Copy the full SHA
    af428db View commit details
    Browse the repository at this point in the history
  3. is_closure_like

    compiler-errors committed Feb 11, 2024
    Configuration menu
    Copy the full SHA
    cb024ba View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8781637 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. Dejargnonize subst

    ShoyuVanilla committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    3856df0 View commit details
    Browse the repository at this point in the history
  2. Fix failing test

    ShoyuVanilla committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    db8cb76 View commit details
    Browse the repository at this point in the history
  3. Fix failing test

    ShoyuVanilla authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    8959434 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    83a850f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a313ffb View commit details
    Browse the repository at this point in the history
  6. Update books

    rustbot committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    cdea33a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    915200f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6a8f50e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    746bb7e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e08c9d1 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#118983 - Urgau:invalid_ref_casting-bigger-l…

    …ayout, r=oli-obk
    
    Warn on references casting to bigger memory layout
    
    This PR extends the [`invalid_reference_casting`](https://doc.rust-lang.org/rustc/lints/listing/deny-by-default.html#invalid-reference-casting) lint (*deny-by-default*) which currently lint on `&T -> &mut T` casting to also lint on `&(mut) A -> &(mut) B` where `size_of::<B>() > size_of::<A>()` (bigger memory layout requirement).
    
    The goal is to detect such cases:
    
    ```rust
    let u8_ref: &u8 = &0u8;
    let u64_ref: &u64 = unsafe { &*(u8_ref as *const u8 as *const u64) };
    //~^ ERROR casting references to a bigger memory layout is undefined behavior
    
    let mat3 = Mat3 { a: Vec3(0i32, 0, 0), b: Vec3(0, 0, 0), c: Vec3(0, 0, 0) };
    let mat3 = unsafe { &*(&mat3 as *const _ as *const [[i64; 3]; 3]) };
    //~^ ERROR casting references to a bigger memory layout is undefined behavior
    ```
    
    This is added to help people who write unsafe code, especially when people have matrix struct that they cast to simple array of arrays.
    
    EDIT: One caveat, due to the [`&Header`](rust-lang/unsafe-code-guidelines#256) uncertainty the lint only fires when it can find the underline allocation.
    
    ~~I have manually tested all the new expressions that warn against Miri, and they all report immediate UB.~~
    
    r? `@est31`
    matthiaskrgr authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    cb5273e View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#119451 - Kobzol:ci-pr-clippy, r=Mark-Simula…

    …crum
    
    Gate PR CI on clippy correctness lints
    
    Implements part of rust-lang/compiler-team#709.
    
    Note that `x.py clippy compiler` also checks the standard library, because it needs to be checked before the compiler. This happens even with `x.py clippy --stage 0`.
    matthiaskrgr authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    8a5dd5b View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#120273 - klensy:ct-run, r=onur-ozkan

    compiletest: few naive improvements
    
    Tested on `python x.py --stage=1 t tests/ui/borrowck/ --force-rerun`, see individual commits.
    
    Wall time didn't improved :-) .
    matthiaskrgr authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    0db240d View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#120889 - Ayush1325:uefi-instant, r=joshtrip…

    …lett
    
    Implement Instant for UEFI
    
    - Uses Timestamp Protocol if present. Else use rdtsc for x86 and x86-64
    matthiaskrgr authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    5cd9755 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#120938 - Ayush1325:uefi-thread, r=joboet,Ni…

    …lstrieb
    
    Implement sys/thread for UEFI
    
    Since UEFI has no concept of threads, most of this module can be ignored. However, implementing parts that make sense.
    
    - Implement sleep
    - Implement available_parallelism
    matthiaskrgr authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    7811a82 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#120950 - compiler-errors:miri-async-closurs…

    …, r=RalfJung,oli-obk
    
    Fix async closures in CTFE
    
    First commit renames `is_coroutine_or_closure` into `is_closure_like`, because `is_coroutine_or_closure_or_coroutine_closure` seems confusing and long.
    
    Second commit fixes some forgotten cases where we want to handle `TyKind::CoroutineClosure` the same as closures and coroutines.
    
    The test exercises the change to `ValidityVisitor::aggregate_field_path_elem` which is the source of rust-lang#120946, but not the change to `UsedParamsNeedSubstVisitor`, though I feel like it's not that big of a deal. Let me know if you'd like for me to look into constructing a test for the latter, though I have no idea what it'd look like (we can't assert against `TooGeneric` anywhere?).
    
    Fixes rust-lang#120946
    
    r? oli-obk cc `@RalfJung`
    matthiaskrgr authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    ba8e792 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#120958 - ShoyuVanilla:remove-subst, r=oli-obk

    Dejargonize `subst`
    
    In favor of rust-lang#110793, replace almost every occurence of `subst` and `substitution` from rustc codes, but they still remains in subtrees under `src/tools/` like clippy and test codes (I'd like to replace them after this)
    matthiaskrgr authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    5d11672 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#120965 - ChrisDenton:sahf, r=michaelwoerister

    Add lahfsahf and prfchw target feature
    
    This adds target features for LAHF/SAHF and PrefetchW. These came up. along with the existing CMPXCHG16b. as [baseline features](https://download.microsoft.com/download/c/1/5/c150e1ca-4a55-4a7e-94c5-bfc8c2e785c5/Windows%2010%20Minimum%20Hardware%20Requirements.pdf) required for x86_64 Windows 10+.
    matthiaskrgr authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    7fb94de View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#120970 - RalfJung:static-promoted-test, r=o…

    …li-obk
    
    add another test for promoteds-in-static
    
    rust-lang#119614 led to validation of promoteds recursing into statics. These statics can point to `static mut` and interior mutable `static` and do other things we don't allow in `const`, but promoteds are validated as `const`, so we get strange errors (saying "in `const`" when there is no const) and surprising validation failures.
    
    rust-lang#120960 fixes that; this here adds another test.
    
    r? `@oli-obk`
    Fixes rust-lang#120968
    matthiaskrgr authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    338a844 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#120979 - rustbot:docs-update, r=ehuss

    Update books
    
    ## rust-lang/edition-guide
    
    1 commits in baafacc6d8701269dab1e1e333f3547fb54b5a59..76bd48a273a0e0413a3bf22c699112d41497b99e
    2024-02-10 20:50:34 UTC to 2024-02-10 20:50:34 UTC
    
    - Set up scaffolding for 2024 (rust-lang/edition-guide#288)
    
    ## rust-lang/reference
    
    4 commits in a0b119535e7740f68494c4f0582f7ad008b00ccd..8227666de13f6e7bb32dea9dc42e841adb5ce4b7
    2024-02-12 03:04:15 UTC to 2024-01-30 20:10:53 UTC
    
    - Fix a typo in external-blocks.md (rust-lang/reference#1467)
    - Fix syntax in `'static lifetime elision` section of `lifetime-elision.md` (rust-lang/reference#1463)
    - Fix markdown backslash for FLOAT_LITERAL (rust-lang/reference#1464)
    - C string literal expressions (rust-lang/reference#1457)
    
    ## rust-lang/rust-by-example
    
    5 commits in 179256a445d6144f5f371fdefb993f48f33978b0..e188d5d466f7f3ff9f1d518393235f4fe951be46
    2024-02-07 17:16:00 UTC to 2024-01-31 17:34:10 UTC
    
    - Update macros.md (rust-lang/rust-by-example#1815)
    - Update borrow.md (rust-lang/rust-by-example#1814)
    - Fixes the bug: rust-lang/rust-by-example#1721 (rust-lang/rust-by-example#1811)
    - std_misc/process/pipe.md: Fix typo in pangram string (rust-lang/rust-by-example#1809)
    - Add expected error behavior into docs (rust-lang/rust-by-example#1810)
    
    ## rust-lang/rustc-dev-guide
    
    9 commits in ec287e332777627185be4798ad22599ffe7b84aa..1f30cc7cca9a3433bc1872abdc98960b36c21ca0
    2024-02-11 05:36:15 UTC to 2024-01-29 19:49:51 UTC
    
    - fix sentence (rust-lang/rustc-dev-guide#1882)
    - Some updates for recent diagnostics changes. (rust-lang/rustc-dev-guide#1883)
    - Rename occurrences of 'delay_span_bug' to 'span_delayed_bug' (rust-lang/rustc-dev-guide#1881)
    - Update for upcoming markdown changes. (rust-lang/rustc-dev-guide#1880)
    - Update uses of renamed BoxMeUp to PanicPayload (rust-lang/rustc-dev-guide#1878)
    - Add links for arena and interning. (rust-lang/rustc-dev-guide#1868)
    - Improving macro expansion section (rust-lang/rustc-dev-guide#1875)
    - Replace letters by foo, bar and buz in lexing example (rust-lang/rustc-dev-guide#1870)
    - Fix some broken links (rust-lang/rustc-dev-guide#1877)
    matthiaskrgr authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    8066015 View commit details
    Browse the repository at this point in the history