Commit Graph

263719 Commits

Author SHA1 Message Date
Alona Enraght-Moony
321d40f060 rustdoc-json: Clean up serialization and printing. 2024-08-17 11:00:26 +00:00
bors
569d7e3d15 Auto merge of #128456 - Oneirical:clantestine-operations, r=jieyouxu
Migrate `reproducible-build` `run-make` test to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

This will likely fail. Locally, rustc errors with `linker 'linker' not found` on line 36 while the file exists according to the dir-debug statement before it.

If this gets fixed and the test passes, further developments may include:

- [x] There may be some leftovers from each test - `test_in_tmpdir` may therefore be required.
- [ ] Try jobs on all ignored architectures.
- [x] A potential refactor with a struct and a custom function like #128410 so this isn't just a huge stream of `rfs` and `rustc`. This is a little bit harder to do in this test considering the variability present in each test case.

// try-job: x86_64-msvc // windows jobs passed in a prior run
// try-job: x86_64-mingw
// try-job: i686-msvc
// try-job: i686-mingw
try-job: aarch64-apple
try-job: aarch64-gnu
try-job: armhf-gnu
try-job: test-various
try-job: dist-various-1
2024-08-16 17:53:53 +00:00
bors
a73bc4a131 Auto merge of #129068 - cuviper:llvm19rc2, r=compiler-errors
Re-update to LLVM 19 rc2

The update in #128677 was accidentally reverted in #128962.

Fixes #129064
r? nikic
2024-08-16 14:22:33 +00:00
Oneirical
e752410a43 massive refactor of reproducible-build test 2024-08-16 10:10:25 -04:00
Oneirical
3c68b113c0 rewrite reproducible-build to rmake 2024-08-16 10:10:24 -04:00
bors
27b93da8de Auto merge of #129052 - onur-ozkan:better-incompatibility-check, r=Kobzol
detect incompatible CI rustc options more precisely

Previously, the logic here was simply checking whether the option was set in `config.toml`. This approach was not manageable in our CI runners as we set so many options in config.toml. In reality, those values are not incompatible since they are usually the same value used to generate the CI rustc. Now, the new logic compares the configuration values with the values used to generate the CI rustc, so we get more precise results and make the process more manageable.

r? Kobzol

Blocker for https://github.com/rust-lang/rust/pull/122709
2024-08-16 11:52:38 +00:00
bors
8fbdc04f1b Auto merge of #128977 - jieyouxu:writable-file, r=Kobzol
Only try to modify file times of a writable file on Windows

Introduces a `set_file_times` helper which opens a given path as a file in r+w mode on Windows and then sets file times. Previously the file was open as read-only for Windows which caused permission errors locally.

This should hopefully make setting file times less error prone, since trying to set file times on read-only file on Windows also happened in #127850.

try-job: dist-loongarch64-musl
try-job: x86_64-msvc
2024-08-16 09:24:17 +00:00
许杰友 Jieyou Xu (Joe)
26fae1ed1c bootstrap: fix trying to modify file times on read-only file on Windows 2024-08-16 06:55:23 +00:00
bors
d626fbdc66 Auto merge of #128913 - saethlin:unignore-debuginfo-tests, r=compiler-errors
Enable debuginfo tests that have been "temporarily disabled" for the past 6 years

The PR history is a bit of a mess because I had to test this a lot with try-jobs, so I'll try to summarize the non-obvious changes here.

A number of tests now have `min-lldb-version: 1800`. Those tests should have gotten an lldb version jump either in https://github.com/rust-lang/rust/pull/124781 or long ago. Note that all such tests with that lldb version requirement do not run in Apple CI.

`tests/debuginfo/drop-locations.rs` is staying disabled for now because gdb doesn't know to stop on the drop calls produced by a `}`: https://github.com/rust-lang/rust/issues/128971

