Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show diff suggestion format on verbose replacement #127541

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Jul 9, 2024

error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --> $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL -     let _ = 2.l;
LL +     let _ = 2.0f64;
   |

before:

error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --> $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL +     let _ = 2.0f64;
   |               ~~~~

r? @oli-obk

@rustbot
Copy link
Collaborator

rustbot commented Jul 9, 2024

Some changes occurred in tests/ui/check-cfg

cc @Urgau

HIR ty lowering was modified

cc @fmease

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 9, 2024
@estebank
Copy link
Contributor Author

estebank commented Jul 9, 2024

This is in response to #127407 (comment). This also highlights that there are multiple places where the suggestions could have more accurate spans. We should also improve the diff presentation to automatically skip pieces that haven't changed so that suggestions can continue to be built easily when possible.

@Urgau
Copy link
Member

Urgau commented Jul 10, 2024

Does the verbose suggestion highlight (in color mode) the thing being replaced?

What I mean is that before, the ^^^^ pointed directly at the offended place, now users will have to scan both lines to see the difference, at least without color; but with color on, we could show the character difference by highlighting them in bold/color/italic or whatever.

Adding a --color=always/SVG output test, might be helpful to see what most users will actually experience.

@bors

This comment was marked as resolved.

@estebank
Copy link
Contributor Author

estebank commented Jul 11, 2024

@oli-obk sorry about the last commit, it was an effort to simultaneously fix a papercut and have an SVG file to show different patch renderings, but even that backfired because GH can't render it :-/

I think it's failing because the contents are too long, I'll split it up and see.

Can easily remove it.

@rustbot
Copy link
Collaborator

rustbot commented Jul 11, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rust-log-analyzer

This comment has been minimized.

@estebank
Copy link
Contributor Author

Does the verbose suggestion highlight (in color mode) the thing being replaced?

What I mean is that before, the ^^^^ pointed directly at the offended place, now users will have to scan both lines to see the difference, at least without color; but with color on, we could show the character difference by highlighting them in bold/color/italic or whatever.

Adding a --color=always/SVG output test, might be helpful to see what most users will actually experience.

@Urgau https://github.com/rust-lang/rust/blob/82684d02db0b89766a46f1efeb7f9214f690cb3c/tests/ui/suggestions/incorrect-variant-literal.svg

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as resolved.

@estebank
Copy link
Contributor Author

I'll move all the specific suggestion changes themselves to other PRs, but they will all clash with the diff output rendering change, so we'll have to be mindful of what lands first and then rebase properly.

@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as resolved.

@bors

This comment was marked as resolved.

@bors

This comment was marked as resolved.

@bors

This comment was marked as resolved.

@oli-obk
Copy link
Contributor

oli-obk commented Jul 31, 2024

r? compiler I'm going on leave for 4 months

@petrochenkov
Copy link
Contributor

The visual diff in #127541 (comment) looks convincing to me.
r=me after rebase.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 14, 2024
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --> $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL -     let _ = 2.l;
LL +     let _ = 2.0f64;
   |
```
@estebank
Copy link
Contributor Author

@bors r=petrochenkov rollup=never

@bors
Copy link
Contributor

bors commented Aug 15, 2024

📌 Commit 420364d has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 15, 2024
@bors
Copy link
Contributor

bors commented Aug 15, 2024

⌛ Testing commit 420364d with merge e2838d4...

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 15, 2024
…enkov

Show diff suggestion format on verbose replacement

```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --> $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL -     let _ = 2.l;
LL +     let _ = 2.0f64;
   |
```

before:
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --> $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL +     let _ = 2.0f64;
   |               ~~~~
```
r? `@oli-obk`
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

330    |
331 help: consider using `const` instead of `let`
332    |
- LL |     const foo: /* Type */ = 0;
+ LL -     let mut foo = 0;
+ LL -     let mut foo = 0;
+ LL +     const foo: /* Type */ = 0;
335 
336 error[E0435]: attempt to use a non-constant value in a constant
337   --> $DIR/parse-error.rs:45:44


