about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-06-18Rollup merge of #141610 - BoxyUwU:stabilize_generic_arg_infer, ↵Jakub Beránek-11/+10
r=lcnr,traviscross Stabilize `feature(generic_arg_infer)` Fixes rust-lang/rust#85077 r? lcnr cc ````@rust-lang/project-const-generics````
2025-06-18Reduce uses of `hir_crate`.Camille GILLOT-2/+0
2025-06-18{aarch64,x86_64}-pc-windows-gnullvm: build host toolsMateusz Mikuła-21/+121
2025-06-18Merge pull request #2474 from BoxyUwU/ambig_unambig_ty_constsBoxy-6/+70
Document Ambig vs Unambig Type/Consts
2025-06-18ReviewsBoxy-12/+12
2025-06-18Fix compiletest and rustc-dev-guideJakub Beránek-4/+4
2025-06-18Clarify bootstrap tool description and change its directory to simply ↵Jakub Beránek-6/+17
`bootstrap-tools`
2025-06-18bump rustdoc json format number for pretty print change of attributeJana Dönszelmann-2/+2
2025-06-18Add --color=always to test explorer commandJosh McKinney-0/+1
Fixes https://github.com/rust-lang/rust-analyzer/issues/20030
2025-06-18Skip tidy triagebot linkcheck if `triagebot.toml` doesn't existJieyou Xu-1/+4
2025-06-18Enable `run-make-support` auto cross-compilation for `rustdoc` tooJieyou Xu-7/+32
2025-06-18Enable automatic cross-compilation in run-make testsJakub Beránek-7/+26
2025-06-18add `#[align]` attributeFolkert de Vries-5/+5
Right now it's used for functions with `fn_align`, in the future it will get more uses (statics, struct fields, etc.)
2025-06-18`Result::expect` instead of `match` and `panic!`Yotam Ofek-6/+2
2025-06-18minimal ptrace setupNia Espera-39/+938
Apply suggestions from code review Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de> review comments fix possible hang
2025-06-18Auto merge of #141061 - dpaoliello:shimasfn, r=bjorn3bors-6/+6
Change __rust_no_alloc_shim_is_unstable to be a function This fixes a long sequence of issues: 1. A customer reported that building for Arm64EC was broken: #138541 2. This was caused by a bug in my original implementation of Arm64EC support, namely that only functions on Arm64EC need to be decorated with `#` but Rust was decorating statics as well. 3. Once I corrected Rust to only decorate functions, I started linking failures where the linker couldn't find statics exported by dylib dependencies. This was caused by the compiler not marking exported statics in the generated DEF file with `DATA`, thus they were being exported as functions not data. 4. Once I corrected the way that the DEF files were being emitted, the linker started failing saying that it couldn't find `__rust_no_alloc_shim_is_unstable`. This is because the MSVC linker requires the declarations of statics imported from other dylibs to be marked with `dllimport` (whereas it will happily link to functions imported from other dylibs whether they are marked `dllimport` or not). 5. I then made a change to ensure that `__rust_no_alloc_shim_is_unstable` was marked as `dllimport`, but the MSVC linker started emitting warnings that `__rust_no_alloc_shim_is_unstable` was marked as `dllimport` but was declared in an obj file. This is a harmless warning which is a performance hint: anything that's marked `dllimport` must be indirected via an `__imp` symbol so I added a linker arg in the target to suppress the warning. 6. A customer then reported a similar warning when using `lld-link` (<https://github.com/rust-lang/rust/pull/140176#issuecomment-2872448443>). I don't think it was an implementation difference between the two linkers but rather that, depending on the obj that the declaration versus uses of `__rust_no_alloc_shim_is_unstable` landed in we would get different warnings, so I suppressed that warning as well: #140954. 7. Another customer reported that they weren't using the Rust compiler to invoke the linker, thus these warnings were breaking their build: <https://github.com/rust-lang/rust/pull/140176#issuecomment-2881867433>. At that point, my original change was reverted (#141024) leaving Arm64EC broken yet again. Taking a step back, a lot of these linker issues arise from the fact that `__rust_no_alloc_shim_is_unstable` is marked as `extern "Rust"` in the standard library and, therefore, assumed to be a foreign item from a different crate BUT the Rust compiler may choose to generate it either in the current crate, some other crate that will be statically linked in OR some other crate that will by dynamically imported. Worse yet, it is impossible while building a given crate to know if `__rust_no_alloc_shim_is_unstable` will statically linked or dynamically imported: it might be that one of its dependent crates is the one with an allocator kind set and thus that crate (which is compiled later) will decide depending if it has any dylib dependencies or not to import `__rust_no_alloc_shim_is_unstable` or generate it. Thus, there is no way to know if the declaration of `__rust_no_alloc_shim_is_unstable` should be marked with `dllimport` or not. There is a simple fix for all this: there is no reason `__rust_no_alloc_shim_is_unstable` must be a static. It needs to be some symbol that must be linked in; thus, it could easily be a function instead. As a function, there is no need to mark it as `dllimport` when dynamically imported which avoids the entire mess above. There may be a perf hit for changing the `volatile load` to be a `tail call`, so I'm happy to change that part back (although I question what the codegen of a `volatile load` would look like, and if the backend is going to try to use load-acquire semantics). Build with this change applied BEFORE #140176 was reverted to demonstrate that there are no linking issues with either MSVC or MinGW: <https://github.com/rust-lang/rust/actions/runs/15078657205> Incidentally, I fixed `tests/run-make/no-alloc-shim` to work with MSVC as I needed it to be able to test locally (FYI for #128602) r? `@bjorn3` cc `@jieyouxu`
2025-06-18Update/bless clippy tests.Mara Bos-52/+47
2025-06-18Remove outdated test.Mara Bos-1/+0
We no longer error in this case!
2025-06-18Clarify documentationJakub Beránek-2/+6
2025-06-18Remove unused bootstrap flagJakub Beránek-650/+187
2025-06-18Destructure bootstrap flags to make sure that none of them are unusedJakub Beránek-55/+97
2025-06-18Auto merge of #138165 - jdonszelmann:inline, r=oli-obkbors-31/+30
Rewrite `inline` attribute parser to use new infrastructure and improve diagnostics for all parsed attributes r? `@oli-obk` This PR: - creates a new parser for inline attributes - creates consistent error messages and error codes between attribute parsers; inline and others - as such changes a few error messages for other attributes to be (in my eyes) much more consistent - tests ast-lowering lints introduced by rust-lang/rust#138164 since this is now useful for the first time - Coalesce some useless error codes Builds on top of rust-lang/rust#138164 Closes rust-lang/rust#137950
2025-06-18Merge from rust-lang/rustLaurențiu Nicola-3948/+8004
2025-06-18Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2025-06-18Merge from rustcThe Miri Cronjob Bot-3549/+4886
2025-06-18Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-06-18undojnyfah-1/+1
2025-06-18fix formatjnyfah-11/+11
2025-06-18format functionjnyfah-44/+169
2025-06-18Auto merge of #142644 - jhpratt:rollup-f2jed9t, r=jhprattbors-44/+30
Rollup of 14 pull requests Successful merges: - rust-lang/rust#141574 (impl `Default` for `array::IntoIter`) - rust-lang/rust#141608 (Add support for repetition to `proc_macro::quote`) - rust-lang/rust#142100 (rustdoc: make srcIndex no longer a global variable) - rust-lang/rust#142371 (avoid `&mut P<T>` in `visit_expr` etc methods) - rust-lang/rust#142517 (Windows: Use anonymous pipes in Command) - rust-lang/rust#142520 (alloc: less static mut + some cleanup) - rust-lang/rust#142588 (Generic ctx imprv) - rust-lang/rust#142605 (Don't unwrap in enzyme builds in case of missing llvm-config) - rust-lang/rust#142608 (Refresh module-level docs for `rustc_target::spec`) - rust-lang/rust#142618 (Lint about `console` calls in rustdoc JS) - rust-lang/rust#142620 (Remove a panicking branch in `BorrowedCursor::advance`) - rust-lang/rust#142631 (Dont suggest remove semi inside macro expansion for redundant semi lint) - rust-lang/rust#142632 (Update cargo) - rust-lang/rust#142635 (Temporarily add back -Zwasm-c-abi=spec) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-17bump rustdoc json version for inline attribute representation Jana Dönszelmann-2/+2
2025-06-17fix clippyJana Dönszelmann-4/+4
2025-06-17Rollup merge of #142632 - ehuss:update-cargo, r=ehussJacob Pratt-0/+0
Update cargo 6 commits in fc1518ef02b77327d70d4026b95ea719dd9b8c51..2251525ae503fa196f6d7f9ce6d32eccb2d5f044 2025-06-06 04:49:44 +0000 to 2025-06-16 22:01:27 +0000 - feat: Add custom completer for `cargo remove &lt;TAB&gt;` (rust-lang/cargo#15662) - chore(deps): update msrv (3 versions) to v1.85 (rust-lang/cargo#15668) - refactor: replace InternedString with Cow in IndexPackage (rust-lang/cargo#15559) - highlight the correct words (rust-lang/cargo#15659) - CHANGELOG.md: typo (rust-lang/cargo#15660) - Use `Not::not` rather than a custom `is_false` function (rust-lang/cargo#15645)
2025-06-17Rollup merge of #142618 - GuillaumeGomez:eslint-no-console, r=lolbinarycatJacob Pratt-0/+2
Lint about `console` calls in rustdoc JS As discussed [here](https://github.com/rust-lang/rust/pull/142100#discussion_r2151764395), this PR enforces that `console` is not used in rustdoc JS by default. cc `@lolbinarycat`
2025-06-17Rollup merge of #142605 - ZuseZ4:autodiff-check-builds2, r=oli-obkJacob Pratt-13/+14
Don't unwrap in enzyme builds in case of missing llvm-config r? `@onur-ozkan` For some reason x.py was now panicking in this location, so I also removed the unwrap here. part 2 of https://github.com/rust-lang/rust/pull/140000, there shouldn't be other locations where we check for llvm-config.
2025-06-17Rollup merge of #142371 - fee1-dead-contrib:push-xqlkumzurkus, r=petrochenkovJacob Pratt-3/+3
avoid `&mut P<T>` in `visit_expr` etc methods trying a different way than rust-lang/rust#141636 r? ghost
2025-06-17Rollup merge of #142100 - lolbinarycat:rustdoc-srcIndex-138467, r=GuillaumeGomezJacob Pratt-28/+11
rustdoc: make srcIndex no longer a global variable this is one-time initialization data, it can just be a function parameter. while we're doing that, we can more the json parsing into the function and save a few extra bytes of storage for free, at least in the case of multiple crates in a doc bundle. fixes https://github.com/rust-lang/rust/issues/138467
2025-06-17convert entire codebase to parsed inline attrsJana Dönszelmann-29/+28
2025-06-17Auto merge of #142567 - lnicola:sync-from-ra, r=lnicolabors-3488/+4773
Subtree update of `rust-analyzer` r? `@ghost`
2025-06-17Auto merge of #142613 - workingjubilee:rollup-yuod2hg, r=workingjubileebors-0/+8
Rollup of 13 pull requests Successful merges: - rust-lang/rust#138538 (Make performance description of String::{insert,insert_str,remove} more precise) - rust-lang/rust#141946 (std: refactor explanation of `NonNull`) - rust-lang/rust#142216 (Miscellaneous RefCell cleanups) - rust-lang/rust#142542 (Manually invalidate caches in SimplifyCfg.) - rust-lang/rust#142563 (Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` unwind mechanism) - rust-lang/rust#142570 (Reject union default field values) - rust-lang/rust#142584 (Handle same-crate macro for borrowck semicolon suggestion) - rust-lang/rust#142585 (Update books) - rust-lang/rust#142586 (Fold unnecessary `visit_struct_field_def` in AstValidator) - rust-lang/rust#142587 (Make sure to propagate result from `visit_expr_fields`) - rust-lang/rust#142595 (Revert overeager warning for misuse of `--print native-static-libs`) - rust-lang/rust#142598 (Set elf e_flags on ppc64 targets according to abi) - rust-lang/rust#142601 (Add a comment to `FORMAT_VERSION`.) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-17Update libc to 0.2.174Trevor Gross-2/+2
This includes a fix for building on gnux32. [1]: https://github.com/rust-lang/libc/releases/tag/0.2.174
2025-06-17allow spawn to behave according to failure behaviorbit-aloo-36/+52
2025-06-17Add linksBoxy-9/+19
2025-06-17Write chapter on Unambig vs Ambig Types/ConstsBoxy-1/+53
2025-06-17Stub chapter and consolidate under `/hir/`Boxy-6/+8
2025-06-17Profiling with perf: specify the section of bootstrap settings.lolbinarycat-2/+2
2025-06-17Update cargoEric Huss-0/+0
2025-06-17Try to downgrade objectLaurențiu Nicola-12/+3
2025-06-17change to executed atbit-aloo-11/+13
2025-06-17Merge pull request #20025 from SoxPopuli/hide_private_imports_without_peLaurențiu Nicola-5/+98
Hide imported privates if private editable is disabled