`tests/debuginfo/function-arg-initialization.rs` now has `-Zmir-enable-passes=-SingleUseConsts`; without that we initialize the const before the function prelude: https://github.com/rust-lang/rust/issues/128945

`tests/debuginfo/by-value-non-immediate-argument.rs` fails because we don't generate a function prelude for unused non-immediate arguments, even with all optimizations disabled, and this seems to confuse debuggers on aarch64: https://github.com/rust-lang/rust/issues/128973

`tests/debuginfo/pretty-std.rs` is staying disabled on windows-gnu because our test harness doesn't know how to load our pretty-printers on that target: https://github.com/rust-lang/rust/issues/128981

`tests/debuginfo/method-on-enum.rs` and `tests/debuginfo/option-like-enum.rs` encounter some kind of gdb bug on i686-pc-windows-gnu. I don't know enough about that situation to write a good issue.

I plan on doing more work on this test suite. There's clearly a lot more basic cleanup work to do here.
2024-08-16 06:41:16 +00:00
bors
69e36d65f9 Auto merge of #129143 - workingjubilee:rollup-h0hzumu, r=workingjubilee
Rollup of 9 pull requests

Successful merges:

 - #128064 (Improve docs for Waker::noop and LocalWaker::noop)
 - #128922 (rust-analyzer: use in-tree `pattern_analysis` crate)
 - #128965 (Remove `print::Pat` from the printing of `WitnessPat`)
 - #129018 (Migrate `rlib-format-packed-bundled-libs` and `native-link-modifier-bundle` `run-make` tests to rmake)
 - #129037 (Port `run-make/libtest-json` and `run-make/libtest-junit` to rmake)
 - #129078 (`ParamEnvAnd::fully_perform`: we have an `ocx`, use it)
 - #129110 (Add a comment explaining the return type of `Ty::kind`.)
 - #129111 (Port the `sysroot-crates-are-unstable` Python script to rmake)
 - #129135 (crashes: more tests)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-16 04:10:41 +00:00
Jubilee
e463490ecf
Rollup merge of #129135 - matthiaskrgr:ITKEEPSCRASHINGAAAAAAAAHH, r=compiler-errors
crashes: more tests

r? ````@jieyouxu````
2024-08-15 18:44:19 -07:00
Jubilee
051eba0931
Rollup merge of #129111 - Zalathar:python-sysroot, r=jieyouxu
Port the `sysroot-crates-are-unstable` Python script to rmake

New version of #126231, and a follow-up to #129071.

One major difference is that the new version no longer tries to report *all* accidentally-stable crates, because the `run_make_support` helpers tend to halt the test as soon as something goes wrong. That's unfortunate, but I think it won't matter much in practice, and preserving the old behaviour doesn't seem worth the extra effort.

---

Part of #110479 (Python purge), with this being one of the non-trivial Python scripts that actually seems feasible and worthwhile to remove.

This is *not* part of #121876 (Makefile purge), because the underlying test is already using rmake; this PR just modifies the existing rmake recipe to do all the work itself instead of delegating to Python. So there's no particular urgency here.

r? ````@jieyouxu````

try-job: aarch64-gnu
try-job: aarch64-apple
try-job: test-various
try-job: armhf-gnu
try-job: x86_64-msvc
try-job: i686-mingw
2024-08-15 18:44:19 -07:00
Jubilee
c6bde8d2e0
Rollup merge of #129110 - nnethercote:Ty-kind-ret-ty-comment, r=jieyouxu
Add a comment explaining the return type of `Ty::kind`.

At least we'll get a useful comment out of #126069 :)

r? ````@lcnr````
2024-08-15 18:44:18 -07:00
Jubilee
4f46643698
Rollup merge of #129078 - lcnr:scrape_region_constraints-use-ocx, r=compiler-errors
`ParamEnvAnd::fully_perform`: we have an `ocx`, use it

cc #123669

