about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-07-17Ignore files in cg_gcc example folderGuillaume Gomez-0/+1
2024-07-17Align cg_gcc rustfmt.toml with rust'sGuillaume Gomez-0/+2
2024-07-17Unignore cg_gcc fmtGuillaume Gomez-1/+3
2024-07-17Auto merge of #127851 - tgross35:rollup-i39um74, r=tgross35bors-97/+121
Rollup of 4 pull requests Successful merges: - #127763 (Make more Windows functions `#![deny(unsafe_op_in_unsafe_fn)]`) - #127813 (Prevent double reference in generic futex) - #127847 (Reviewer on vacation) - #127850 (bootstrap: open `llvm-config` as r+w) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-17Auto merge of #127602 - onur-ozkan:calling-order, r=Kobzolbors-1/+33
maintain the given order on step execution Previously step execution disregarded the CLI order and this change executes the given steps in the order specified on CLI. For example, running `x $kind a b c` will execute `$kind` step for `a`, then `b`, then `c` crates in the specified order. Fixes #126165 cc `@matthiaskrgr`
2024-07-17maintain the given order on step executiononur-ozkan-1/+33
Previously step execution disregarded the CLI order and this change executes the given steps in the order specified on CLI. For example, running `x $kind a b c` will execute `$kind` step for `a`, then `b`, then `c` crates in the specified order. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-07-17Rollup merge of #127850 - jieyouxu:bootstrap-llvm-config, r=onur-ozkanTrevor Gross-1/+1
bootstrap: open `llvm-config` as r+w This previously failed on Windows and prevented building on Windows for compiler stuff because the `llvm-config` file was open as read-only. Tested locally on a Windows machine. Fixes #127849.
2024-07-17Rollup merge of #127847 - ChrisDenton:vacation, r=jhprattTrevor Gross-1/+1
Reviewer on vacation ``@jhpratt`` asked to be set as on vacation
2024-07-17Rollup merge of #127813 - ChrisDenton:win-futex, r=joboetTrevor Gross-5/+8
Prevent double reference in generic futex In the Windows futex implementation we were a little lax at allowing references to references (i.e. `&&`) which can lead to deadlocks due to reading the wrong memory address. This uses a trait to tighten the constraints and ensure this doesn't happen. r? libs
2024-07-17Rollup merge of #127763 - ChrisDenton:safe-unsafe-unsafe, r=tgross35Trevor Gross-90/+111
Make more Windows functions `#![deny(unsafe_op_in_unsafe_fn)]` As part of #127747, I've evaluated some more Windows functions and added `unsafe` blocks where necessary. Some are just trivial wrappers that "inherit" the full unsafety of their function, but for others I've added some safety comments. A few functions weren't actually unsafe at all. I think they were just using `unsafe fn` to avoid an `unsafe {}` block. I'm not touching `c.rs` yet because that is partially being addressed by another PR and also I have plans to further reduce the number of wrapper functions we have in there. r? libs
2024-07-17bootstrap: open llvm_config as r+w许杰友 Jieyou Xu (Joe)-1/+1
This previously failed on Windows because the `llvm_config` file was open as read-only.
2024-07-17jhpratt on vacationChris Denton-1/+1
2024-07-17Prevent double reference in generic futexChris Denton-5/+8
2024-07-17Auto merge of #127838 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 31 commits in 154fdac39ae9629954e19e9986fd2cf2cdd8d964..a2b58c3dad4d554ba01ed6c45c41ff85390560f2 2024-07-07 01:28:23 +0000 to 2024-07-16 00:52:02 +0000 - chore(ci): bump CI tools (rust-lang/cargo#14257) - test: migrate fetch and list_availables to snapbox (rust-lang/cargo#14214) - chore: downgrade to jobserver@0.1.28 (rust-lang/cargo#14254) - perf(source): Don't `du` on every git source load (rust-lang/cargo#14252) - fix(source): Don't warn about unreferenced duplicate packages (rust-lang/cargo#14239) - feat(test): Add cargo_test to test-support prelude (rust-lang/cargo#14243) - Add workflow to publish Cargo automatically (rust-lang/cargo#14202) - test: migrate implicit_features to snapbox (rust-lang/cargo#14245) - test: migrate build-std/main to snapbox (rust-lang/cargo#14241) - test: migrate check_cfg to snapbox (rust-lang/cargo#14235) - refactor(source): More RecursivePathSource clean up (rust-lang/cargo#14231) - Add more profiling traces (rust-lang/cargo#14238) - fix(overrides): Don't warn on duplicate packages from using '..' (rust-lang/cargo#14234) - fix(test): Redact elapsed time in the minutes time frame (rust-lang/cargo#14233) - test: Migrate lto tests to snapbox (rust-lang/cargo#14209) - fix: Ensure dep/feature activates the dependency on 2024 (rust-lang/cargo#14221) - chore(docs): update index of reference (rust-lang/cargo#14228) - test: migrate test to snapbox (rust-lang/cargo#14226) - chore: remove duplicate words (rust-lang/cargo#14229) - docs(contrib): Document things I look for in RFCs (rust-lang/cargo#14222) - docs(ref): Note MSRV for features in the docs (rust-lang/cargo#14224) - test(progress): Resolve flakiness (rust-lang/cargo#14223) - fix(test): Reduce over-prescription to the caller (rust-lang/cargo#14217) - refactor: move get_source_id out of registry (rust-lang/cargo#14218) - fix: rename to `rustdoc::broken_intra_doc_links` (rust-lang/cargo#14215) - test: migrate member_errors, multitarget and new to snapbox (rust-lang/cargo#14210) - test: migrate generate_lockfile and glob_targets to snapbox (rust-lang/cargo#14200) - test: Ensure --list test works with cargo-bloat (rust-lang/cargo#14213) - dont make new constant InternedString in hot path (rust-lang/cargo#14211) - Fix compatible_with_older_cargo test. (rust-lang/cargo#14212) - test: migrate metabuild, metadata and net_config to snapbox (rust-lang/cargo#14162)
2024-07-17Narrow the scope of the ReadFile unsafe blockChris Denton-11/+12
2024-07-17forbid(unsafe_op_in_unsafe_fn) in sys/os_strChris Denton-2/+2
2024-07-17Auto merge of #127840 - tgross35:rollup-jfkg1dq, r=tgross35bors-98/+127
Rollup of 9 pull requests Successful merges: - #125206 (Simplify environment variable examples) - #126271 (Skip fast path for dec2flt when optimize_for_size) - #126776 (Clean up more comments near use declarations) - #127444 (`impl Send + Sync` and override `count` for the `CStr::bytes` iterator) - #127512 (Terminate `--print link-args` output with newline) - #127792 (std: Use `read_unaligned` for reads from DWARF) - #127807 (Use futex.rs for Windows thread parking) - #127833 (zkvm: add `#[forbid(unsafe_op_in_unsafe_fn)]` in `stdlib`) - #127836 (std: Forbid unwrapped unsafe ops in xous and uefi modules) Failed merges: - #127813 (Prevent double reference in generic futex) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-16Rollup merge of #127836 - workingjubilee:forbid-unsafe-ops-in-xous-uefi, ↵Trevor Gross-1/+4
r=tgross35 std: Forbid unwrapped unsafe ops in xous and uefi modules
2024-07-16Rollup merge of #127833 - risc0:erik/zkvm-deny-unsafe, r=workingjubileeTrevor Gross-1/+2
zkvm: add `#[forbid(unsafe_op_in_unsafe_fn)]` in `stdlib` This also adds an additional `unsafe` block to address compiler errors. This PR is intended to address https://github.com/rust-lang/rust/issues/127747 for the zkvm target.
2024-07-16Rollup merge of #127807 - ChrisDenton:win-parking, r=joboetTrevor Gross-26/+39
Use futex.rs for Windows thread parking If I'm not overlooking anything then the Windows 10+ thread parking implementation is practically the same as the futex.rs implementation. So we may as well use the same implementation for both. The old version is still kept around for Windows 7 support. r? ````@joboet```` if you wouldn't mind double checking I've not missed something
2024-07-16Rollup merge of #127792 - workingjubilee:read-unaligned-is-dwarfier, r=joboetTrevor Gross-14/+12
std: Use `read_unaligned` for reads from DWARF There's a lot of... *stuff* going on here. Meanwhile, `read_unaligned` has been available since 1.17.0, so let's just use that.
2024-07-16Rollup merge of #127512 - eggyal:newline-terminate-print-linkargs, ↵Trevor Gross-1/+2
r=compiler-errors Terminate `--print link-args` output with newline Fixes #127507
2024-07-16Rollup merge of #127444 - Sky9x:cstr-bytes-iter, r=dtolnayTrevor Gross-2/+15
`impl Send + Sync` and override `count` for the `CStr::bytes` iterator cc tracking issue #112115
2024-07-16Rollup merge of #126776 - nnethercote:rustfmt-use-pre-cleanups-2, r=cuviperTrevor Gross-41/+45
Clean up more comments near use declarations #125443 will reformat all use declarations in the repository. There are a few edge cases involving comments on use declarations that require care. This PR fixes them up so #125443 can go ahead with a simple `x fmt --all`. A follow-up to #126717. r? ``@cuviper``
2024-07-16Rollup merge of #126271 - diondokter:dec2flt-skip-fast-path, r=tgross35Trevor Gross-2/+4
Skip fast path for dec2flt when optimize_for_size Tracking issue: https://github.com/rust-lang/rust/issues/125612 Skip the fast algorithm when optimizing for size. When compiling for https://github.com/quartiq/stabilizer I get these numbers: Before ``` text data bss dec hex filename 192192 8 49424 241624 3afd8 dual-iir ``` After ``` text data bss dec hex filename 191632 8 49424 241064 3ada8 dual-iir ``` This saves 560 bytes.
2024-07-16Rollup merge of #125206 - mgeisler:simplify-std-env-vars, r=jhpratt,tgross35Trevor Gross-10/+4
Simplify environment variable examples I’ve found myself visiting the documentation for `std::env::vars` every few months, and every time I do, it is because I want to quickly get a snippet to print out all environment variables :-) So I think it could be nice to simplify the examples a little to make them self-contained. It is of course a style question if one should import a module a not, but I personally don’t import modules used just once in a code snippet.
2024-07-17Auto merge of #126208 - Oneirical:one-flew-over-the-cuckoo's-test, r=jieyouxubors-91/+206
Migrate `compiler-lookup-paths`, `dump-mono-stats` and `prune-link-args` `run-make` tests to `rmake` or `ui` format Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). try-job: x86_64-msvc try-job: aarch64-apple try-job: dist-x86_64-linux try-job: armhf-gnu
2024-07-16Update cargoWeihang Lo-0/+0
2024-07-16uefi: Forbid unwrapped unsafe in platform modulesJubilee Young-0/+2
2024-07-17Cfg nitDion Dokter-1/+1
Co-authored-by: Clar Fon <15850505+clarfonthey@users.noreply.github.com>
2024-07-16xous: Forbid unwrapped unsafe in platform modulesJubilee Young-1/+2
2024-07-16zkvm: add `#[forbid(unsafe_op_in_unsafe_fn)]` in `stdlib`Erik Kaneda-1/+2
This also adds an additional `unsafe` block to address compiler errors.
2024-07-17Adjust some comments on individual `use` declarations.Nicholas Nethercote-2/+1
When we do the big `use` reformatting there are a tiny number of cases where rustfmt moves a comment from one `use` item to another in an undesirable way. This commit pre-emptively rearranges things to prevent this from happening.
2024-07-17Avoid comments that describe multiple `use` items.Nicholas Nethercote-35/+43
There are some comments describing multiple subsequent `use` items. When the big `use` reformatting happens some of these `use` items will be reordered, possibly moving them away from the comment. With this additional level of formatting it's not really feasible to have comments of this type. This commit removes them in various ways: - merging separate `use` items when appropriate; - inserting blank lines between the comment and the first `use` item; - outright deletion (for comments that are relatively low-value); - adding a separate "top-level" comment. We also entirely skip formatting for four library files that contain nothing but `pub use` re-exports, where reordering would be painful.
2024-07-17Merge some `core::iter` entries.Nicholas Nethercote-4/+1
2024-07-16Auto merge of #127831 - tgross35:rollup-c0j9n7b, r=tgross35bors-338/+1429
Rollup of 7 pull requests Successful merges: - #124033 (Sync ar_archive_writer to LLVM 18.1.3) - #126699 (Delegation: support coercion for target expression) - #126762 (Deny keyword lifetimes pre-expansion) - #126967 (Promote the `wasm32-wasip2` target to Tier 2) - #127390 (Migrate `raw-dylib-inline-cross-dylib` and `raw-dylib-custom-dlltool` `run-make` tests to rmake) - #127501 (Invert infer `error_reporting` mod struture) - #127816 (Update method name to reflect changes to its internals) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-16Rollup merge of #127816 - oli-obk:misnomer, r=compiler-errorsTrevor Gross-3/+3
Update method name to reflect changes to its internals forgot to do this in https://github.com/rust-lang/rust/pull/127431
2024-07-16Rollup merge of #127501 - compiler-errors:invert-infer-error-mod-struture, ↵Trevor Gross-87/+508
r=lcnr Invert infer `error_reporting` mod struture Parallel change to #127493, which moves `rustc_infer::infer::error_reporting` to `rustc_infer::error_reporting::infer`. After this, we should just be able to merge this into `rustc_trait_selection::error_reporting::infer`, and pull down `TypeErrCtxt` into that crate. 👍 r? lcnr
2024-07-16Rollup merge of #127390 - Oneirical:rough-testimation, r=jieyouxuTrevor Gross-44/+86
Migrate `raw-dylib-inline-cross-dylib` and `raw-dylib-custom-dlltool` `run-make` tests to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Please try: try-job: i686-mingw
2024-07-16Rollup merge of #126967 - alexcrichton:wasm32-wasip2-tier-2, r=Mark-SimulacrumTrevor Gross-3/+264
Promote the `wasm32-wasip2` target to Tier 2 This commit promotes the `wasm32-wasip2` Rust target to tier 2 as proposed in rust-lang/compiler-team#760. There are two major changes in this PR: 1. The `dist-various-2` container, which already produces the other WASI targets, now has an extra target added for `wasm32-wasip2`. 2. A new `wasm-component-ld` binary is added to all host toolchains when LLD is enabled. This is the linker used for the `wasm32-wasip2` target. This new linker is added for all host toolchains to ensure that all host toolchains can produce the `wasm32-wasip2` target. This is similar to how `rust-lld` was originally included for all host toolchains to be able to produce WebAssembly output when the targets were first added. The new linker is developed [here][wasm-component-ld] and is pulled in via a crates.io-based dependency to the tree here. [wasm-component-ld]: https://github.com/bytecodealliance/wasm-component-ld
2024-07-16Rollup merge of #126762 - compiler-errors:kw-lt, r=michaelwoeristerTrevor Gross-70/+99
Deny keyword lifetimes pre-expansion https://github.com/rust-lang/rust/pull/126452#issuecomment-2179464266 > Secondly, we confirmed that we're OK with moving the validation of keywords in lifetimes to pre-expansion from post-expansion. We similarly consider this a bug fix. While the breakage of the convenience feature of the with_locals crate that relies on this is unfortunate, and we wish we had not overlooked this earlier for that reason, we're fortunate that the breakage is contained to only one crate, and we're going to accept this breakage as the extra complexity we'd need to carry in the compiler to work around this isn't deemed worth it. T-lang considers it to be a bugfix to deny `'keyword` lifetimes in the parser, rather than during AST validation that only happens post-expansion. This has one breakage: https://github.com/rust-lang/rust/pull/126452#issuecomment-2171654756 This probably should get lang FCP'd just for consistency.
2024-07-16Rollup merge of #126699 - Bryanskiy:delegation-coercion, r=compiler-errorsTrevor Gross-37/+264
Delegation: support coercion for target expression (solves https://github.com/rust-lang/rust/issues/118212#issuecomment-2160723092) The implementation consist of 2 parts. Firstly, method call is generated instead of fully qualified call in AST->HIR lowering if there were no generic arguments or `Qpath` were provided. These restrictions are imposed due to the loss of information after desugaring. For example in ```rust trait Trait { fn foo(&self) {} } reuse <u8 as Trait>::foo; ``` We would like to generate such a code: ```rust fn foo<u8: Trait>(x: &u8) { x.foo(x) } ``` however, the signature is inherited during HIR analysis where `u8` was discarded. Then, we probe the single pre-resolved method. P.S In the future, we would like to avoid restrictions on the callee path by `Self` autoref/autoderef in fully qualified calls, but at the moment it didn't work out. r? `@petrochenkov`
2024-07-16Rollup merge of #124033 - bjorn3:ar_archive_writer_0_3_0, r=davidtwcoTrevor Gross-94/+205
Sync ar_archive_writer to LLVM 18.1.3 From LLVM 15.0.0-rc3. This adds support for COFF archives containing Arm64EC object files and has various fixes for AIX big archive files.
2024-07-16Add unsafe blocks in unsafe Thread::newChris Denton-13/+17
2024-07-16Remove `slice_to_end`Chris Denton-18/+13
2024-07-16std: unwrapped unsafe is VERBOTEN!Jubilee-1/+1
Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
2024-07-16build_native_static_lib with llvm_ar for run_make_supportOneirical-32/+55
2024-07-16rewrite prune-link-args to rmake formatOneirical-80/+99
2024-07-16rewrite dump-mono-stats to rmake formatOneirical-10/+17
2024-07-16rewrite compiler-lookup-paths to rmakeOneirical-45/+111