about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-04-29add -Zmiri-deterministic-concurrency flag and use it for concurrency testsRalf Jung-156/+129
2025-04-29Split out salsa_macrosLukas Wirth-48/+63
Does not do much yet due to tracing pulling syn but oh well
2025-04-29Update salsaLukas Wirth-33/+75
2025-04-29Rollup merge of #140392 - Zalathar:goodbye-libtest, r=jieyouxuTrevor Gross-133/+8
compiletest: Remove the libtest-based executor and its dependency Now that #140288 has landed and the new compiletest executor is used by default, we can now move forward with removing the libtest dependency from compiletest. My hope is that after landing this, we can configure bootstrap to build compiletest with the pre-built stage0 library by default, instead of the in-tree stage0 library. That would give the stage0 redesign one less thing to worry about. --- This PR has deliberately been kept small and simple, to make it easier to revert if necessary. Further cleanup can take palce after we're confident that it won't need to be reverted. r? jieyouxu Blocker for https://github.com/rust-lang/rust/pull/119899
2025-04-29Rollup merge of #139909 - oli-obk:or-patterns, r=BoxyUwUTrevor Gross-0/+18
implement or-patterns for pattern types These are necessary to represent `NonZeroI32`, as the range for that is `..0 | 1..`. The `rustc_scalar_layout_range_*` attributes avoided this by just implementing wraparound and having a single `1..=-1` range effectively. See https://rust-lang.zulipchat.com/#narrow/channel/481660-t-lang.2Fpattern-types/topic/.60or.20pattern.60.20representation.20in.20type.20system/with/504217694 for some background discussion cc https://github.com/rust-lang/rust/issues/123646 r? `@BoxyUwU`
2025-04-29Merge pull request #4272 from geetanshjuneja/schedulingRalf Jung-92/+111
Make thread scheduling fully random
2025-04-29CI: rfl: move job forward to Linux v6.15-rc4Miguel Ojeda-1/+1
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-04-29fix comment typosRalf Jung-2/+2
2025-04-29move EnvVars::cleanup into the main-thread-exit handlerRalf Jung-10/+11
2025-04-29Added random schedulinggeetanshjuneja-92/+111
2025-04-29Update compiler-src.mdStan Manilov-13/+12
Refactor the dependency structure from a nested unordered list to a single-level ordered list. IMO, this is clearer, but happy to close this PR without merging, if the change is not desired.
2025-04-29Merge pull request #19714 from Veykril/push-owpqqzqmrpvvLukas Wirth-68/+59
refactor: Remove unnecessary extension trait
2025-04-29refactor: Remove unnecessary extension traitLukas Wirth-68/+59
2025-04-29Coalesce duplicate missing clone testsmejrs-2/+1
2025-04-29Merge pull request #19713 from Veykril/push-xkppskpmuzpoLukas Wirth-188/+234
refactor: Cleanup cfg check handling in expression store lowering
2025-04-29Merge pull request #19685 from fbernier/pgo-installLukas Wirth-132/+175
Add PGO support to install
2025-04-29Cleanup cfg check handling in expression store loweringLukas Wirth-188/+234
2025-04-29miri: algebraic intrinsics: bring back float non-determinismRalf Jung-84/+98
2025-04-29add `rust.debug-assertions-tools` optionPietro Albini-5/+22
2025-04-29refactor: Clean up cache priming cancellation handlingLukas Wirth-39/+54
2025-04-29suppress dangerous_implicit_autorefs in TB testRalf Jung-0/+1
2025-04-29fmtThe Miri Cronjob Bot-7/+3
2025-04-29Merge from rustcThe Miri Cronjob Bot-254/+388
2025-04-29Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-04-28Rollup merge of #140394 - Kobzol:git-test-self-contained, r=jieyouxuChris Denton-0/+3
Make bootstrap git tests more self-contained Based on https://stackoverflow.com/a/67512433/1107768. Fixes: https://github.com/rust-lang/rust/issues/140387 r? ```@jieyouxu```
2025-04-28Rollup merge of #140022 - dianne:box-deref-pats, r=NadrierilChris Denton-1/+14
allow deref patterns to move out of boxes This adds a case to lower deref patterns on boxes using a built-in deref instead of a `Deref::deref` or `DerefMut::deref_mut` call: if `deref!(inner): Box<T>` is matching on place `place`, the inner pattern `inner` now matches on `*place` rather than a temporary. No longer needing to call a method also means it won't borrow the scrutinee in match arms. This allows for bindings in `inner` to move out of `*place`. For comparison with box patterns, this uses the same MIR lowering but different THIR. Consequently, deref patterns on boxes are treated the same as any other deref patterns in match exhaustiveness analysis. Box patterns can't quite be implemented in terms of deref patterns until exhaustiveness checking for deref patterns is implemented (I'll open a PR for exhaustiveness soon!). Tracking issue: #87121 r? ``@Nadrieril``
2025-04-28Rollup merge of #139656 - scottmcm:stabilize-slice-as-chunks, r=dtolnayChris Denton-2/+1
Stabilize `slice_as_chunks` library feature ~~Draft as this needs #139163 to land first.~~ FCP: https://github.com/rust-lang/rust/issues/74985#issuecomment-2769963395 Methods being stabilized are: ```rust impl [T] { const fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T]); const fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]]); const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]]; const fn as_chunks_mut<const N: usize>(&mut self) -> (&mut [[T; N]], &mut [T]); const fn as_rchunks_mut<const N: usize>(&mut self) -> (&mut [T], &mut [[T; N]]); const unsafe fn as_chunks_unchecked_mut<const N: usize>(&mut self) -> &mut [[T; N]]; } ``` ~~(FCP's not done quite yet, but will in another day if I'm counting right.)~~ FCP Complete: https://github.com/rust-lang/rust/issues/74985#issuecomment-2797951535
2025-04-28Add documentation on how to stabilize the compiler editionEric Huss-0/+19
This adds documentation on how to stabilize the edition in the compiler.
2025-04-28Merge pull request #19699 from ChayimFriedman2/escape-labelDavid Barsky-7/+36
fix: Escape raw names in labels properly
2025-04-28base-db: add more details to panicDavid Barsky-9/+20
2025-04-28Update mdbook to 0.4.48Eric Huss-1/+1
This updates to the latest version of mdbook which has had a variety of fixes of new features since the last update. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0448
2025-04-28Add documentation on how to migration the edition of the standard libraryEric Huss-0/+18
Based on lessons learned from 2024. There's probably still more details to say here since it was a ton of work. These are the major points that I remember.
2025-04-28Add an example of the example of an edition migration lintEric Huss-0/+17
It was observed that some people were missing the `edition20xx` rustdoc attribute. Although this probably won't solve that problem, I'd still like to highlight it as something to be aware of.
2025-04-28Auto merge of #140388 - GuillaumeGomez:rollup-aj9o3ch, r=GuillaumeGomezbors-105/+163
Rollup of 7 pull requests Successful merges: - #140056 (Fix a wrong error message in 2024 edition) - #140220 (Fix detection of main function if there are expressions around it) - #140249 (Remove `weak` alias terminology) - #140316 (Introduce `BoxMarker` to improve pretty-printing correctness) - #140347 (ci: clean more disk space in codebuild) - #140349 (ci: use aws codebuild for the `dist-x86_64-linux` job) - #140379 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2025-04-28Merge pull request #19708 from Veykril/push-wrmyowrzkxzzLukas Wirth-255/+188
refactor: De-arc lang item queries
2025-04-28Merge pull request #19542 from snprajwal/let-else-to-matchLukas Wirth-142/+335
refactor: migrate `let_else_to_match` to editor
2025-04-28refactor: De-arc lang item queriesLukas Wirth-255/+188
2025-04-28Auto merge of #123948 - azhogin:azhogin/async-drop, r=oli-obkbors-85/+104
Async drop codegen Async drop implementation using templated coroutine for async drop glue generation. Scopes changes to generate `async_drop_in_place()` awaits, when async droppable objects are out-of-scope in async context. Implementation details: https://github.com/azhogin/posts/blob/main/async-drop-impl.md New fields in Drop terminator (drop & async_fut). Processing in codegen/miri must validate that those fields are empty (in full version async Drop terminator will be expanded at StateTransform pass or reverted to sync version). Changes in terminator visiting to consider possible new successor (drop field). ResumedAfterDrop messages for panic when coroutine is resumed after it is started to be async drop'ed. Lang item for generated coroutine for async function async_drop_in_place. `async fn async_drop_in_place<T>()::{{closure0}}`. Scopes processing for generate async drop preparations. Async drop is a hidden Yield, so potentially async drops require the same dropline preparation as for Yield terminators. Processing in StateTransform: async drops are expanded into yield-point. Generation of async drop of coroutine itself added. Shims for AsyncDropGlueCtorShim, AsyncDropGlue and FutureDropPoll. ```rust #[lang = "async_drop"] pub trait AsyncDrop { #[allow(async_fn_in_trait)] async fn drop(self: Pin<&mut Self>); } impl Drop for Foo { fn drop(&mut self) { println!("Foo::drop({})", self.my_resource_handle); } } impl AsyncDrop for Foo { async fn drop(self: Pin<&mut Self>) { println!("Foo::async drop({})", self.my_resource_handle); } } ``` First async drop glue implementation re-worked to use the same drop elaboration code as for sync drop. `async_drop_in_place` changed to be `async fn`. So both `async_drop_in_place` ctor and produced coroutine have their lang items (`AsyncDropInPlace`/`AsyncDropInPlacePoll`) and shim instances (`AsyncDropGlueCtorShim`/`AsyncDropGlue`). ``` pub async unsafe fn async_drop_in_place<T: ?Sized>(_to_drop: *mut T) { } ``` AsyncDropGlue shim generation uses `elaborate_drops::elaborate_drop` to produce drop ladder (in the similar way as for sync drop glue) and then `coroutine::StateTransform` to convert function into coroutine poll. AsyncDropGlue coroutine's layout can't be calculated for generic T, it requires known final dropee type to be generated (in StateTransform). So, `templated coroutine` was introduced here (`templated_coroutine_layout(...)` etc). Such approach overrides the first implementation using mixing language-level futures in https://github.com/rust-lang/rust/pull/121801.
2025-04-28Make bootstrap git tests more self-containedJakub Beránek-0/+3
2025-04-28refactor: migrate `merge_imports` to syntax editorPrajwal S N-43/+25
Co-authored-by: Tarek <tareknaser360@gmail.com> Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-28chore: rename `unmerge_use` to `unmerge_imports`Prajwal S N-44/+44
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-28fix: migrate `unmerge_use` to syntax editorPrajwal S N-16/+108
Also ensures that attributes on the use item are applied to the new use item when unmerging. Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-28compiletest: Remove the libtest-based executor and its dependencyZalathar-133/+8
This patch has deliberately been kept small and simple, to make it easier to revert if necessary. Further cleanup can take palce after we're confident that it won't need to be reverted.
2025-04-28refactor: migrate `let_else_to_match` to editorPrajwal S N-142/+335
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-28Rollup merge of #140379 - tshepang:rdg-push, r=jieyouxuGuillaume Gomez-39/+49
rustc-dev-guide subtree update
2025-04-28Rollup merge of #140349 - marcoieni:codebuild-linux-large-runners, r=KobzolGuillaume Gomez-2/+2
ci: use aws codebuild for the `dist-x86_64-linux` job try-job: dist-x86_64-linux
2025-04-28Rollup merge of #140347 - marcoieni:free-disk-codebuild, r=jdnoGuillaume Gomez-50/+81
ci: clean more disk space in codebuild try-job: dist-arm-linux
2025-04-28Rollup merge of #140316 - nnethercote:BoxMarker, r=dtolnayGuillaume Gomez-4/+4
Introduce `BoxMarker` to improve pretty-printing correctness Box opening/closing is really easy to get wrong in the pretty-printers. This PR makes it much harder to get wrong. r? `@Urgau`
2025-04-28Rollup merge of #140249 - BoxyUwU:remove_weak_alias_terminology, r=oli-obkGuillaume Gomez-4/+4
Remove `weak` alias terminology I find the "weak" alias terminology to be quite confusing. It implies the existence of "strong" aliases (which do not exist) and I'm not really sure what about weak aliases is "weak". I much prefer "free alias" as the term. I think it's much more obvious what it means as "free function" is a well defined term that already exists in rust. It's also a little confusing given "weak alias" is already a term in linker/codegen spaces which are part of the compiler too. Though I'm not particularly worried about that as it's usually very obvious if you're talking about the type system or not lol. I'm also currently trying to write documentation about aliases and it's somewhat awkward/confusing to be talking about *weak* aliases, when I'm not really sure what the basis for that as the term actually *is*. I would also be happy to just find out there's a nice meaning behind calling them "weak" aliases :-) r? `@oli-obk` maybe we want a types MCP to decide on a specific naming here? or maybe we think its just too late to go back on this naming decision ^^'
2025-04-28Rollup merge of #140220 - GuillaumeGomez:doctest-main-wrapping, r=fmeaseGuillaume Gomez-5/+22
Fix detection of main function if there are expressions around it Fixes #140162. Fixes #139651. Once this is merged, we can backport and I'll send a follow-up to emit a warning in case a `main` function is about to be "wrapped" (and therefore not run). r? `@fmease` try-job: x86_64-mingw-1