about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-01-01CleanupLukas Wirth-68/+46
2025-01-01Revamp auto-import exclude configLukas Wirth-55/+169
2025-01-01Simplify completion config path resolutionsLukas Wirth-94/+49
2025-01-01Reduce the default autoimport exclusion listLukas Wirth-186/+90
2025-01-01Merge pull request #18809 from Veykril/push-ktwrzsmzlplwLukas Wirth-9/+3
internal: Do not render closure ids in hover messages
2025-01-01Allow flyimporting excluded trait items if there is an exact match in the nameChayim Refael Friedman-3/+51
I.e. with `fn foo()`, don't complete at `x.fo|`, but complete (with imports) for `x.foo|`, since this is less likely to have false positives. I opted to only do that for flyimport, even though for basic imports there can also be snippet completion (completing the params list for a method), since this is less universally applicable and seems not so useful.
2025-01-01Allow excluding specific traits from completionChayim Refael Friedman-82/+1011
To be accurate, only their methods are excluded, the trait themselves are still available. I also excluded a bunch of std traits by default. Some less opinionated, like `AsRef`, which should never be used directly except in generic scenarios (and won't be excluded there), some more opinionated, like the ops traits, which I know some users sometimes want to use directly. Either way it's configurable. It should be pretty easy to extend support to excluding only specific methods, but I didn't do that currently. Traits configured to be excluded are resolved in each completion request from scratch. If this proves too expensive, it is easy enough to cache them in the DB.
2025-01-01Merge pull request #18757 from roife/fix-17812Lukas Wirth-97/+540
feat: support updating snapshot tests with codelens/hovering/runnables
2025-01-01internal: Do not render closure ids in hover messagesLukas Wirth-9/+3
They are not useful
2025-01-01Auto merge of #134992 - Zalathar:rollup-pldy5w6, r=Zalatharbors-75/+65
Rollup of 6 pull requests Successful merges: - #131439 (Remove allowing static_mut_refs lint) - #133292 (E0277: suggest dereferencing function arguments in more cases) - #134877 (add suggestion for wrongly ordered format parameters) - #134945 (Some small nits to the borrowck suggestions for mutating a map through index) - #134950 (bootstrap: Overhaul and simplify the `tool_check_step!` macro) - #134979 (Provide structured suggestion for `impl Default` of type where all fields have defaults) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-01Rollup merge of #134950 - Zalathar:tool-check-step, r=jieyouxuStuart Cook-75/+65
bootstrap: Overhaul and simplify the `tool_check_step!` macro Main changes: - Pull most of `run` out of the macro and into a regular helper function - Reduce the number of redundant/unnecessary macro arguments - Switch to struct-like syntax so that optional arguments are clearer, and so that rustfmt is happy ~~The one “functional” change is that the `-check.stamp` files now get their name from the final path segment, instead of the struct name; in practice this means that they now contain more hyphens in some cases. As far as I'm aware, the exact filename doesn't matter so this should be fine.~~ (that change has been removed from this PR)
2025-01-01Auto merge of #134926 - rustbot:docs-update, r=ehussbors-0/+0
Update books ## rust-lang/book 13 commits in ad2011d3bcad9f152d034faf7635c22506839d58..04d06dfe541607e6419f3d028c3f9b245f3be4d9 2024-12-20 22:44:11 UTC to 2024-12-16 18:18:21 UTC - Update section name (rust-lang/book#4175) - Update text to reflect the change from '&str' to 'char' in example (rust-lang/book#4173) - Update figure number in text and file name (rust-lang/book#4172) - Fix chapter number (rust-lang/book#4171) - Delete unused reference (rust-lang/book#4170) - Remove orphaned half-sentence (rust-lang/book#4169) - Fix chapter number (rust-lang/book#4168) - A better phrasing for generic methods. (rust-lang/book#3428) - Fix minor grammatical error (rust-lang/book#4098) - Update appendix-06-translation.md to add another Chinese translation. (rust-lang/book#3608) - Change Korean translation repo to newer (rust-lang/book#3625) - Clarify/improve readability in Ch. 02 discussion of `Result` variants (rust-lang/book#4167) - Ch. 20: conclude §01 with a reference to the Rustonomicon (rust-lang/book#4166) ## rust-lang/nomicon 1 commits in 97e84a38c94bf9362b11284c20b2cb4adaa1e868..7ef05b9777c94836bc92f50f23e6e00981521a89 2024-12-30 10:38:10 UTC to 2024-12-30 10:38:10 UTC - Fix URL fragment to MutexGuard's negative impl of Send (rust-lang/nomicon#472) ## rust-lang/reference 3 commits in 9f41bc11342d46544ae0732caf14ec0bcaf27376..acd6794e712d5e2ef6f5c84fb95688d32a69b816 2024-12-18 23:04:30 +0000 to 2024-12-30 22:12:57 +0000 - Revert "`coverage` attribute" (rust-lang/reference#1706) - Document Rust 2024 match ergonomics reservations (rust-lang/reference#1702) - Add documentation for `#[diagnostic::do_not_recommend]` (rust-lang/reference#1663) ## rust-lang/edition-guide 5 commits in bc4ce51e1d4dacb9350a92e95f6159a42de2f8c6..d56e0f3a0656b7702ca466d4b191e16c28262b82 2024-12-18 05:34:59 +0000 to 2024-12-31 20:04:52 +0000 - 2024: Document rustfmt overflow_delimited_expr (rust-lang/edition-guide#352) - 2024: Document rustfmt fixes (rust-lang/edition-guide#351) - Update the transitioning steps (rust-lang/edition-guide#350) - Revert "2024: Assignment operator RHS indentation" (rust-lang/edition-guide#343) - Revert "2024: Add chapter on single-line `where` clauses" (rust-lang/edition-guide#344) ## rust-lang/rust-by-example 1 commits in 76406337f4131253443aea0ed7e7f451b464117c..093397535b48ae13ec76bc526b7e6eb8c096a85c 2024-12-18 17:29:56 UTC to 2024-12-18 17:29:56 UTC - Mention that you're not allowed to partially move Drop types (rust-lang/rust-by-example#1902) ## rust-lang/rustc-dev-guide 18 commits in 7f7ba48f04abc2ad25e52f30b5e2bffa286b019f..ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e 2024-12-30 09:22:22 UTC to 2024-12-17 17:00:38 UTC - Opt into, rather than out of, linkcheck (rust-lang/rustc-dev-guide#2180) - Remove stale implementation details of coverage instrumentation (rust-lang/rustc-dev-guide#2179) - Remove properly tracked config file from .gitignore & add support for skipping of link-checking (rust-lang/rustc-dev-guide#2023) - Add a couple of linkcheck exceptions: (rust-lang/rustc-dev-guide#2120) - Add missing link for [Node] (rust-lang/rustc-dev-guide#2177) - Fix 403 received for HEAD request (rust-lang/rustc-dev-guide#2176) - Start using mdbook-linkcheck2 (rust-lang/rustc-dev-guide#2103) - Document `x test --no-capture` (rust-lang/rustc-dev-guide#2174) - Remove the `-test` suffix from normalize directives (rust-lang/rustc-dev-guide#2172) - Rework the driver docs (rust-lang/rustc-dev-guide#2162) - Document `forbid-output` for UI tests (rust-lang/rustc-dev-guide#2171) - completions: Zsh is now supported (rust-lang/rustc-dev-guide#2173) - region-outlives propagation (rust-lang/rustc-dev-guide#2169) - compiletest: Document the `--debugger` flag (rust-lang/rustc-dev-guide#2170) - document the public ci dashboard (rust-lang/rustc-dev-guide#2167) - Fix trivial typo of "query-fied" (rust-lang/rustc-dev-guide#2165) - Fix some typos (rust-lang/rustc-dev-guide#2166) - Add suggestion for `--keep-stage 0` (rust-lang/rustc-dev-guide#2164)
2024-12-31cover guard patterns in clippy lintsMax Niederman-5/+21
2025-01-01Auto merge of #134988 - tgross35:rollup-s59bx7c, r=tgross35bors-55/+7
Rollup of 8 pull requests Successful merges: - #132474 (Add more mailmap entries) - #133486 (borrowck diagnostics: make `add_move_error_suggestions` use the HIR rather than `SourceMap`) - #134861 (Add GUI test for item info elements color) - #134968 (Print how to rebless Python formatting in tidy) - #134971 (chore: fix typos) - #134972 (add .mailmap entry for myself) - #134974 (Revert #119515 single line where clause style guide) - #134975 (Revert style guide rhs break) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-31add guard patterns to HIR and implement loweringMax Niederman-0/+1
2024-12-31Rollup merge of #134975 - ehuss:revert-style-guide-rhs-break, r=compiler-errorsTrevor Gross-28/+0
Revert style guide rhs break This reverts https://github.com/rust-lang/rust/pull/132369 and https://github.com/rust-lang/rust/pull/119838. The style-guide change for indentation of rhs was not implemented in time for the 2024 style edition. See tracking issue https://github.com/rust-lang/rust/issues/132380. cc #134974 for the other style guide change in 2024. r? ``@compiler-errors``
2024-12-31Rollup merge of #134974 - ehuss:revert-single-line-where, r=compiler-errorsTrevor Gross-27/+4
Revert #119515 single line where clause style guide This did not get implemented for the style edition in 2024, so this PR removes it from the documentation. See tracking issue https://github.com/rust-lang/rust/issues/132381. This can be added back in the next edition if it gets implemented. I'm a little unclear on what the style team intends for how future changes are documented. For example, the current style-guide documented behavior that rustfmt does not support. I'm not sure who the audience for this document is, or how this is intended to stay in sync with rustfmt. For example, if I read this and assume this is how it is supposed to work, and then rustfmt breaks that, it seems like that is confusing. Similarly, if I'm staying on an older edition, this documentation would be incorrect for my crate. Perhaps changes like this could be "teed-up" in a PR, but not merged until the edition is stabilized (similar to how the reference works)? And include notes for parts that are edition-specific (so if I am using an older edition, I can see that something is different). In general, I'm a little confused on how this is intended to work. Reverts: - https://github.com/rust-lang/rust/pull/119515
2024-12-31Rollup merge of #134968 - Kobzol:tidy-bless-log, r=NoratriebTrevor Gross-0/+3
Print how to rebless Python formatting in tidy Suggested [here](https://github.com/rust-lang/rust/pull/134964#discussion_r1900124882). r? ``@Noratrieb``
2024-12-31Update cargoWeihang Lo-0/+0
2024-12-31Update reference, edition-guideEric Huss-0/+0
2024-12-31Revert "Rollup merge of #119838 - joshtriplett:style-guide-binop-indent, ↵Eric Huss-33/+0
r=compiler-errors" This reverts commit 36287830a22897fc05f33f615291df7efe8cad20, reversing changes made to 31026b7fe3e510a646eddeda838d1f0859f892e7.
2024-12-31Revert "Rollup merge of #132369 - ↵Eric Huss-6/+11
joshtriplett:style-guide-binop-heuristic-assignment-only, r=calebcartwright" This reverts commit 348d28052b1717f152b04725492c256c3409a361, reversing changes made to 526c67f37be44688345aec14f7b1c5926f4a59a7.
2024-12-31Revert "Rollup merge of #119515 - ↵Eric Huss-27/+4
joshtriplett:style-guide-gat-where-clause-same-line, r=compiler-errors" This reverts commit 4d1cce9de5af0e74169c6508d44c99b546d7abde, reversing changes made to 030a12ce2b1ee42f2d8837b1b500fd9cf12ea191.
2024-12-31Merge pull request #18797 from profetia/issue10583Chayim Refael Friedman-34/+758
Fix replace-if-let-with-match generates non-exhausive match
2024-12-31Add back optimizationslucasholten-4/+8
2024-12-31Add back tests removed in #18080lucasholten-0/+19629
2024-12-31Add back crate graph deduplicationlucasholten-1/+4
2024-12-31Remove CARGO_RUSTC_CURRENT_DIRlucasholten-16/+4
2024-12-31Print how to rebless Python formatting in tidyJakub Beránek-0/+3
2024-12-31Fix replace-if-let-with-match generates non-exhausive matchyanglsh-44/+411
2024-12-31Use `id` attribute for `<a>` tags instead of deprecated `name` attribute (#2184)Max Heller-27/+27
2024-12-31Base relative cargo configs onto the manifestLukas Wirth-14/+35
This is not correct, but should be equivalent in most cases
2024-12-31add test coverage for `helpers::is_path_in_submodule`onur-ozkan-2/+17
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-31fix: Populate cargo config env vars for cratesLukas Wirth-83/+43
2024-12-31Rollup merge of #134918 - ChrisDenton:issue-70093, r=jieyouxuMatthias Krüger-2/+0
Windows: Enable issue 70093 link tests Tracking issue for `-Z link-native-libraries`: #134948 Tracking issue for `-Z link-directives`: #134947 `-Zlink-native-libraries=no` and `-Zlink-directives=no` *should* work on Windows, at least for msvc. The fly in ointment is that `default-linker-libraries` doesn't. On unixy platforms rustc calls another compiler which in turn calls the linker along with the default libraries. On MSVC rustc calls the linker directly therefore it would need to be the one to implement `default-linker-libraries`. Except it doesn't so we workaround that in the test by using `-C link-arg` to talk to the linker.
2024-12-31Rollup merge of #134610 - tbu-:pr_doc_target_fmt, r=NoratriebMatthias Krüger-8/+8
Format `build.toml` consistently in platform support docs Also fix compiler team name in target tier docs.
2024-12-31handle submodules automatically on `doc` stepsonur-ozkan-30/+23
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-31Merge pull request #18802 from roife/fix-18800Lukas Wirth-2/+1
fix: incorrect file_id used for ranges in outgoing calls
2024-12-31Merge pull request #18805 from Veykril/push-pzurvxvoolxsLukas Wirth-18/+12
internal: Implement `<RaSpanServer as SourceFile>::eq`
2024-12-31Reformat Python fileJakub Beránek-2/+12
2024-12-31Enable Python formatting checks in tidy on CIJakub Beránek-1/+1
2024-12-31fix: incorrect file_id used for ranges in outgoing callsroife-2/+1
2024-12-31Implement `<RaSpanServer as SourceFile>::eq`Lukas Wirth-9/+9
2024-12-31Remove recursion_limit special casing in testsLukas Wirth-9/+3
2024-12-31Use struct-like syntax in `tool_check_step!`Zalathar-15/+18
This tricks rustfmt into formatting the macro arguments as expressions, instead of giving up and ignoring them.
2024-12-31Make `tool_check_step!` always assume `SourceType::InTree`Zalathar-21/+23
All of the tools that use this macro are currently in-tree, so support for specifying a `SourceType` was not meaningfully used. It can potentially be re-added in the future if needed.
2024-12-31Infer tool-check-step display name from the last path componentZalathar-24/+13
2024-12-31Move most of the `Step::run` impl out of `tool_check_step!`Zalathar-45/+41
Ordinary code is much easier to work with than macro-generated code.
2024-12-31Merge pull request #18758 from mgsloan/scip-unique-symbolsLukas Wirth-323/+618
Improve SCIP symbols
2024-12-31Rollup merge of #134857 - compiler-errors:rustdoc-unsafe-binders, r=camelidJacob Pratt-12/+49
Unsafe binder support in rustdoc Adds rustdoc support for unsafe binder types: `unsafe<'a> Foo<'a>`. Doesn't add json support yet. Tracking: * https://github.com/rust-lang/rust/issues/130516