about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-03-16Rollup merge of #138465 - klensy:linkchecker-b, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-13/+13
linkchecker: bump html5ever Bumping html5ever to 0.28 required small refactoring, see https://github.com/servo/html5ever/pull/548
2025-03-16Rollup merge of #138323 - kpreid:offset-of-doc, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-0/+59
Expand and organize `offset_of!` documentation. * Give example of how to get the offset of an unsized tail field (prompted by discussion <https://github.com/rust-lang/rust/pull/133055#discussion_r1986422206>). * Specify the return type. * Add section headings. * Reduce “Visibility is respected…”, to a single sentence. * Move `offset_of_enum` documentation to unstable book (with link to it). * Add `offset_of_slice` documentation in unstable book. r? Mark-Simulacrum
2025-03-16Rollup merge of #137968 - dingxiangfei2009:patch-1, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-2/+2
Properly escape regexes in Python scripts According to the [Python 3.12 release note](https://docs.python.org/3/whatsnew/3.12.html#other-language-changes) string literals containing typical invalid escape sequences like `"\d"` are now rejected. There seems to remain only two instances of escape sequences in regex. This change will allow us to work with newer Python interpreter.
2025-03-16Rollup merge of #137956 - compiler-errors:rtn-rustdoc, r=fmease许杰友 Jieyou Xu (Joe)-31/+59
Add RTN support to rustdoc This adds support to rustdoc and rustdoc-json for rendering `(..)` RTN (return type notation) style generics. --- Cleaning `rustc_middle::ty::Ty` is not correct still, though, and ends up rendering a function like: ```rust pub fn foreign<T: Foreign<bar(..): Send>>() where <T as Foreign>::bar(..): 'static, T::bar(..): Sync, ``` Into this: ```rust pub fn foreign<T>() where T: Foreign, impl Future<Output = ()>: Send + 'static + Sync, ``` This is because `clean_middle_ty` doesn't actually have sufficient context about whether the RPITIT is in its "defining scope" or not, so we don't know if the type was originally written like `-> impl Trait` or with RTN like `T::method(..)`. Partially addresses #123996 (i.e., HIR side, not middle::ty one)
2025-03-16Rollup merge of #137147 - ↵许杰友 Jieyou Xu (Joe)-16/+42
Shourya742:2025-02-16-support-exclude-in-config.toml, r=onur-ozkan Add exclude to config.toml Closes: https://github.com/rust-lang/rust/issues/35678 r? `@onur-ozkan` try-job: x86_64-msvc-2
2025-03-15display varargs in completion detailAndy Russell-1/+58
2025-03-15Add view iconsBenjaminBrienen-0/+2
2025-03-15cargo fmtBenjaminBrienen-3/+6
2025-03-15fix temporary value dropped while borrowedBenjaminBrienen-2/+2
2025-03-15cargo xtask tidyBenjaminBrienen-2/+2
2025-03-15cargo fmtBenjaminBrienen-2430/+2182
2025-03-15fix clippy::doc_overindented_list_itemsBenjaminBrienen-14/+13
2025-03-15cargo clippy --fixBenjaminBrienen-13/+13
2025-03-15edition = "2024"BenjaminBrienen-9/+9
2025-03-15rust-version = "1.85"BenjaminBrienen-2/+2
2025-03-15Fix 2024 syntax errorsBenjaminBrienen-28/+35
2025-03-15Auto merge of #137665 - Kobzol:update-sccache, r=marcoienibors-103/+17
Update sccache to 0.10.0 This time, does it also for Windows and macOS. This unifies the sccache version across all OSes that we use. r? `@ghost` try-job: dist-aarch64-apple try-job: dist-x86_64-apple try-job: dist-x86_64-msvc try-job: dist-x86_64-msvc-alt try-job: dist-i686-msvc try-job: dist-aarch64-msvc try-job: dist-x86_64-linux try-job: dist-x86_64-netbsd
2025-03-15Merge pull request #19370 from DriedYellowPeach/refactor/io-resultChayim Refael Friedman-2/+1
refactor: Simplify by removing ? operator
2025-03-15refactor: Simplify by removing ? operatorNeil-2/+1
`out.flush()` already returns a `io::Result<()>`, so there is no need for `?` operator and `Ok(())`
2025-03-15Do not error for actions with no data to resolveKirill Bulatov-1/+1
Same as the other resolve code handlers in the same file. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#version_3_17_0 does not forbid resolving with no data, so instead of erroring, just consider such items resolved already.
2025-03-15Add RTN support to rustdocMichael Goulet-31/+59
2025-03-15Merge pull request #19366 from Veykril/push-mkunlxkysssrLukas Wirth-228/+164
chore: Remove legacy `SyntaxContextId` re-export
2025-03-15Merge pull request #19367 from Veykril/push-ryowkxkntnpoLukas Wirth-10115/+9
chore: Drop legacy salsa
2025-03-15chore: Remove legacy `SyntaxContextId` re-exportLukas Wirth-228/+164
2025-03-15chore: Drop legacy salsaLukas Wirth-10115/+9
2025-03-15Merge pull request #19364 from Veykril/push-uonyorwwzpzxLukas Wirth-3/+8
fix: Fix missing `with_durability` calls
2025-03-15fix: Fix missing `with_durability` callsLukas Wirth-3/+8
2025-03-15refactor `notable_traits_button` to use iterator combinators instead of for loopYotam Ofek-21/+11
2025-03-15Cleanup `LangString::parse`Yotam Ofek-44/+41
Flatten some `if`s into match patterns Use `str::strip_prefix` instead of `starts_with`+indexing Avoid redundant tests for `extra.is_some()`
2025-03-15Only use `DIST_TRY_BUILD` for try jobs that were not selected explicitlyJakub Beránek-19/+24
2025-03-15Reformat codeJakub Beránek-7/+10
2025-03-15Do not error out on missing parent metricsJakub Beránek-5/+18
2025-03-15Put test differences into a `<details>` section and add better explanation ↵Jakub Beránek-34/+56
of the post merge report
2025-03-15Add a helper function for outputting detailsJakub Beránek-9/+18
2025-03-15Add bootstrap stage to test namesJakub Beránek-4/+11
2025-03-15Print test diffs into GitHub summaryJakub Beránek-6/+35
So that we can also observe them for try builds, before merging a PR.
2025-03-15Use first-level heading for test differences headerJakub Beránek-1/+1
2025-03-15Print number of found test diffsJakub Beránek-0/+1
2025-03-15Refactor metrics and analysis in citool to distinguish them betterJakub Beránek-219/+196
2025-03-15add some copy-paste goodnessTshepang Mbambo-3/+3
2025-03-15make 'mdbook test --chapter "Running tests"' passTshepang Mbambo-1/+1
2025-03-15those should not get shell highlightingTshepang Mbambo-24/+24
2025-03-15Auto merge of #138464 - compiler-errors:less-type-ir, r=lcnrbors-3/+2
Use `rustc_type_ir` directly less in the codebase cc https://github.com/rust-lang/rust/issues/138449 This is a somewhat opinionated bundle of changes that will make working on https://github.com/rust-lang/rust/issues/138449 more easy, since it cuts out the bulk of the changes that would be necessitated by the lint. Namely: 1. Fold `rustc_middle::ty::fold` and `rustc_middle::ty::visit` into `rustc_middle::ty`. This is because we already reexport some parts of these modules into `rustc_middle::ty`, and there's really no benefit from namespacing away the rest of these modules's functionality given how important folding and visiting is to the type layer. 2. Rename `{Decodable,Encodable}_Generic` to `{Decodable,Encodable}_NoContext`[^why], change it to be "perfect derive" (`synstructure::AddBounds::Fields`), use it throughout `rustc_type_ir` instead of `TyEncodable`/`TyDecodable`. 3. Make `TyEncodable` and `TyDecodable` derives use `::rustc_middle::ty::codec::TyEncoder` (etc) for its generated paths, and move the `rustc_type_ir::codec` module back to `rustc_middle::ty::codec` :tada:. 4. Stop using `rustc_type_ir` in crates that aren't "fundamental" to the type system, namely middle/infer/trait-selection. This amounted mostly to changing imports from `use rustc_type_ir::...` to `use rustc_middle::ty::...`, but also this means that we can't glob import `TyKind::*` since the reexport into `rustc_middle::ty::TyKind` is a type alias. Instead, use the prefixed variants like `ty::Str` everywhere -- IMO this is a good change, since it makes it more regularized with most of the rest of the compiler. [^why]: `_NoContext` is the name for derive macros with no additional generic bounds and which do "perfect derive" by generating bounds based on field types. See `HashStable_NoContext`. I'm happy to cut out some of these changes into separate PRs to make landing it a bit easier, though I don't expect to have much trouble with bitrot. r? lcnr
2025-03-15Print metrics postprocessing to stdoutJakub Beránek-28/+12
This allows the code to be simplified a little bit.
2025-03-15Fold visit into tyMichael Goulet-1/+1
2025-03-15Squash fold into tyMichael Goulet-2/+1
2025-03-15Auto merge of #138379 - estebank:macro-backtrace-note, r=petrochenkovbors-24/+0
Do not suggest using `-Zmacro-backtrace` for builtin macros For macros that are implemented on the compiler, or that are annotated with `rustc_diagnostic_item`, which have arbitrary implementations from the point of view of the user and might as well be intrinsics, we do *not* mention the `-Zmacro-backtrace` flag. This includes `derive`s and standard macros like `panic!` and `format!`. This PR adds a field to every `Span`'s `ExpnData` stating whether it comes from a builtin macro. This is determined by the macro being annotated with either `#[rustc_builtin_macro]` or `#[rustc_diagnostic_item]`. An alternative to using these attributes that already exist for other uses would be to introduce another attribute like `#[rustc_no_backtrace]` to have finer control on which macros are affected (for example, an error within `vec![]` now doesn't mention the backtrace, but one could make the case that it should). Ideally, instead of carrying this information in the `ExpnData` we'd instead try to query the `DefId` of the macro (that is already stored) to see if it is annotated in some way, but we do not have access to the `TyCtxt` from `rustc_errors`. r? `@petrochenkov`
2025-03-15Merge from rustcThe Miri Cronjob Bot-57/+80
2025-03-15Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-03-15Auto merge of #138523 - fmease:rollup-j2j5h59, r=fmeasebors-139/+238
Rollup of 9 pull requests Successful merges: - #138056 (rustc_target: Add target features for LoongArch v1.1) - #138451 (Build GCC on CI with GCC, not Clang) - #138454 (Improve post-merge workflow) - #138460 (Pass struct field HirId when check_expr_struct_fields) - #138474 (Refactor is_snake_case.) - #138482 (Fix HIR printing of parameters) - #138507 (Mirror NetBSD sources) - #138511 (Make `Parser::parse_expr_cond` public) - #138518 (Fix typo in hir lowering lint diag) r? `@ghost` `@rustbot` modify labels: rollup