about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-06-17Better completion test sortingLukas Wirth-38/+38
2025-06-17Improve completions in if / while expression conditionsLukas Wirth-122/+224
2025-06-17Remove a panicking branch in `BorrowedCursor::advance`Benoît du Garreau-3/+3
2025-06-17apply clippy::or_fun_callklensy-28/+32
2025-06-17Merge pull request #20022 from ChayimFriedman2/type-mismatch-expLukas Wirth-6/+2
fix: Never make type mismatch diagnostic stable, even when there is a fix
2025-06-17Lint about `console` calls in rustdoc JSGuillaume Gomez-0/+2
2025-06-17Never make type mismatch diagnostic stable, even when there is a fixChayim Refael Friedman-6/+2
We show fixes now even for experimental diagnostics anyway, and it has false positives.
2025-06-17Merge pull request #20020 from Veykril/push-yuqmorzsqumwLukas Wirth-11/+15
fix: Reload workspaces when cargo configs change
2025-06-17fix: Reload workspaces when cargo configs changeLukas Wirth-11/+15
2025-06-17Add `allow-invalid` configuration option for `disallowed_*` to the ↵Samuel Tardieu-0/+51
documentation (#14845) Close rust-lang/rust-clippy#14836 changelog: none
2025-06-17Merge pull request #19495 from Veykril/push-woywmrxrtqqyLukas Wirth-815/+1214
chore: Start infesting ide crates with 'db lifetime
2025-06-17chore: Start infesting ide crates with 'db lifetimeLukas Wirth-815/+1214
2025-06-17Merge pull request #20018 from Veykril/push-pkowrtoturkrLukas Wirth-84/+176
fix: Copy lockfiles into target directory before invoking `cargo metadata`
2025-06-17Merge pull request #19939 from ChayimFriedman2/fill-arms-selfLukas Wirth-29/+227
feat: In "Fill match arms", allow users to prefer `Self` to the enum name when possible
2025-06-17Merge pull request #19945 from ChayimFriedman2/private-field-quickfixLukas Wirth-32/+125
feat: Add the quickfix for increasing visibility of a private field to the private-field diagnostic (previously it was only on no-such-field)
2025-06-17fix: Copy lockfiles into target directory before invoking `cargo metadata`Lukas Wirth-84/+176
2025-06-17Rollup merge of #142601 - nnethercote:format_version-comment, r=aDotInTheVoidJubilee-0/+8
Add a comment to `FORMAT_VERSION`. This minimizes the chance of two PRs changing it from N to N+1. Fixes rust-lang/rust#94591. r? `@aDotInTheVoid`
2025-06-17Rollup merge of #142598 - ostylk:fix/ppc64_llvmabi, r=nikic,workingjubileeJubilee-0/+26
Set elf e_flags on ppc64 targets according to abi (This PR contains the non user-facing changes of https://github.com/rust-lang/rust/pull/142321) Fixes https://github.com/rust-lang/rust/issues/85589 by making sure that ld.lld errors out instead of generating a broken binary. Basically the problem is that ld.lld assumes that all ppc64 object files with e_flags=0 are object files which use the ELFv2 ABI (this here is the check https://github.com/llvm/llvm-project/blob/main/lld/ELF/Arch/PPC64.cpp#L639). This pull request sets the correct e_flags to indicate the used ABI so ld.lld errors out when encountering ELFv1 ABI files instead of generating a broken binary. For example compare code generation for this program (file name ``min.rs``): ```rust #![feature(no_core, lang_items, repr_simd)] #![crate_type = "bin"] #![no_core] #![no_main] #[lang = "sized"] trait Sized {} #[lang = "copy"] trait Copy {} #[lang = "panic_cannot_unwind"] pub fn panic() -> ! { loop {} } pub fn my_rad_unmangled_function() { loop {} } pub fn my_rad_function() { loop {} } #[no_mangle] pub fn _start() { my_rad_unmangled_function(); my_rad_function(); } ``` Compile with ``rustc --target=powerpc64-unknown-linux-gnu -C linker=ld.lld -C relocation-model=static min.rs`` Before change: ``` $ llvm-objdump -d min Disassembly of section .text: 000000001001030c <.text>: ... 10010334: 7c 08 02 a6 mflr 0 10010338: f8 21 ff 91 stdu 1, -112(1) 1001033c: f8 01 00 80 std 0, 128(1) 10010340: 48 02 00 39 bl 0x10030378 <_ZN3min25my_rad_unmangled_function17h7471c49af58039f5E> 10010344: 60 00 00 00 nop 10010348: 48 02 00 49 bl 0x10030390 <_ZN3min15my_rad_function17h37112b8fd1008c9bE> 1001034c: 60 00 00 00 nop ... ``` The branch instructions ``bl 0x10030378`` and ``bl 0x10030390`` are jumping into the ``.opd`` section which is data. That is a broken binary (because fixing those branches is the task of the linker). After change: ``` error: linking with `ld.lld` failed: exit status: 1 | = note: "ld.lld" "/tmp/rustcNYKZCS/symbols.o" "<1 object files omitted>" "--as-needed" "-L" "/tmp/rustcNYKZCS/raw-dylibs" "-Bdynamic" "--eh-frame-hdr" "-z" "noexecstack" "-L" "<sysroot>/lib/rustlib/powerpc64-unknown-linux-gnu/lib" "-o" "min" "--gc-sections" "-z" "relro" "-z" "now" = note: some arguments are omitted. use `--verbose` to show all linker arguments = note: ld.lld: error: /tmp/rustcNYKZCS/symbols.o: ABI version 1 is not supported ``` Which is correct because ld.lld doesn't support ELFv1 ABI.
2025-06-17Rollup merge of #142595 - workingjubilee:revert-warning-138139, r=ChrisDentonJubilee-38/+0
Revert overeager warning for misuse of `--print native-static-libs` In a PR to emit warnings on misuse of `--print native-static-libs`, we did not consider the matter of composing parts of build systems. If you are not directly invoking rustc, it can be difficult to know when you will in fact compile a staticlib, so making sure uses `--print native-static-lib` correctly can be just a nuisance. Next cycle we can reland a slightly more narrowly focused variant or one that focuses on `--emit` instead of `--print native-static-libs`. But in its current state, I am not sure the warning is very useful.
2025-06-17Rollup merge of #142587 - compiler-errors:try-visit-expr-fields, r=jieyouxuJubilee-4/+23
Make sure to propagate result from `visit_expr_fields` We weren't propagating the `ControlFlow::Break` out of a struct field, which means that the solution implemented in rust-lang/rust#130443 didn't work for nested fields. Fixes rust-lang/rust#142525.
2025-06-17Rollup merge of #142586 - compiler-errors:remove-visit-struct-field-def, ↵Jubilee-18/+2
r=fmease Fold unnecessary `visit_struct_field_def` in AstValidator We don't need it anymore since we removed the `_: struct { }` syntax experiment.
2025-06-17Rollup merge of #142585 - rustbot:docs-update, r=ehussJubilee-0/+0
Update books ## rust-lang/book 1 commits in 634724ea85ebb08a542970bf8871ac8b0f77fd15..4433c9f0cad8460bee05ede040587f8a1fa3f1de 2025-06-03 16:34:00 UTC to 2025-06-03 16:34:00 UTC - Chapter 11 from tech review (rust-lang/book#4391) ## rust-lang/reference 10 commits in 8e0f593a30f3b56ddb0908fb7ab9249974e08738..d4c66b346f4b72d29e70390a3fa3ea7d4e064db1 2025-06-13 17:05:11 UTC to 2025-06-03 21:28:42 UTC - Align pattern destructuring with rest of patterns documentation (rust-lang/reference#1853) - Use extern "system" instead of "stdcall" in example (rust-lang/reference#1854) - Mention that `thiscall` is a 32-bit calling convention (rust-lang/reference#1855) - Add doc for keylocker target features (rust-lang/reference#1829) - Add doc for `sha512`, `sm3` and `sm4` target features (rust-lang/reference#1830) - Fix(typo): 'though' should be 'through' (rust-lang/reference#1850) - intro note: make text more simple (rust-lang/reference#1844) - nit: add missing period (rust-lang/reference#1843) - add a warning about using `safe` on extern c-variadic functions (rust-lang/reference#1839) - remove the `safe` keyword from a c-variadic foreign function. (rust-lang/reference#1838) ## rust-lang/rust-by-example 3 commits in 21f4e32b8b40d36453fae16ec07ad4b857c445b6..9baa9e863116cb9524a177d5a5c475baac18928a 2025-06-11 13:00:27 UTC to 2025-06-10 12:43:14 UTC - introduce new ``@media`` query to set a higher content width on ultra wide screens (rust-lang/rust-by-example#1937) - Fix syntax highligting (rust-lang/rust-by-example#1935) - fix(rust-lang/rust#1656): update doc tests to use `playground` as the crate name (rust-lang/rust-by-example#1934)
2025-06-17Rollup merge of #142584 - Urgau:span-borrowck-139049, r=fmeaseJubilee-120/+65
Handle same-crate macro for borrowck semicolon suggestion Handles https://github.com/rust-lang/rust/pull/142543#discussion_r2149545623 cc ``@m-ou-se`` r? ``@fmease``
2025-06-17Rollup merge of #142570 - jieyouxu:disunion, r=estebankJubilee-36/+115
Reject union default field values Fixes rust-lang/rust#142555. The [`default_field_values` RFC][rfc] does not specify that default field values may be used on `union`s, and it's not clear how default field values may be used with `union`s without an design extension to the RFC. So, for now, reject trying to use default field values with `union`s. ### Review notes - The first commit adds the `union` with default field values test case to `tests/ui/structs/default-field-values/failures.rs`, where `union`s with default field values are currently accepted. - The second commit rejects trying to supply default field values to `union` definitions. - When `default_field_values` feature gate is disabled, we show the feature gate error when the user tries to write `union`s with default field values. When the feature gate is enabled, we reject this usage with > unions cannot have default field values ``@rustbot`` label: +F-default_field_values [rfc]: https://rust-lang.github.io/rfcs/3681-default-field-values.html
2025-06-17Rollup merge of #142563 - jieyouxu:no-more-i686-mingw, r=mati865Jubilee-24/+17
Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` unwind mechanism Closes rust-lang/rust#128911. This PR *re-enables* the `dump-ice-to-disk` test and the unstable feature usage metrics tests for {x86_64,i686} Windows MSVC hosts and x86_64 Windows GNU host. I'll keep an eye out for these tests, and will broaden the ignores if this test is still flaky on not just `i686-pc-windows-gnu`. r? mati865 try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1
2025-06-17Rollup merge of #142542 - cjgillot:invalidate-simplify-cfg, r=SparrowLiiJubilee-3/+16
Manually invalidate caches in SimplifyCfg. The current `SimplifyCfg` pass unconditionally invalidates CFG caches. This is unfortunate if there are no modifications that require this invalidation.
2025-06-17Rollup merge of #142216 - nealsid:refcell-logging, r=tgross35Jubilee-36/+30
Miscellaneous RefCell cleanups - Clarify `RefCell` error messages when borrow rules are broken - Remove `Debug` impl for `BorrowError`/`BorrowMutError` since `#derive(Debug)` provides identical functionality - Rename `BorrowFlag` to `BorrowCounter`
2025-06-17Rollup merge of #141946 - xizheyin:141933, r=jhprattJubilee-11/+16
std: refactor explanation of `NonNull` Fixes rust-lang/rust#141933 I cut out the excessive explanation and used an example to explain how to maintain invariance, but I think what is quoted in the *rust reference* in the document needs to be added with a more layman's explanation and example. (I'm not sure if I deleted too much) r? `@workingjubilee`
2025-06-17Rollup merge of #138538 - hkBst:patch-4, r=tgross35Jubilee-9/+16
Make performance description of String::{insert,insert_str,remove} more precise
2025-06-17linked_list tests: buff check_linksMarijn Schouten-40/+25
2025-06-16tests: remove define so dso_local attr does not disrupt testJubilee Young-1/+1
2025-06-17Make performance of String::insert_str more preciseMarijn Schouten-9/+16
2025-06-17Merge pull request #4402 from rust-lang/rustup-2025-06-17Ralf Jung-1757/+4626
Automatic Rustup
2025-06-17Merge from rustcThe Miri Cronjob Bot-1756/+4625
2025-06-17Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-06-16compiler: Redescribe rustc_target search algo more accuratelyJubilee Young-14/+7
2025-06-16compiler: Redescribe rustc_target::spec more accuratelyJubilee Young-8/+18
2025-06-16don't unwrap in enzyme builds in case of missing llvm-configManuel Drehwald-13/+14
2025-06-17Don't match on platform-specific directory not found messageJieyou Xu-6/+2
2025-06-17Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` ↵Jieyou Xu-18/+15
unwind mechanism
2025-06-17Add a comment to `FORMAT_VERSION`.Nicholas Nethercote-0/+8
This minimizes the chance of two PRs changing it from N to N+1.
2025-06-16rustdoc: make srcIndex no longer a global variablebinarycat-31/+11
this is one-time initialization data, it can just be a function parameter. we also move the json parsing into createSrcSidebar to save a few bytes.
2025-06-17Add a warning to LateContext::get_def_pathblyxyas-0/+9
2025-06-17Reject union default field valuesJieyou Xu-30/+103
2025-06-16clippy: `{Meta,Pointee,}Sized` in non-minicoreDavid Wood-2/+8
One clippy test is `no_core` and needs to have `MetaSized` and `PointeeSized` added to it.
2025-06-16cranelift/gcc: `{Meta,Pointee,}Sized` in minicoreDavid Wood-30/+36
As in many previous commits, adding the new traits to minicore, but this time for cranelift and gcc.
2025-06-16cranelift/gcc: `{Meta,Pointee,}Sized` in minicoreDavid Wood-30/+36
As in many previous commits, adding the new traits to minicore, but this time for cranelift and gcc.
2025-06-16miri: bless testsDavid Wood-4/+4
These error messages include lines of the standard library which have changed and so need updated.
2025-06-16clippy: add `MetaSized` conditionsDavid Wood-1/+8
Existing lints that had special-casing for `Sized` predicates ought to have these same special cases applied to `MetaSized` predicates.
2025-06-16miri: fix buildDavid Wood-1/+1
It isn't clear why the `Deref` impl isn't found for this in a stage two build, but presumably relates to `rustc_middle::ty::RawList` containing an extern type and `Deref` not yet being relaxed to `PointeeSized` (this is technically a breaking change but unlikely to be one and will be tested in a follow-up).