341    |
342 help: consider using `const` instead of `let`
343    |
- LL |     const foo: /* Type */ = 0;
+ LL -     let mut foo = 0;
+ LL -     let mut foo = 0;
+ LL +     const foo: /* Type */ = 0;
346 
347 error[E0435]: attempt to use a non-constant value in a constant
348   --> $DIR/parse-error.rs:48:55


352    |
353 help: consider using `const` instead of `let`
354    |
- LL |     const foo: /* Type */ = 0;
+ LL -     let mut foo = 0;
+ LL -     let mut foo = 0;
+ LL +     const foo: /* Type */ = 0;
357 
358 error[E0435]: attempt to use a non-constant value in a constant
359   --> $DIR/parse-error.rs:50:31


363    |
364 help: consider using `const` instead of `let`
365    |
- LL |     const foo: /* Type */ = 0;
+ LL -     let mut foo = 0;
+ LL -     let mut foo = 0;
+ LL +     const foo: /* Type */ = 0;
368 
369 error[E0435]: attempt to use a non-constant value in a constant
370   --> $DIR/parse-error.rs:50:46


374    |
375 help: consider using `const` instead of `let`
376    |
- LL |     const bar: /* Type */ = 0;
+ LL -     let mut bar = 0;
+ LL -     let mut bar = 0;
+ LL +     const bar: /* Type */ = 0;
379 
380 error[E0435]: attempt to use a non-constant value in a constant
381   --> $DIR/parse-error.rs:57:45


385    |
386 help: consider using `const` instead of `let`
387    |
- LL |     const bar: /* Type */ = 0;
+ LL -     let mut bar = 0;
+ LL -     let mut bar = 0;
+ LL +     const bar: /* Type */ = 0;
390 
391 error[E0435]: attempt to use a non-constant value in a constant
392   --> $DIR/parse-error.rs:59:45


396    |
397 help: consider using `const` instead of `let`
398    |
- LL |     const bar: /* Type */ = 0;
+ LL -     let mut bar = 0;
+ LL -     let mut bar = 0;
+ LL +     const bar: /* Type */ = 0;
401 
402 error[E0435]: attempt to use a non-constant value in a constant
403   --> $DIR/parse-error.rs:61:41


407    |
408 help: consider using `const` instead of `let`
409    |
- LL |     const bar: /* Type */ = 0;
+ LL -     let mut bar = 0;
+ LL -     let mut bar = 0;
+ LL +     const bar: /* Type */ = 0;
412 
413 error: aborting due to 59 previous errors
414 

---
To only update this specific test, also pass `--test-args asm/aarch64/parse-error.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/aarch64/parse-error" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/aarch64/parse-error/auxiliary"
--- stderr -------------------------------
error: requires at least a template string argument
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:9:9
   |
---

error: expected `)`, found `foo`
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:19:27
   |
LL |         asm!("{}", in(reg foo));
   |                           ^^^ expected `)`
error: expected expression, found end of macro arguments
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:21:27
   |
   |
LL |         asm!("{}", in(reg));

error: expected register class or explicit register
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:23:26
   |
   |
LL |         asm!("{}", inout(=) foo => bar);

error: expected expression, found end of macro arguments
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:25:37
   |
   |
LL |         asm!("{}", inout(reg) foo =>);


error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, or an operator, found `=>`
   |
   |
LL |         asm!("{}", in(reg) foo => bar);

error: expected a path for argument to `sym`
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:29:24
   |
   |
LL |         asm!("{}", sym foo + bar);


error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
   |
   |
LL |         asm!("", options(foo));


error: expected one of `)` or `,`, found `foo`
   |
   |
LL |         asm!("", options(nomem foo));
   |                                ^^^ expected one of `)` or `,`

error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
   |
   |
LL |         asm!("", options(nomem, foo));

error: expected string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:39:30
   |
   |
LL |         asm!("", clobber_abi(foo));


error: expected one of `)` or `,`, found `foo`
   |
   |
LL |         asm!("", clobber_abi("C" foo));
   |                                  ^^^ expected one of `)` or `,`
error: expected string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:43:35
   |
   |
LL |         asm!("", clobber_abi("C", foo));

error: duplicate argument named `a`
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:50:36
   |
   |
LL |         asm!("{a}", a = const foo, a = const bar);
   |                     -------------  ^^^^^^^^^^^^^ duplicate argument
   |                     previously here

error: argument never used
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:50:36
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:50:36
   |
LL |         asm!("{a}", a = const foo, a = const bar);
   |                                    ^^^^^^^^^^^^^ argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
error: explicit register arguments cannot have names
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:55:18
   |
   |
LL |         asm!("", a = in("x0") foo);

error: positional arguments cannot follow named arguments or explicit register arguments
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:61:35
   |
   |
LL |         asm!("{1}", in("x0") foo, const bar);
   |                     ------------  ^^^^^^^^^ positional argument
   |                     explicit register argument


error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""`
   |
   |
