about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-01-10Improve hover module path renderingLukas Wirth-24/+134
2025-01-10Merge pull request #18900 from ChayimFriedman2/stupid-hangLukas Wirth-7/+7
fix: Do not compute `prettify_macro_expansion()` unless the "Inline macro" assist has actually been invoked
2025-01-10Merge pull request #18902 from Veykril/push-znlsxykqrkooLukas Wirth-133/+184
internal: Add Definition::Crate
2025-01-10internal: Add Definition::CrateLukas Wirth-133/+184
This is its own thing so it should be handled specifically where possible
2025-01-10Rollup merge of #135251 - oli-obk:push-lmpyvvyrtplk, r=ytmimiJacob Pratt-12/+43
Only treat plain literal patterns as short See https://github.com/rust-lang/rust/pull/134228#discussion_r1905848384 and https://github.com/rust-lang/rust/pull/134228#discussion_r1905916702 for context. We never wanted to treat const blocks and paths as short, only plain literals. I don't know how to write a test for this, it.s not clear to me how the short pattern check actually affects the formatting
2025-01-10add change entry for `optimized-compiler-builtins`onur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-10ensure `optimized_compiler_builtins` check for CI rustconur-ozkan-0/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-10add coverage for target specific valueonur-ozkan-1/+8
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-10make `optimized-compiler-builtins` target configurableonur-ozkan-1/+11
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-10add MSVC slice providersWalnut-2/+27
2025-01-10add MSVC tuple providersWalnut-1/+58
2025-01-10Merge pull request #18901 from ChayimFriedman2/hir-reexportLukas Wirth-23/+28
minor: Remove two hir reexports
2025-01-10Merge pull request #18813 from Giga-Bowser/syntax-tree-viewLukas Wirth-701/+812
feat: Add a new and improved syntax tree view
2025-01-10Auto merge of #135319 - matthiaskrgr:rollup-un5lol6, r=matthiaskrgrbors-0/+97
Rollup of 8 pull requests Successful merges: - #133088 (`-Zrandomize-layout` harder. `Foo<T> != Foo<U>`) - #134619 (Improve prose around `as_slice` example of IterMut) - #134855 (Add `default_field_values` entry to unstable book) - #134908 (Fix `ptr::from_ref` documentation example comment) - #135275 (Add Pin::as_deref_mut to 1.84 relnotes) - #135294 (Make `bare-fn-no-impl-fn-ptr-99875` test less dependent on path width) - #135304 (Add tests cases from review of #132289) - #135308 (Make sure to walk into nested const blocks in `RegionResolutionVisitor`) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-10Rollup merge of #134855 - estebank:default-field-values-unstable-docs, ↵Matthias Krüger-0/+93
r=jieyouxu Add `default_field_values` entry to unstable book Tracking issue: https://github.com/rust-lang/rust/issues/132162 RFC: https://github.com/rust-lang/rfcs/blob/master/text/3681-default-field-values.md
2025-01-10Rollup merge of #133088 - the8472:randomize-me-harder, r=workingjubileeMatthias Krüger-0/+4
`-Zrandomize-layout` harder. `Foo<T> != Foo<U>` Tracking issue: #106764 Previously randomize-layout only used a deterministic shuffle based on the seed stored in an Adt's ReprOptions, meaning that `Foo<T>` and `Foo<U>` were shuffled by the same seed. This change adds a similar seed to each calculated LayoutData so that a struct can be randomized both based on the layout of its fields and its per-type seed. Primitives start with simple seed derived from some of their properties. Though some types can no longer be distinguished at that point, e.g. usize and u64 will still be treated the same.
2025-01-10Auto merge of #135297 - flip1995:clippy-subtree-update, r=matthiaskrgrbors-432/+2000
Clippy subtree update r? `@Manishearth`
2025-01-10also initialize Layout field in rust-analyzerThe 8472-0/+4
2025-01-10Remove two hir reexportsChayim Refael Friedman-23/+28
2025-01-10Do not compute `prettify_macro_expansion()` unless the "Inline macro" assist ↵Chayim Refael Friedman-7/+7
has actually been invoked And not just called to be listed. This was a major performance hang when repeatedly switching back-and-forth between a large `include!`d file (but there are others)..
2025-01-09Add `default_field_values` entry to unstable bookEsteban Küber-0/+93
2025-01-09ci: Remove incorrect use of `continue-on-error`Noah Lev-2/+1
This will cause the CI build to be marked successful even if the build failed. Instead, use `if: '!cancelled()'` to always save the cache (except when the job is cancelled), even if the linkcheck failed. See https://stackoverflow.com/a/58859404 for more.
2025-01-09CI: fix name of jobsJakub Beránek-1/+1
There is a difference between the `image` (the Dockerfile), the `name` of the job (which determines also its properties) and the `full_name`, which includes the `auto/try/pr` prefix.
2025-01-09re-add a warning for old master branch, but with much simpler logicbinarycat-0/+3
instead of calling into git or checking the modification time of files, simply print the warning if there is a very large number of "modified" files. also make the wording much softer, so false positives are less alarming.
2025-01-09Add an action to copy an element from the syntax tree viewGiga Bowser-0/+55
2025-01-09Fix another issue with fixup reversingChayim Refael Friedman-5/+85
We need to *remove* the whole subtree, but we don't advance `i` by this, because it hasn't gotten there yet (and never will).
2025-01-09Remove the old syntax tree viewerGiga Bowser-700/+1
2025-01-09Add a new and improved syntax tree viewerGiga Bowser-4/+759
2025-01-09Merge commit '19e305bb57a7595f2a8d81f521c0dd8bf854e739' into ↵Philipp Krones-432/+2000
clippy-subtree-update
2025-01-09bootstrap: `std::io::ErrorKind::CrossesDevices` is finally stablePavel Grigorenko-4/+1
2025-01-09bump rustc-perfRémy Rakic-0/+0
in particular to get the new benchmark error handling
2025-01-09Auto merge of #135286 - matthiaskrgr:rollup-sxuq1nh, r=matthiaskrgrbors-110/+227
Rollup of 3 pull requests Successful merges: - #134898 (Make it easier to run CI jobs locally) - #135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible) - #135261 (Account for identity substituted items in symbol mangling) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-09Fix parsing cargo test json output by making stdout and optional fieldduncan-1/+5
2025-01-09Rollup merge of #134898 - Kobzol:ci-python-script, r=MarcoIeniMatthias Krüger-110/+227
Make it easier to run CI jobs locally This PR extends the Python CI script to perform a poor man's CI-like execution of a given CI job locally. It's not perfect, but it's better than nothing. r? `@jieyouxu`
2025-01-09Auto merge of #135268 - pietroalbini:pa-bump-stage0, r=Mark-Simulacrumbors-467/+472
Master bootstrap update Part of the release process. r? `@Mark-Simulacrum`
2025-01-09Merge pull request #18889 from ChayimFriedman2/subtle-completionLukas Wirth-1/+2
fix: Fix actual token lookup in completion's `expand()`
2025-01-09Merge pull request #18880 from PrototypeNM1/extra-includesLukas Wirth-3/+67
Add config setting which allows adding additional include paths to the VFS.
2025-01-09Merge pull request #18861 from ChayimFriedman2/await-editionLukas Wirth-316/+480
fix: Make edition per-token, not per-file
2025-01-09Merge pull request #18885 from qjerome/refactor-cargo-cfgsLukas Wirth-14/+21
refactor: struct holding cargo cfgs settings
2025-01-09Only treat plain literal patterns as shortOli Scherer-12/+43
2025-01-09Merge pull request #18890 from Veykril/push-nwnozlyppvzoLukas Wirth-5/+7
minor: Fixup macro error kinds
2025-01-09minor: Fixup macro error kindsLukas Wirth-5/+7
2025-01-09Merge pull request #18887 from vishruth-thimmaiah/refactor_completions_testsLukas Wirth-448/+322
refactor test helpers within ide-completions
2025-01-09Rollup merge of #135256 - onur-ozkan:weird-mod-position, r=clubby789,jieyouxuMatthias Krüger-2/+2
Move `mod cargo` below the import statements Just caught that during a [bootstrap reading-club](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/.5BBRC.5D.20How.20do.20Steps.20and.20Paths.20work.3F) session.
2025-01-09Rollup merge of #135231 - Zalathar:test-step-notes, r=jieyouxuMatthias Krüger-0/+43
bootstrap: Add more comments to some of the test steps Some of the test steps have names that don't clearly indicate what they actually do. While there is ongoing experimental work to actually rename the steps (e.g. #135071), that's dependent on figuring out what the new names should actually be. In the meantime, we can still improve things by adding comments to help describe the steps, which will remain useful even after any renaming.
2025-01-09Rollup merge of #135221 - Urgau:replace-in-stable-book, r=pietroalbiniMatthias Krüger-1/+6
Include rustc and rustdoc book in replace-version-placeholder This PR includes the *(stable)* rustc and rustdoc books which might contain `CURRENT_RUSTC_VERSION` that should be replaced when branching beta. Include them so they are not forgotten. I didn't include any other folder or books as they don't strike me as relevant for it and might be problematic in the future if some of the submodules are turned into subtree, because we have places where we wouldn't want to replace them. cf. https://github.com/rust-lang/rust/pull/135163#issuecomment-2574694931 cc `@pietroalbini`
2025-01-09Rollup merge of #134609 - tbu-:pr_win7_gnu, r=davidtwcoMatthias Krüger-11/+66
Add new `{x86_64,i686}-win7-windows-gnu` targets These are in symmetry with `{x86_64,i686}-win7-windows-msvc`. > ## Tier 3 target policy > > At this tier, the Rust project provides no official support for a target, so we > place minimal requirements on the introduction of targets. > > A proposed new tier 3 target must be reviewed and approved by a member of the > compiler team based on these requirements. The reviewer may choose to gauge > broader compiler team consensus via a [Major Change Proposal (MCP)][https://forge.rust-lang.org/compiler/mcp.html]. > > A proposed target or target-specific patch that substantially changes code > shared with other targets (not just target-specific code) must be reviewed and > approved by the appropriate team for that shared code before acceptance. > > - 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.) This is me, `@tbu-` on github. > - 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. Consistent with `{x86_64,i686}-win7-windows-msvc`, see also #118150. > - 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. > - 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. AFAICT, it's the same legal situation as the tier 1 `{x86_64,i686}-pc-windows-gnu`. > - 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. Understood. > - 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. This target supports the whole libstd surface, since it's essentially reusing all of the x86_64-pc-windows-gnu target. Understood. > - 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. I tried to write some documentation on that. > - 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. > - 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. Understood. > - 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. > - 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.) Understood. > 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. > Understood. r? compiler-team
2025-01-09Make edition per-token, not per-fileChayim Refael Friedman-316/+480
More correctly, *also* per-token. Because as it turns out, while the top-level edition affects parsing (I think), the per-token edition affects escaping of identifiers/keywords.
2025-01-09Fix actual token lookup in completion's `expand()`Chayim Refael Friedman-1/+2
It should be left biased, not right biased, because when e.g. the use has typed `h` then requested completion, the `h` is what we want to find, not the next token (which might indeed be inside a macro call). I'm not sure why I wrote `right_biased()` to begin with (I remember I had a reason and not just "both should work"), I might've copied the code in `expand_and_analyze()` (which is wrong, because there it lookups on the speculative file, where right biased will always find the correct token and left biased not). This is still not perfect, because there might not be an identifier already typed then we might still end up in a macro call, but this is the best we can do.
2025-01-08minor: Use placeholders in `unwrap_return_type`Giga Bowser-2/+53