| Age | Commit message (Collapse) | Author | Lines |
|
refactor: Simplify by removing ? operator
|
|
`out.flush()` already returns a `io::Result<()>`, so there is no need for `?` operator and `Ok(())`
|
|
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.
|
|
|
|
chore: Remove legacy `SyntaxContextId` re-export
|
|
chore: Drop legacy salsa
|
|
|
|
|
|
fix: Fix missing `with_durability` calls
|
|
|
|
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
|
|
|
|
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`
|
|
|
|
|
|
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
|
|
Build GCC on CI with GCC, not Clang
It seems that GCC built with Clang misbehaves. I have tested that cg_gcc tests [pass](https://github.com/rust-lang/rust/actions/runs/13842365913/job/38732750617?pr=138451) on CI with a downloaded GCC that was built in this way.
Prerequisite for https://github.com/rust-lang/rust/pull/138395.
r? ```@ghost```
|
|
|
|
|
|
feat: for loop to while let assist
|
|
For macros that are implemented on the compiler, we do *not* mention the `-Zmacro-backtrace` flag. This includes `derive`s and standard macros.
|
|
|
|
|
|
|
|
fix: Avoid recursively debug printing crates
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 16 pull requests
Successful merges:
- #136001 (Overhaul examples for PermissionsExt)
- #136230 (Reword incorrect documentation about SocketAddr having varying layout)
- #136892 (Sync Fuchsia target spec with clang Fuchsia driver)
- #136911 (Add documentation URL to selected jobs)
- #137870 ( Improve HashMap docs for const and static initializers)
- #138179 (Add `src/tools/x` to the main workspace)
- #138389 (use `expect` instead of `allow`)
- #138396 (Enable metrics and verbose tests in PR CI)
- #138398 (atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance)
- #138432 (fix: remove the check of lld not supporting `@response-file)`
- #138434 (Visit `PatField` when collecting lint levels)
- #138441 (update error message)
- #138442 (EUV: fix place of deref pattern's interior's scrutinee)
- #138457 (Remove usage of legacy scheme paths on RedoxOS)
- #138461 (Remove an outdated line from a test comment)
- #138466 (Remove myself from libs review)
Failed merges:
- #138452 (Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
update error message
[`compile-pass` has since been renamed to `build-pass`](https://github.com/rust-lang/rust/issues/62277)
|
|
Add `src/tools/x` to the main workspace
The original reason to exclude it was so it could run before submodules
were initialized. However, those have all been converted to subtrees
now, so the entire workspace is always ready to go.
I've also alphabetized the workspace members, as it was an untidy mess. :broom:
|
|
|
|
|
|
Allow more top-down inlining for single-BB callees
This means that things like `<usize as Step>::forward_unchecked` and `<PartialOrd for f32>::le` will inline even if
we've already done a bunch of inlining to find the calls to them.
Fixes #138136
~~Draft as it's built atop #138135, which adds a mir-opt test that's a nice demonstration of this. To see just this change, look at <https://github.com/rust-lang/rust/pull/138157/commits/48f63e3be552605c2933056b77bf23a326757f92>~~ Rebased to be just the inlining change, as the other existing tests show it great.
|
|
So that follow-up CI commands can proceed normally. It will also avoid overwriting `config.toml` when running opt-dist tests locally.
|
|
|
|
The original reason to exclude it was so it could run before submodules
were initialized. However, those have all been converted to subtrees
now, so the entire workspace is always ready to go.
|
|
|
|
|
|
see https://github.com/servo/html5ever/pull/548
|
|
minor interpreter cleanups
- remove the `eval_inline_asm` hook that `@saethlin` added; the usage never materialized and he agreed with removing it
- I tried merging `init_alloc_extra` and `adjust_global_allocation` and it didn't work; leave a comment as to why. Also, make the allocation code path a bit more clear by renaming `init_alloc_extra` to `init_local_allocation`.
r? `@oli-obk`
|
|
Update mdbook to 0.4.47
This updates mdbook to bring in an important fix that enables the `output.html.hash-files` option to deal with network caching.
Changelog:
https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0446
https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0447
|
|
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
|
|
Rollup of 6 pull requests
Successful merges:
- #137816 (attempt to support `BinaryFormat::Xcoff` in `naked_asm!`)
- #138109 (make precise capturing args in rustdoc Json typed)
- #138343 (Enable `f16` tests for `powf`)
- #138356 (bump libc to 0.2.171 to fix xous)
- #138371 (Update compiletest's `has_asm_support` to match rustc)
- #138404 (Cleanup sysroot locating a bit)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Update compiletest's `has_asm_support` to match rustc
The list of `ASM_SUPPORTED_ARCHS` was missing a few from the compiler's
actual stable list.
|
|
remove deprecated tool `rls`
This tool has been deprecated for two years and now it only gives warning without doing anything useful.
Zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/excluding.20rls.20from.20the.20release
try-job: x86_64-gnu-distcheck
|
|
|