about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-09-22Merge pull request #20592 from A4-Tacks/add-braces-closure-in-matchShoyu Vanilla (Flint)-2/+31
Fix closure in match not applicable for add_braces
2025-09-22Merge pull request #20679 from A4-Tacks/no-comp-ty-in-nested-patShoyu Vanilla (Flint)-0/+20
Fix complete type in nested pattern
2025-09-22Merge pull request #20722 from A4-Tacks/pull-assign-up-inner-ifShoyu Vanilla (Flint)-0/+35
Fix apply in inner if for pull_assignment_up
2025-09-22Merge pull request #20723 from A4-Tacks/fix-bind-unused-applicable-underscoreShoyu Vanilla (Flint)-3/+30
Fix applicable on underscore for bind_unused_param
2025-09-22Merge pull request #20725 from ChayimFriedman2/fix-missing-lifetimeShoyu Vanilla (Flint)-25/+55
fix: Fix lifetime elision handling for `Fn`-style trait bounds
2025-09-22Rollup merge of #146884 - Kobzol:tidy-rustdoc-modified, r=GuillaumeGomezGuillaume Gomez-2/+4
Fix modification check of `rustdoc-json-types` r? `@GuillaumeGomez`
2025-09-22Rollup merge of #146848 - moturus:motor-os_tier-3, r=davidtwcoGuillaume Gomez-0/+51
Add x86_64-unknown-motor (Motor OS) tier 3 target Add the initial no-std Motor OS compiler target. Motor OS has been developed for several years in the open: https://github.com/moturus/motor-os. It has a more or less full implementation of Rust std library, as well as tokio/mio ports. > A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.) Ack. [U. Lasiotus](https://github.com/lasiotus) will maintain the target. > Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target. > Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it. > If possible, use only letters, numbers, dashes and underscores for the name. Periods (.) are known to cause issues in Cargo. Ack. The new target is named `x86_64-unknown-motor`, as it represents Motor OS on x86_64. > Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users. > The target must not introduce license incompatibilities. > Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0). > The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the tidy tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements. Ack. Motor OS is dual-licensed under MIT and/or Apache-2.0. > Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3. > "onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are not limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users. > Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions. > This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements. Ack. > Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions. Motor OS has a functional implementation of the standard library: https://github.com/moturus/rust/tree/motor-os_stdlib, which will be the subject of a later PR. > The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary. Building instructions for Motor OS: https://github.com/moturus/motor-os/blob/main/docs/build.md. > Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via `@)` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages. Ack. > Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications. > Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target. > In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target. Ack. > Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target. (Having support in a fork of the backend is not sufficient, it must be upstream.) Motor OS uses the standard x86_64 rustc/llvm toolchain. > If a tier 3 target stops meeting these requirements, or the target maintainers no longer have interest or time, or the target shows no signs of activity and has not built for some time, or removing the target would improve the quality of the Rust codebase, we may post a PR to remove it; any such PR will be CCed to the target maintainers (and potentially other people who have previously worked on the target), to check potential interest in improving the situation. Ack.
2025-09-22Rollup merge of #146828 - el-ev:issue146646, r=GuillaumeGomezGuillaume Gomez-2/+4
fix a crash in rustdoc merge finalize without input file - Closes rust-lang/rust#146646 `SerializedSearchIndex::union` calls `Symbol::intern`, requiring `SESSION_GLOBALS` to be set.
2025-09-22Merge pull request #20717 from ShoyuVanilla/migrate-moreChayim Refael Friedman-153/+122
internal: Migrate more predicate things to next-solver
2025-09-22internal: Migrate more predicate things to next-solverShoyu Vanilla-153/+122
2025-09-22Auto merge of #146683 - clarfonthey:safe-intrinsics, r=RalfJung,Amanieubors-4/+4
Mark float intrinsics with no preconditions as safe Note: for ease of reviewing, the list of safe intrinsics is sorted in the first commit, and then safe intrinsics are added in the second commit. All *recently added* float intrinsics have been correctly marked as safe to call due to the fact that they have no preconditions. This adds the remaining float intrinsics which are safe to call to the safe intrinsic list, and removes the unsafe blocks around their calls. --- Side note: this may want a try run before being added to the queue, since I'm not sure if there's any tier-2 code that uses these intrinsics that might not be tested on the usual PR flow. We've already uncovered a few places in subtrees that do this, and it's worth double-checking before clogging up the queue.
2025-09-22Merge pull request #2593 from rust-lang/tshepang/testing-with-ciTshepang Mbambo-65/+65
various improvements resulting from reading Testing with CI
2025-09-22various improvements resulting from reading Testing with CITshepang Mbambo-65/+65
2025-09-22reduce overlong linesTshepang Mbambo-3/+8
2025-09-22Fix lifetime elision handling for `Fn`-style trait boundsChayim Refael Friedman-25/+55
Two fixes were needed: 1. Previously, we enabled elision for the generic args of `Fn` itself, instead of for generic args of paths within it. 2. In lowering in the new solver the `Output` parameter did not have elision set correctly, I don't know why. In the old lowering it was done correctly.
2025-09-22add comment explaining the test_build_dirbit-aloo-0/+7
2025-09-22add check for toml filebit-aloo-10/+9
2025-09-22share the check_nondet helper as wellRalf Jung-174/+138
2025-09-22share check_all_outcomes impl, and increase max iteration countsRalf Jung-60/+45
2025-09-22remove explicit target assignment in config during rustc initializationbit-aloo-15/+8
2025-09-22Fix modification check of `rustdoc-json-types`Jakub Beránek-2/+4
2025-09-22Merge pull request #4595 from RalfJung/tb-termsRalf Jung-197/+128
TB: update terminology to match paper & MiniRust
2025-09-22Rollup merge of #146838 - yotamofek:pr/rustdoc/wrappers, r=lolbinarycatStuart Cook-251/+262
Introduce "wrapper" helpers to rustdoc Add a few traits for streamlining places where we need to wrap certain `fmt::Display`s in stuff like parentheses or brackets. Hopefully this makes the actual display logic slightly easier to read. First two commits are small, unrelated cleanups. I'll probably add some doc comments to the stuff in `display.rs`, maybe also play around with the API, but wanted to get feedback on this idea first.
2025-09-22Rollup merge of #146831 - taiki-e:powerpc-clobber, r=AmanieuStuart Cook-2/+4
Support ctr and lr as clobber-only registers in PowerPC inline assembly Follow-up to rust-lang/rust#131341. CTR and LR are marked as volatile in all ABIs, but I skipped them in rust-lang/rust#131341 due to they are currently marked as reserved. https://github.com/rust-lang/rust/blob/dd7fda570040e8a736f7d8bc28ddd1b444aabc82/compiler/rustc_target/src/asm/powerpc.rs#L209-L212 However, they are actually only unusable as input/output of inline assembly, and should be fine to support as clobber-only registers as discussed in [#t-compiler > ppc/ppc64 inline asm support](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/ppc.2Fppc64.20inline.20asm.20support/with/540413845). r? ````@Amanieu```` or ````@workingjubilee```` cc ````@programmerjake```` ````@rustbot```` label +O-PowerPC +A-inline-assembly
2025-09-22Tree::new_child: remove SIFA precondition and sync terminologyRalf Jung-70/+34
2025-09-22TB: rename Active → Unique to match paperRalf Jung-128/+95
2025-09-22avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`Petros Angelatos-0/+10
The implementation of the `Vec::extract_if` iterator violates the safety contract adverized by `slice::from_raw_parts` by always constructing a mutable slice for the entire length of the vector even though that span of memory can contain holes from items already drained. The safety contract of `slice::from_raw_parts` requires that all elements must be properly initialized. As an example we can look at the following code: ```rust let mut v = vec![Box::new(0u64), Box::new(1u64)]; for item in v.extract_if(.., |x| **x == 0) { drop(item); } ``` In the second iteration a `&mut [Box<u64>]` slice of length 2 will be constructed. The first slot of the slice contains the bitpattern of an already deallocated box, which is invalid. This fixes the issue by only creating references to valid items and using pointer manipulation for the rest. I have also taken the liberty to remove the big `unsafe` blocks in place of targetted ones with a SAFETY comment. The approach closely mirrors the implementation of `Vec::retain_mut`. Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2025-09-22Merge pull request #20724 from ChayimFriedman2/ns-cleanup3Chayim Refael Friedman-0/+32
minor: Another regression test for next solver fixed bug
2025-09-22Another regression test for next solver fixed bugChayim Refael Friedman-0/+32
2025-09-22Fix applicable on underscore for bind_unused_paramA4-Tacks-3/+30
Fixes: - applicable on underscore prefix parameter - using binding mode as an expression Examples --- ```rust fn foo($0_x: i32, y: i32) {} ``` **Before this PR**: ```rust fn foo(_x: i32, y: i32) { let _ = _x; } ``` **After this PR**: Assist not applicable --- ```rust fn foo(ref $0y: i32) {} ``` **Before this PR**: ```rust fn foo(ref y: i32) { let _ = ref y; } ``` **After this PR**: ```rust fn foo(ref y: i32) { let _ = y; } ```
2025-09-22Fix apply in internal if for pull_assignment_upA4-Tacks-0/+35
Example --- ```rust fn foo() { let mut a = 1; if true { a = 2; } else if true { $0a = 3; } else { a = 4; } } ``` **Before this PR**: ```rust fn foo() { let mut a = 1; if true { a = 2; } else a = if true { 3 } else { 4 }; } ``` **After this PR**: ```rust fn foo() { let mut a = 1; a = if true { 2 } else if true { 3 } else { 4 }; } ```
2025-09-22Merge ref '9f32ccf35fb8' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-14793/+53057
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 9f32ccf35fb877270bc44a86a126440f04d676d0 Filtered ref: 87b13773969f65eec6762cfe4194954e7513f59b Upstream diff: https://github.com/rust-lang/rust/compare/2f3f27bf79ec147fec9d2e7980605307a74067f4...9f32ccf35fb877270bc44a86a126440f04d676d0 This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-22Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to 9f32ccf35fb877270bc44a86a126440f04d676d0.
2025-09-22Clarify `rust-analyzer.inlayHints.maxLength` is not a hard guaranteeChayim Refael Friedman-1/+5
2025-09-21Mark float intrinsics with no preconditions as safeltdk-4/+4
2025-09-22Introduce "wrapper" helpers to rustdocYotam Ofek-238/+248
2025-09-21Re-use some existing util fnsYotam Ofek-9/+7
2025-09-21Early return in `visibility_print_with_space`Yotam Ofek-4/+7
2025-09-21Rollup merge of #146606 - Enselic:test-test-args, r=Mark-SimulacrumMatthias Krüger-0/+7
ci: x86_64-gnu-tools: Add `--test-args` regression test See https://github.com/rust-lang/rust/pull/146601#issuecomment-3293179561 r? ``@Mark-Simulacrum``
2025-09-21Rollup merge of #143857 - Periodic1911:macro-export, r=jdonszelmannMatthias Krüger-24/+30
Port #[macro_export] to the new attribute parsing infrastructure Ports macro_export to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197 r? ``@oli-obk`` cc ``@JonathanBrouwer`` ``@jdonszelmann``
2025-09-21Add x86_64-unknown-motor (Motor OS) tier 3 targetU. Lasiotus-0/+51
Add the initial no-std Motor OS compiler target. Motor OS has been developed for several years in the open: https://github.com/moturus/motor-os. It has a more or less full implementation of Rust std library, as well as tokio/mio ports. Build instructions can be found here: https://github.com/moturus/motor-os/blob/main/docs/build.md. Signed-off-by: U. Lasiotus <lasiotus@motor-os.org>
2025-09-21Add panic=immediate-abortBen Kimock-7/+37
2025-09-21Correct a misspelling of RUSTC_LOGSidney Cammeresi-1/+1
2025-09-21remove prepare_test_specific_dir and update tests accordinglybit-aloo-89/+65
2025-09-21add explicit config assignment when running the test, as the src is assigned ↵bit-aloo-0/+9
to CARGO_MANIFEST_DIR, so the config actually use the <src>/bootstrap.toml and the /tmp/bootstrap.toml
2025-09-21initialize out with CARGO_TARGET_DIR and then go for manifest and then for ↵bit-aloo-8/+19
current
2025-09-21add dry_run flag in config builder and remove runtime test hacksbit-aloo-7/+15
2025-09-21remove create_config_without_ci_llvm_override duplicationbit-aloo-21/+19
2025-09-21rename config_toml to with_default_toml_configbit-aloo-18/+33
2025-09-21this is dicy, whether we have a method to explicitly enable_llvm_overridebit-aloo-0/+15