LL |         asm!("", options(), "");


error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `"{}"`
   |
   |
LL |         asm!("{}", in(reg) foo, "{}", out(reg) foo);

error: asm template must be a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:68:14
   |
   |
LL |         asm!(format!("{{{}}}", 0), in(reg) foo);
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

error: asm template must be a string literal
error: asm template must be a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:70:21
   |
LL |         asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)


error: _ cannot be used for input operands
   |
   |
LL |         asm!("{}", in(reg) _);


error: _ cannot be used for input operands
   |
   |
LL |         asm!("{}", inout(reg) _);


error: _ cannot be used for input operands
   |
   |
LL |         asm!("{}", inlateout(reg) _);

error: requires at least a template string argument
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:83:1
   |
   |
LL | global_asm!();

error: asm template must be a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:85:13
   |
   |
LL | global_asm!(FOO);

error: expected token: `,`
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:87:18
   |
   |
LL | global_asm!("{}" FOO);
   |                  ^^^ expected `,`
error: expected operand, options, or additional template string
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:89:19
   |
LL | global_asm!("{}", FOO);
---
   |
LL | global_asm!("{}", const);
   |                        ^ expected expression

error: expected one of `,`, `.`, `?`, or an operator, found `FOO`
   |
   |
LL | global_asm!("{}", const(reg) FOO);
   |                              ^^^ expected one of `,`, `.`, `?`, or an operator

error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
   |
   |
LL | global_asm!("", options(FOO));
   |                         ^^^ expected one of `)`, `att_syntax`, or `raw`

error: the `nomem` option cannot be used with `global_asm!`
   |
   |
LL | global_asm!("", options(nomem FOO));
   |                         ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly

error: expected one of `)` or `,`, found `FOO`
   |
   |
LL | global_asm!("", options(nomem FOO));
   |                               ^^^ expected one of `)` or `,`

error: the `nomem` option cannot be used with `global_asm!`
   |
   |
LL | global_asm!("", options(nomem, FOO));
   |                         ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly

error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
   |
   |
LL | global_asm!("", options(nomem, FOO));
   |                                ^^^ expected one of `)`, `att_syntax`, or `raw`
error: expected string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:104:29
   |
   |
LL | global_asm!("", clobber_abi(FOO));


error: expected one of `)` or `,`, found `FOO`
   |
   |
LL | global_asm!("", clobber_abi("C" FOO));
   |                                 ^^^ expected one of `)` or `,`
error: expected string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:108:34
   |
   |
LL | global_asm!("", clobber_abi("C", FOO));


error: `clobber_abi` cannot be used with `global_asm!`
   |
   |
LL | global_asm!("{}", clobber_abi("C"), const FOO);


error: `clobber_abi` cannot be used with `global_asm!`
   |
   |
LL | global_asm!("", options(), clobber_abi("C"));


error: `clobber_abi` cannot be used with `global_asm!`
   |
   |
LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);

error: duplicate argument named `a`
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:116:35
   |
   |
LL | global_asm!("{a}", a = const FOO, a = const BAR);
   |                    -------------  ^^^^^^^^^^^^^ duplicate argument
   |                    previously here

error: argument never used
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:116:35
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:116:35
   |
LL | global_asm!("{a}", a = const FOO, a = const BAR);
   |                                   ^^^^^^^^^^^^^ argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`

error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `""`
   |
   |
LL | global_asm!("", options(), "");
   |                            ^^ expected one of `clobber_abi`, `const`, `options`, or `sym`

error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `"{}"`
   |
   |
LL | global_asm!("{}", const FOO, "{}", const FOO);
   |                              ^^^^ expected one of `clobber_abi`, `const`, `options`, or `sym`
error: asm template must be a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:123:13
   |
   |
LL | global_asm!(format!("{{{}}}", 0), const FOO);
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

error: asm template must be a string literal
error: asm template must be a string literal
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:125:20
   |
LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
   |
   = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0435]: attempt to use a non-constant value in a constant
error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:37:37
   |
LL |         asm!("{}", options(), const foo);
   |                                     ^^^ non-constant value
   |
help: consider using `const` instead of `let`
   |
LL -     let mut foo = 0;
LL +     const foo: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:45:44
   |
   |
LL |         asm!("{}", clobber_abi("C"), const foo);
   |                                            ^^^ non-constant value
help: consider using `const` instead of `let`
   |
LL -     let mut foo = 0;
LL -     let mut foo = 0;
LL +     const foo: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:48:55
   |
   |
LL |         asm!("{}", options(), clobber_abi("C"), const foo);
   |                                                       ^^^ non-constant value
help: consider using `const` instead of `let`
   |
LL -     let mut foo = 0;
LL -     let mut foo = 0;
LL +     const foo: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:50:31
   |
   |
LL |         asm!("{a}", a = const foo, a = const bar);
   |                               ^^^ non-constant value
help: consider using `const` instead of `let`
   |
LL -     let mut foo = 0;
LL -     let mut foo = 0;
LL +     const foo: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:50:46
   |
   |
LL |         asm!("{a}", a = const foo, a = const bar);
   |                                              ^^^ non-constant value
help: consider using `const` instead of `let`
   |
LL -     let mut bar = 0;
LL -     let mut bar = 0;
LL +     const bar: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:57:45
   |
   |
LL |         asm!("{a}", in("x0") foo, a = const bar);
   |                                             ^^^ non-constant value
help: consider using `const` instead of `let`
   |
LL -     let mut bar = 0;
LL -     let mut bar = 0;
LL +     const bar: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:59:45
   |
   |
LL |         asm!("{a}", in("x0") foo, a = const bar);
   |                                             ^^^ non-constant value
help: consider using `const` instead of `let`
   |
LL -     let mut bar = 0;
LL -     let mut bar = 0;
LL +     const bar: /* Type */ = 0;

error[E0435]: attempt to use a non-constant value in a constant
##[error]  --> /Users/runner/work/rust/rust/tests/ui/asm/aarch64/parse-error.rs:61:41
   |
   |
LL |         asm!("{1}", in("x0") foo, const bar);
   |                                         ^^^ non-constant value
help: consider using `const` instead of `let`
   |
LL -     let mut bar = 0;
LL -     let mut bar = 0;
LL +     const bar: /* Type */ = 0;

error: aborting due to 59 previous errors

For more information about this error, try `rustc --explain E0435`.

@bors
Copy link
Contributor

bors commented Aug 15, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 15, 2024
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 15, 2024
@bors
Copy link
Contributor

bors commented Aug 23, 2024

☔ The latest upstream changes (presumably #129443) made this pull request unmergeable. Please resolve the merge conflicts.

@alex-semenyuk alex-semenyuk added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 27, 2024
@jieyouxu
Copy link
Member

@bors r- (bors is doing strange things)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants