| Age | Commit message (Collapse) | Author | Lines |
|
Migrate `expand_glob_import` assist to use `SyntaxEditor`
|
|
Hmikihiro/remove_ted_from_replace_named_generic_with_impl
remove `ted` from replace_named_generic_with_impl.rs
|
|
remove `add_attr()` from edit_in_place.rs because it use `ted`.
|
|
|
|
- `same_path` can just be a `bool`.
- `expected` and `found` are only needed inside the block.
- Neaten a comment.
|
|
Three of them are named `AbsolutePathPrinter`, which is confusing, so
give those names that better indicate how they are used. And then there
is `SymbolPrinter` and `SymbolMangler`, which are renamed as
`LegacySymbolMangler` and `V0SymbolMangler`, better indicating their
similarity.
|
|
The use of `print_value_path` means the value namespace is always used
and the `guess_def_namespace` call is unnecessary. This commit removes
the `guess_def_namespace` call and hard-codes `ValueNS`. It also changes
the `print_value_path` to `print_def_path` for consistency with
`def_path_str_with_args`.
|
|
madhav-madhusoodanan/intrinsic-test-intrinsictype-cleanup
`intrinsic-test`: Cleaning the `IntrinsicType` struct and related functionalities
|
|
Slim down compile time artifact progress reports
|
|
Make sure that compiler and linker don't optimize the section's contents
away by adding the global holding the data to "llvm.used". The volatile
load in the main shim is retained because "llvm.used", which translates
to SHF_GNU_RETAIN on ELF targets, requires a reasonably recent linker;
emitting the volatile load ensures compatibility with older linkers, at
least when libstd is used.
Pretty printers in dylib dependencies are now emitted by the main crate
instead of the dylib; apart from matching how rlibs are handled, this
approach has the advantage that `omit_gdb_pretty_printer_section` keeps
working with dylib dependencies.
|
|
Make sure that compiler and linker don't optimize the section's contents
away by adding the global holding the data to "llvm.used". The volatile
load in the main shim is retained because "llvm.used", which translates
to SHF_GNU_RETAIN on ELF targets, requires a reasonably recent linker;
emitting the volatile load ensures compatibility with older linkers, at
least when libstd is used.
Pretty printers in dylib dependencies are now emitted by the main crate
instead of the dylib; apart from matching how rlibs are handled, this
approach has the advantage that `omit_gdb_pretty_printer_section` keeps
working with dylib dependencies.
|
|
|
|
|
|
|
|
Changes: 1. Removed `from_c` from the IntrinsicType definition. 2. Moved
the `from_c` arm-specific definition to an ArmIntrinsicType-specific
impl block
|
|
|
|
|
|
|
|
|
|
Rollup of 17 pull requests
Successful merges:
- rust-lang/rust#144467 (rustdoc template font links only emit `crossorigin` when needed)
- rust-lang/rust#144548 (Rehome 21 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`)
- rust-lang/rust#144741 (fix: Error on illegal `[const]`s inside blocks within legal positions)
- rust-lang/rust#144776 (`Printer` cleanups)
- rust-lang/rust#144779 (Implement debugging output of the bootstrap Step graph into a DOT file)
- rust-lang/rust#144813 (Add a tidy check to prevent adding UI tests directly under `tests/ui/`)
- rust-lang/rust#144817 (Properly reject tail calls to `&FnPtr` or `&FnDef`)
- rust-lang/rust#144852 (Rename `rust_panic_without_hook` to `resume_unwind` )
- rust-lang/rust#144866 (Remove `SHOULD_EMIT_LINTS` in favor of `should_emit`)
- rust-lang/rust#144867 (Use `as_array` in PartialEq for arrays)
- rust-lang/rust#144872 (Document Poisoning in `LazyCell` and `LazyLock`)
- rust-lang/rust#144877 (coverage: Various small cleanups)
- rust-lang/rust#144887 (`rust-analyzer` subtree update)
- rust-lang/rust#144890 (Add `InterpCx::project_fields`)
- rust-lang/rust#144894 (Delete `tests/ui/threads-sendsync/tcp-stress.rs`)
- rust-lang/rust#144905 (rustc-dev-guide subtree update)
- rust-lang/rust#144920 (Dont print arg span in MIR dump for tail call)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Dont print arg span in MIR dump for tail call
r? WaffleLapkin
This makes the MIR dump for tail call terminators consistent w/ regular calls.
|
|
rustc-dev-guide subtree update
Subtree update of `rustc-dev-guide` to https://github.com/rust-lang/rustc-dev-guide/commit/1263fc23672325c1d2e3d6bba8a7dd89e986245c.
Created using https://github.com/rust-lang/josh-sync.
r? ``@ghost``
|
|
Delete `tests/ui/threads-sendsync/tcp-stress.rs`
This stress test was originally introduced in 65cca4bd3fa0abe1000662014b3e3ea1420728f5 to detect a UAF in `libuv` (see rust-lang/rust#12823), but we no longer use `libuv`, so remove this test as it no longer serves its original purpose, and is causing flaky timeout failures.
Closes rust-lang/rust#144878 (by removing the test).
r? libs
|
|
Add `InterpCx::project_fields`
I was hoping for a much bigger improvement and this is lukewarm at best ^^'
Still, I think this makes sense.
|
|
`rust-analyzer` subtree update
Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/8d75311400a108d7ffe17dc9c38182c566952e6e.
Created using https://github.com/rust-lang/josh-sync.
r? `@ghost`
|
|
coverage: Various small cleanups
This PR is a collection of small coverage-related changes that I accumulated while working towards other coverage improvements.
Each change should hopefully be fairly straightforward.
|
|
Document Poisoning in `LazyCell` and `LazyLock`
Currently, there is no documentation of poisoning behavior in either `LazyCell` or `LazyLock`, even though both of them can be observed as poisoned by users.
`LazyCell` [plagyround example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=9cf38b8dc56db100848f54085c2c697d)
`LazyLock` [playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=f1cd6f9fe16636e347ebb695a0ce30c0)
# Open Questions
- [x] Is it worth making the implementation of `LazyLock` more complicated to ensure that the the panic message is `"LazyLock instance has previously been poisoned"` instead of `"Once instance has previously been poisoned"`? See the `LazyLock` playground link above for more context.
- [x] Does it make sense to move `LazyLock` into the `poison` module? It is certainly a poison-able type, but at the same time it is slightly different from the 4 other types currently in the `poison` module in that it is unrecoverable. I think this is more of a libs-api question.
``@rustbot`` label +T-libs-api
Please let me know if these open questions deserve a separate issue / PR!
|
|
Use `as_array` in PartialEq for arrays
Now that `as_array` exists we might as well use it here, since it's a bit more convenient than getting the correct type out of `try_into`.
|
|
Remove `SHOULD_EMIT_LINTS` in favor of `should_emit`
r? ``@jdonszelmann``
|
|
Rename `rust_panic_without_hook` to `resume_unwind`
part of https://github.com/rust-lang/rust/issues/116005
r? libs
|
|
Properly reject tail calls to `&FnPtr` or `&FnDef`
Fixes rust-lang/rust#144795
|
|
Add a tidy check to prevent adding UI tests directly under `tests/ui/`
This PR implements https://github.com/rust-lang/compiler-team/issues/902.
Only the last commit (adding the new check) is functional; earlier commits are just small drive-by changes to make the other ui/ui-fulldeps checks more logically contained.
r? ```@Kobzol``` (or compiler)
|
|
Implement debugging output of the bootstrap Step graph into a DOT file
There are already a bunch of ways how we can debug bootstrap, so why not add one more =D (ideally I'd like to consolidate these approaches somewhat, ```@Shourya742``` is looking into that, but I think that this specific debugging tool is orthogonal to the rest of them, and is quite useful).
This PR adds the option to render the bootstrap step graph into the DOT format, in order to understand what steps were executed, along with their fields (`Debug` output).
Here you can see an example of the generated DOT files for the `BOOTSTRAP_TRACING=1 ./x build compiler --stage 2 --dry-run` command on x64 Linux. One is with cached deps (what this PR does), the other one without.
[bootstrap-dot.zip](https://github.com/user-attachments/files/21548679/bootstrap-dot.zip)
Visual example:
<img width="1899" height="445" alt="image" src="https://github.com/user-attachments/assets/ae40e6d2-0ea8-48bb-b77e-6b21700b95ee" />
r? ```@jieyouxu```
|
|
`Printer` cleanups
The trait `Printer` is implemented by six types, and the sub-trait `PrettyPrinter` is implemented by three of those types. The traits and the impls are complex and a bit of a mess. This PR starts to clean them up.
r? ``@davidtwco``
|
|
fix: Error on illegal `[const]`s inside blocks within legal positions
Fixes rust-lang/rust#132067
I initially considered moving `[const]` validations to `rustc_ast_lowering`, but that approach would require adding constness information to `AssocCtxt`, which introduces significant changes - especially within `rustc_expand` - just to support a single use case here:
https://github.com/rust-lang/rust/blob/3fb1b53a9dbfcdf37a4b67d35cde373316829930/compiler/rustc_ast_passes/src/ast_validation.rs#L1596-L1610
Instead, I believe it's sufficient to simply "reset" `[const]` allowness whenever we enter a new block.
|
|
Rehome 21 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`
rust-lang/rust#143902 divided into smaller, easier to review chunks.
Part of rust-lang/rust#133895
Methodology:
1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer
Inspired by the methodology that ``@Kivooeo`` was using.
r? ``@jieyouxu``
|
|
r=GuillaumeGomez
rustdoc template font links only emit `crossorigin` when needed
The `crossorigin` attribute may cause issues when the href is not actually cross-origin. Specifically, the tag causes the browser to send a preflight OPTIONS request to the server even if it is same-origin. Some temperamental servers may reject all CORS preflight requests even if they're actually same-origin, which causes a CORS error and prevents the fonts from loading, even later on.
This commit fixes that problem by not emitting `crossorigin` if the url appears to be relative to the same origin.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This has always been one lint (added in rust-lang/rust-clippy#720), but
the two cases are also quite distinct.
changelog: Split `possible_missing_else` from
`suspicious_else_formatting`
<!-- TRIAGEBOT_START -->
<!-- TRIAGEBOT_SUMMARY_START -->
### Summary Notes
-
[Feature-freeze](https://github.com/rust-lang/rust-clippy/pull/15317#issuecomment-3094592022)
by [github-actions[bot]](https://github.com/github-actions[bot])
*Managed by `@rustbot`—see
[help](https://forge.rust-lang.org/triagebot/note.html) for details*
<!-- TRIAGEBOT_SUMMARY_END -->
<!-- TRIAGEBOT_END -->
|
|
This caused rename to remove both, because it couldn't rename the derive-expanded one.
I spent some time trying to create a test for this, before giving up. But I checked manually that this works.
|
|
The current `rust-version = "1.63"` was inherited from rayon, but it
doesn't make sense to limit this in the compiler workspace. Having any
setting at all has effects on tools like `cargo info` that try to infer
the MSRV when the workspace itself doesn't specify it. Since we are the
compiler, our only MSRV is whatever bootstrapping requires.
|
|
some cannot rename
|
|
|
|
|
|
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
|