r? ``@compiler-errors``
2024-08-15 18:44:18 -07:00
Jubilee
eb6ecf1db9
Rollup merge of #129037 - Zalathar:rmake-libtest, r=jieyouxu
Port `run-make/libtest-json` and `run-make/libtest-junit` to rmake

Unlike #126773, this is just a straightforward port to `rmake`, without attempting to switch to compiletest or get rid of the (trivial) Python scripts.

Part of #121876.

r? ````@jieyouxu````

try-job: x86_64-msvc
try-job: i686-mingw
try-job: test-various
try-job: aarch64-gnu
try-job: aarch64-apple
2024-08-15 18:44:17 -07:00
Jubilee
759f93f421
Rollup merge of #129018 - Oneirical:nmemonic-artifice, r=jieyouxu
Migrate `rlib-format-packed-bundled-libs` and `native-link-modifier-bundle` `run-make` tests to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

Please try:

// try-job: test-various (ATTEMPTED: IGNORE RESTORED)
try-job: x86_64-msvc
try-job: aarch64-apple
try-job: aarch64-gnu
try-job: x86_64-mingw
try-job: i686-mingw
2024-08-15 18:44:17 -07:00
Jubilee
5858329f1a
Rollup merge of #128965 - Zalathar:no-pat, r=Nadrieril
Remove `print::Pat` from the printing of `WitnessPat`

After the preliminary work done in #128536, we can now get rid of `print::Pat` entirely.

- First, we introduce a variant `PatKind::Print(String)`.
- Then we incrementally remove each other variant of `PatKind`, by having the relevant code produce `PatKind::Print` instead.
- Once `PatKind::Print` is the only remaining variant, it becomes easy to remove `print::Pat` and replace it with `String`.

There is more cleanup that I have in mind, but this seemed like a natural stopping point for one PR.

r? ```@Nadrieril```
2024-08-15 18:44:16 -07:00
Jubilee
4fd4da9e23
Rollup merge of #128922 - Nadrieril:r-a-use-upstream-pat-ana, r=Veykril
rust-analyzer: use in-tree `pattern_analysis` crate

r? ```@Veykril```
2024-08-15 18:44:16 -07:00
Jubilee
f624f2d3f9
Rollup merge of #128064 - ijackson:noop-waker-doc, r=workingjubilee
Improve docs for Waker::noop and LocalWaker::noop

 * Add a warning about a likely misuse.  (See my commit message for longer rationale.)
 * Apply some probably-accidentally-omitted changes to `LocalWaker`'s docs
 * Add a comment about the clone-and-hack of the docs

