diff options
| author | bors <bors@rust-lang.org> | 2025-07-17 12:03:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-07-17 12:03:43 +0000 |
| commit | bf5e6cc7a7a7eb03e3ed9b875d76530eddd47d5f (patch) | |
| tree | 14e46016d2fa42234a493c015b51ed5e2b9d3c0d /tests/codegen/fn-parameters-on-different-lines-debuginfo.rs | |
| parent | 8c12d76304fcceaeaad0d67209e5727e94f5f2b8 (diff) | |
| parent | 52868368dd2b5783881a1f42b1ec56d5c4d3d75b (diff) | |
| download | rust-bf5e6cc7a7a7eb03e3ed9b875d76530eddd47d5f.tar.gz rust-bf5e6cc7a7a7eb03e3ed9b875d76530eddd47d5f.zip | |
Auto merge of #144058 - matthiaskrgr:rollup-xezozsk, r=matthiaskrgr
Rollup of 11 pull requests Successful merges: - rust-lang/rust#143326 (Remove deprecated `Error::description` impl from `c_str::FromBytesWithNulError`) - rust-lang/rust#143431 (Use relative visibility when noting sealed trait to reduce false positive) - rust-lang/rust#143550 (resolve: Use interior mutability for extern module map) - rust-lang/rust#143631 (update to literal-escaper-0.0.5) - rust-lang/rust#143793 (Opaque type collection: Guard against endlessly recursing free alias types) - rust-lang/rust#143880 (tests: Test line debuginfo for linebreaked function parameters) - rust-lang/rust#143914 (Reword mismatched-lifetime-syntaxes text based on feedback) - rust-lang/rust#143926 (Remove deprecated fields in bootstrap) - rust-lang/rust#143955 (Make frame spans appear on a separate trace line) - rust-lang/rust#143975 (type_id_eq: check that the hash fully matches the type) - rust-lang/rust#143984 (Fix ice for feature-gated `cfg` attributes applied to the crate) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'tests/codegen/fn-parameters-on-different-lines-debuginfo.rs')
| -rw-r--r-- | tests/codegen/fn-parameters-on-different-lines-debuginfo.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/codegen/fn-parameters-on-different-lines-debuginfo.rs b/tests/codegen/fn-parameters-on-different-lines-debuginfo.rs new file mode 100644 index 00000000000..2097567f322 --- /dev/null +++ b/tests/codegen/fn-parameters-on-different-lines-debuginfo.rs @@ -0,0 +1,22 @@ +//! Make sure that line debuginfo of function parameters are correct even if +//! they are not on the same line. Regression test for +// <https://github.com/rust-lang/rust/issues/45010>. + +//@ compile-flags: -g -Copt-level=0 + +#[rustfmt::skip] // Having parameters on different lines is crucial for this test. +pub fn foo( + x_parameter_not_in_std: i32, + y_parameter_not_in_std: i32, +) -> i32 { + x_parameter_not_in_std + y_parameter_not_in_std +} + +fn main() { + foo(42, 43); // Ensure `wasm32-wasip1` keeps `foo()` (even if `-Copt-level=0`) +} + +// CHECK: !DILocalVariable(name: "x_parameter_not_in_std", arg: 1, +// CHECK-SAME: line: 9 +// CHECK: !DILocalVariable(name: "y_parameter_not_in_std", arg: 2, +// CHECK-SAME: line: 10 |