I have used [semantic linefeeds](https://rhodesmill.org/brandon/2012/one-sentence-per-line/) for the docs formatting.
2024-08-15 18:44:15 -07:00
bors
be0ea0c99a Auto merge of #128725 - nnethercote:fix-assoc-expr-collect-problems, r=petrochenkov
Fix problems with assoc expr token collection

There are several cases involving assoc exprs and attributes where the current code does the wrong thing. This PR adds some tests that demonstrate the problems and then fixes them.

r? `@petrochenkov`
2024-08-16 01:44:09 +00:00
Nicholas Nethercote
9d31f86f0d Overhaul token collection.
This commit does the following.

- Renames `collect_tokens_trailing_token` as `collect_tokens`, because
  (a) it's annoying long, and (b) the `_trailing_token` bit is less
  accurate now that its types have changed.

- In `collect_tokens`, adds a `Option<CollectPos>` argument and a
  `UsePreAttrPos` in the return type of `f`. These are used in
  `parse_expr_force_collect` (for vanilla expressions) and in
  `parse_stmt_without_recovery` (for two different cases of expression
  statements). Together these ensure are enough to fix all the problems
  with token collection and assoc expressions. The changes to the
  `stringify.rs` test demonstrate some of these.

- Adds a new test. The code in this test was causing an assertion
  failure prior to this commit, due to an invalid `NodeRange`.

The extra complexity is annoying, but necessary to fix the existing
problems.
2024-08-16 09:07:55 +10:00
Nicholas Nethercote
fe460ac28b Add some attribute stringify! tests.
A couple of these are marked `FIXME` because they demonstrate existing
bugs with token collection.
2024-08-16 09:07:31 +10:00
Nicholas Nethercote
5aaa2f92ee Add an assertion to NodeRange::new. 2024-08-16 09:07:31 +10:00
Nicholas Nethercote
c8098be41f Convert a bool to Trailing.
This pre-existing type is suitable for use with the return value of the
`f` parameter in `collect_tokens_trailing_token`. The more descriptive
name will be useful because the next commit will add another boolean
value to the return value of `f`.
2024-08-16 09:07:29 +10:00
Nicholas Nethercote
55906aa240 Make visibilities minimal and consistent in attr_wrapper.rs. 2024-08-16 09:06:15 +10:00
Nicholas Nethercote
af0093a6b8 Remove size assertion on AttrWrapper.
It's not an important type when it comes to memory use.
2024-08-16 09:06:15 +10:00
bors
4b7d074d76 Auto merge of #128787 - Oneirical:infohazardous-deprogram, r=jieyouxu
Coalesce `dep-info`, `dep-info-spaces` and `dep-info-doesnt-run-much` `run-make` tests into `dep-info` rmake.rs

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

This is one of the most ancient tests in the `run-make` directory and its Makefile does some unexpected things, like creating and deleting a `done` directory over and over, sleeping at certain times (this is the [commit](0d9fd8e2a1) that added the `sleep`).

I tried to preserve the intent of the test, which is smoke-testing that `dep-info` works.

try-job: x86_64-msvc
try-job: i686-mingw
try-job: aarch64-gnu
try-job: aarch64-apple
try-job: test-various
try-job: armhf-gnu
try-job: dist-various-1
2024-08-15 22:33:03 +00:00
Ben Kimock
23273e03d7 Disable macro-stepping on current lldb 2024-08-15 17:04:26 -04:00
Matthias Krüger
7d99549073 crashes: more tests 2024-08-15 22:44:16 +02:00
bors
2c93fabd98 Auto merge of #129130 - matthiaskrgr:rollup-603jta0, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #128348 (Unconditionally allow shadow call-stack sanitizer for AArch64)
 - #129065 (Use `impl PartialEq<TokenKind> for Token` more.)
 - #129072 (Infer async closure args from `Fn` bound even if there is no corresponding `Future` bound on return)
 - #129096 (Print more verbose error for commands that capture output)
 - #129101 (Fix projections when parent capture is by-ref but child capture is by-value in the `ByMoveBody` pass)
 - #129106 (Remove redundant type ops: `Eq`/`Subtype`)
 - #129122 (Remove duplicated `Rustdoc::output` method from `run-make-support` lib)
 - #129124 (rustdoc-json: Use FxHashMap from rustdoc_json_types)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-15 20:04:49 +00:00
Matthias Krüger
ef72a6a711
Rollup merge of #129124 - aDotInTheVoid:rdj-hashmap-3, r=GuillaumeGomez
rustdoc-json: Use FxHashMap from rustdoc_json_types

Alternative to #110051 and #127456.

This lets us avoid rehashing the json index after building it by using the same hashmap type in construction and in rustdoc_json_types. The above PR's tried to do this by having rustdoc_json_types get the same hashmap that rustdoc has via rustc_data_structures. However, this can be made simpler if we change rustdoc instead.

For the rustdoc-type republish on crates.io, It will filter out the `pub use`, and not change source at all. https://github.com/aDotInTheVoid/rustdoc-types/pull/30. That code [already replaces the hashmap](8d6528669e/update.sh (L11)) to use the one in `std::collections` (instead of `FxHashMap`)

try-job: dist-arm-linux

r? ``@GuillaumeGomez``
2024-08-15 19:32:39 +02:00
Matthias Krüger
bc986c7290
Rollup merge of #129122 - GuillaumeGomez:remove-duplicated-rustdoc-output-methods, r=Kobzol
Remove duplicated `Rustdoc::output` method from `run-make-support` lib

I discovered recently that `--output` is deprecated in rustdoc and that `--out-dir` is doing the exact same thing. To keep things along with the current rustdoc status, I removed the `Rustdoc::output` method.

cc `@jieyouxu`
r? `@Kobzol`
2024-08-15 19:32:38 +02:00
Matthias Krüger
f3df807207
Rollup merge of #129106 - compiler-errors:unused-type-ops, r=jieyouxu
Remove redundant type ops: `Eq`/`Subtype`

r? lcnr or anyone really
2024-08-15 19:32:37 +02:00
Matthias Krüger
6c898d2b03
Rollup merge of #129101 - compiler-errors:deref-on-parent-by-ref, r=lcnr
Fix projections when parent capture is by-ref but child capture is by-value in the `ByMoveBody` pass

This fixes a somewhat strange bug where we build the incorrect MIR in #129074. This one is weird, but I don't expect it to actually matter in practice since it almost certainly results in a move error in borrowck. However, let's not ICE.

Given the code:

```
#![feature(async_closure)]

// NOT copy.
struct Ty;

fn hello(x: &Ty) {
    let c = async || {
        *x;
        //~^ ERROR cannot move out of `*x` which is behind a shared reference
    };
}

fn main() {}
```

The parent coroutine-closure captures `x: &Ty` by-ref, resulting in an upvar of `&&Ty`. The child coroutine captures `x` by-value, resulting in an upvar of `&Ty`. When constructing the by-move body for the coroutine-closure, we weren't applying an additional deref projection to convert the parent capture into the child capture, resulting in an type error in assignment, which is a validation ICE.

As I said above, this only occurs (AFAICT) in code that eventually results in an error, because it is only triggered by HIR that attempts to move a non-copy value out of a ref. This doesn't occur if `Ty` is `Copy`, since we'd instead capture `x` by-ref in the child coroutine.

Fixes #129074
2024-08-15 19:32:37 +02:00
Matthias Krüger
19e32bfc81
Rollup merge of #129096 - Kobzol:bootstrap-cmd-verbosity, r=onur-ozkan
Print more verbose error for commands that capture output

https://github.com/rust-lang/rust/pull/128874 made bootstrap command errors less verbose without `-v`. However, in some cases it's too extreme. If a command fails, it now outputs just `Command has failed. Rerun with -v to see more details.`, without providing any context.

I think that I found a reasonable heuristic to figure out when we should print a more verbose error. When the command doesn't capture output, its stdout/stderr is printed, therefore the user sees context about the error. However, when the command captures its output, the user won't see any error message in the output, which is not great. So only in that case, bootstrap now prints a slightly more verbose output (and also prints the captured output).

r? `@onur-ozkan`
2024-08-15 19:32:36 +02:00
Matthias Krüger
53bf554de8
Rollup merge of #129072 - compiler-errors:more-powerful-async-closure-inference, r=lcnr
Infer async closure args from `Fn` bound even if there is no corresponding `Future` bound on return

In #127482, I implemented the functionality to infer an async closure signature when passed into a function that has `Fn` + `Future` where clauses that look like:

```
fn whatever(callback: F)
where
  F: Fn(Arg) -> Fut,
  Fut: Future<Output = Out>,
```

However, #127781 demonstrates that this is still incomplete to address the cases users care about. So let's not bail when we fail to find a `Future` bound, and try our best to just use the args from the `Fn` bound if we find it. This is *fine* since most users of closures only really care about the *argument* types for inference guidance, since we require the receiver of a `.` method call to be known in order to probe methods.

When I experimented with programmatically rewriting `|| async {}` to `async || {}` in #127827, this also seems to have fixed ~5000 regressions (probably all coming from usages `TryFuture`/`TryStream` from futures-rs): the [before](https://github.com/rust-lang/rust/pull/127827#issuecomment-2254061733) and [after](https://github.com/rust-lang/rust/pull/127827#issuecomment-2255470176) crater runs.

Fixes #127781.
2024-08-15 19:32:36 +02:00
Matthias Krüger
bb63d75ac1
Rollup merge of #129065 - nnethercote:PartialEq-TokenKind, r=spastorino
Use `impl PartialEq<TokenKind> for Token` more.

This lets us compare a `Token` with a `TokenKind`. It's used a lot, but can be used even more, avoiding the need for some `.kind` uses.

r? `@spastorino`
2024-08-15 19:32:35 +02:00
Matthias Krüger
3075644a3d
Rollup merge of #128348 - dingxiangfei2009:allow-shadow-call-stack-sanitizer, r=tmandry
Unconditionally allow shadow call-stack sanitizer for AArch64

It is possible to do so whenever `-Z fixed-x18` is applied.

cc ``@Darksonn`` for context

The reasoning is that, as soon as reservation on `x18` is forced through the flag `fixed-x18`, on AArch64 the option to instrument with [Shadow Call Stack sanitizer](https://clang.llvm.org/docs/ShadowCallStack.html) is then applicable regardless of the target configuration.

At the every least, we would like to relax the restriction on specifically `aarch64-unknonw-none`. For this option, we can include a documentation change saying that users of compiled objects need to ensure that they are linked to runtime with Shadow Call Stack instrumentation support.

Related: #121972
2024-08-15 19:32:35 +02:00
Jakub Beránek
478d42bdc2
Print more verbose error for commands that capture output 2024-08-15 18:31:43 +02:00
Ian Jackson
9a95573c2b Add cautionary paragraph about noop wakers.
Based on a suggestion from @kpreid, with some further editing.
2024-08-15 16:18:49 +01:00
Oneirical
51628fb666 rewrite native-link-modifier-bundle to rmake 2024-08-15 10:17:38 -04:00
Oneirical
2e4d5bbba7 rewrite rlib-format-packed-bundled-libs to rmake 2024-08-15 10:17:25 -04:00
Oneirical
7c4d56102a coalesce dep-info-spaces and dep-info-doesnt-run-much into dep-info 2024-08-15 10:16:30 -04:00
bors
d2b5aa6552 Auto merge of #128936 - bjorn3:fix_thin_archive_reading, r=jieyouxu
Support reading thin archives in ArArchiveBuilder

And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed.

Fixes https://github.com/rust-lang/rust/issues/107407
Fixes https://github.com/rust-lang/rust/issues/107162
https://github.com/rust-lang/rust/issues/107495 has been fixed in a previous PR already.
2024-08-15 14:13:52 +00:00
Guillaume Gomez
d562a4a510 About rmake tests 2024-08-15 15:44:29 +02:00
Guillaume Gomez
a19a8f8e52 Remove duplicated Rustdoc::output method from run-make-support lib 2024-08-15 15:44:03 +02:00
Alona Enraght-Moony
9028b5381b rustdoc-json: Use FxHashMap from rustdoc_json_types 2024-08-15 13:12:11 +00:00
bors
3139ff09e9 Auto merge of #128861 - khuey:mir-inlining-parameters-debuginfo, r=wesleywiser
Rework MIR inlining debuginfo so function parameters show up in debuggers.

Line numbers of multiply-inlined functions were fixed in #114643 by using a single DISubprogram. That, however, triggered assertions because parameters weren't deduplicated. The "solution" to that in #115417 was to insert a DILexicalScope below the DISubprogram and parent all of the parameters to that scope. That fixed the assertion, but debuggers (including gdb and lldb) don't recognize variables that are not parented to the subprogram itself as parameters, even if they are emitted with DW_TAG_formal_parameter.

Consider the program:

```rust
use std::env;

#[inline(always)]
fn square(n: i32) -> i32 {
    n * n
}

#[inline(never)]
fn square_no_inline(n: i32) -> i32 {
    n * n
}

fn main() {
    let x = square(env::vars().count() as i32);
    let y = square_no_inline(env::vars().count() as i32);
    println!("{x} == {y}");
}
```

When making a release build with debug=2 and rustc 1.82.0-nightly (8b3870784 2024-08-07)

```
(gdb) r
Starting program: /ephemeral/tmp/target/release/tmp [Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, tmp::square () at src/main.rs:5
5	    n * n
(gdb) info args
No arguments.
(gdb) info locals
n = 31
(gdb) c
Continuing.

Breakpoint 2, tmp::square_no_inline (n=31) at src/main.rs:10
10	    n * n
(gdb) info args
n = 31
(gdb) info locals
No locals.
```

This issue is particularly annoying because it removes arguments from stack traces.

The DWARF for the inlined function looks like this:

```
< 2><0x00002132 GOFF=0x00002132>      DW_TAG_subprogram
                                        DW_AT_linkage_name          _ZN3tmp6square17hc507052ff3d2a488E
                                        DW_AT_name                  square
                                        DW_AT_decl_file             0x0000000f /ephemeral/tmp/src/main.rs
                                        DW_AT_decl_line             0x00000004
                                        DW_AT_type                  0x00001a56<.debug_info+0x00001a56>
                                        DW_AT_inline                DW_INL_inlined
< 3><0x00002142 GOFF=0x00002142>        DW_TAG_lexical_block
< 4><0x00002143 GOFF=0x00002143>          DW_TAG_formal_parameter
                                            DW_AT_name                  n
                                            DW_AT_decl_file             0x0000000f /ephemeral/tmp/src/main.rs
                                            DW_AT_decl_line             0x00000004
                                            DW_AT_type                  0x00001a56<.debug_info+0x00001a56>
< 4><0x0000214e GOFF=0x0000214e>          DW_TAG_null
< 3><0x0000214f GOFF=0x0000214f>        DW_TAG_null
```

That DW_TAG_lexical_block inhibits every debugger I've tested from recognizing 'n' as a parameter.

This patch removes the additional lexical scope. Parameters can be easily deduplicated by a tuple of their scope and the argument index, at the trivial cost of taking a Hash + Eq bound on DIScope.
2024-08-15 11:42:15 +00:00
bors
026e9ed3f0 Auto merge of #128037 - beetrees:repr128-c-style-use-natvis, r=michaelwoerister
Use the `enum2$` Natvis visualiser for repr128 C-style enums

Use the preexisting `enum2$` Natvis visualiser to allow PDB debuggers to display fieldless `#[repr(u128)]]`/`#[repr(i128)]]` enums correctly.

Tracking issue: #56071

try-job: x86_64-msvc
2024-08-15 09:17:24 +00:00
bors
c416a6fc73 Auto merge of #129066 - weihanglo:update-cargo, r=weihanglo
Update cargo

7 commits in 0d8d22f83b066503f6b2b755925197e959e58b4f..2f738d617c6ead388f899802dd1a7fd66858a691
2024-08-08 12:54:24 +0000 to 2024-08-13 10:57:52 +0000
- chore: downgrade to openssl v1.1.1 (again) (rust-lang/cargo#14391)
- feat(trim-paths): rustdoc supports trim-paths for diagnostics (rust-lang/cargo#14389)
- Use longhand gitoxide path-spec patterns (rust-lang/cargo#14380)
- feat: Add `info` cargo subcommand (rust-lang/cargo#14141)
- CI: Switch macos aarch64 to nightly (rust-lang/cargo#14382)
- Use context instead of with_context (rust-lang/cargo#14377)
- Fix: `cargo package` failed on bare commit git repo. (rust-lang/cargo#14359)

r? ghost
2024-08-15 06:09:39 +00:00