Skip to content

[--bless] a Diagnotic Derive I wish to work for English words in descr #103469

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

Closed
wants to merge 1 commit into from

Conversation

AndyJado
Copy link
Contributor

I haven't found any already mereged *.ftl dealing well with English words inside $desc.

This is what I would bless to work.


Not looking for merge, just to show some point.

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 24, 2022
@rust-highfive
Copy link
Contributor

r? @petrochenkov

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2022
@AndyJado
Copy link
Contributor Author

r? @davidtwco

[0] match guard
[4] indexing expression
*[other] {""}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe

borrowck_cannot_mutate_in_immutable_section =
    cannot {.action} {.place_descr} in {.section_descr}
    .label = cannot {.action}
    .immu_label = value is immutable in {.section_descr}
    .action = {$action ->
        [assign] assign
        *[other] mutably borrow
    }
    .place_descr =
    {$place_desc ->
        [value] value
        *[other] {$place_desc}
    }
    .section_descr =
    {$fake_read_cause ->
        [0] match guard
        [4] indexing expression
        *[other] {""}
    }

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-13 failed! Check out the build log: (web) (plain)

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

---- [ui] src/test/ui/borrowck/borrowck-mutate-in-guard.rs stdout ----

error: /checkout/src/test/ui/borrowck/borrowck-mutate-in-guard.rs:10: unexpected error: '10:25: 10:43: cannot mutably borrow {$place_desc} in  [E0510]'

error: /checkout/src/test/ui/borrowck/borrowck-mutate-in-guard.rs:12: unexpected error: '12:33: 12:39: cannot mutably borrow {$place_desc} in  [E0510]'

error: /checkout/src/test/ui/borrowck/borrowck-mutate-in-guard.rs:10: expected error not found: cannot assign `x` in match guard

error: /checkout/src/test/ui/borrowck/borrowck-mutate-in-guard.rs:12: expected error not found: cannot mutably borrow `x` in match guard
error: 2 unexpected errors found, 2 expected errors not found
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/borrowck/borrowck-mutate-in-guard.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/borrowck/borrowck-mutate-in-guard" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/borrowck/borrowck-mutate-in-guard/auxiliary"
    Error {
        line_num: 10,
        kind: Some(
            Error,
            Error,
        ),
        msg: "10:25: 10:43: cannot mutably borrow {$place_desc} in  [E0510]",
    Error {
        line_num: 12,
        kind: Some(
            Error,
            Error,
        ),
        msg: "12:33: 12:39: cannot mutably borrow {$place_desc} in  [E0510]",
]

not found errors (from test file): [
    Error {
    Error {
        line_num: 10,
        kind: Some(
            Error,
        ),
        msg: "cannot assign `x` in match guard",
    Error {
        line_num: 12,
        kind: Some(
            Error,
            Error,
        ),
Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
        msg: "cannot mutably borrow `x` in match guard",
]

thread '[ui] src/test/ui/borrowck/borrowck-mutate-in-guard.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1434:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- [ui] src/test/ui/borrowck/slice-index-bounds-check-invalidation.rs stdout ----

error: /checkout/src/test/ui/borrowck/slice-index-bounds-check-invalidation.rs:36: unexpected error: '36:12: 36:17: cannot mutably borrow {$place_desc} in  [E0510]'

error: /checkout/src/test/ui/borrowck/slice-index-bounds-check-invalidation.rs:50: unexpected error: '50:12: 50:17: cannot mutably borrow {$place_desc} in  [E0510]'

error: /checkout/src/test/ui/borrowck/slice-index-bounds-check-invalidation.rs:64: unexpected error: '64:12: 64:17: cannot mutably borrow {$place_desc} in  [E0510]'

error: /checkout/src/test/ui/borrowck/slice-index-bounds-check-invalidation.rs:71: unexpected error: '71:12: 71:17: cannot mutably borrow {$place_desc} in  [E0510]'

error: /checkout/src/test/ui/borrowck/slice-index-bounds-check-invalidation.rs:36: expected error not found: cannot assign `x` in indexing expression

error: /checkout/src/test/ui/borrowck/slice-index-bounds-check-invalidation.rs:50: expected error not found: cannot assign `x` in indexing expression

error: /checkout/src/test/ui/borrowck/slice-index-bounds-check-invalidation.rs:64: expected error not found: cannot assign `x` in indexing expression

error: /checkout/src/test/ui/borrowck/slice-index-bounds-check-invalidation.rs:71: expected error not found: cannot assign `x` in indexing expression
error: 4 unexpected errors found, 4 expected errors not found
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/borrowck/slice-index-bounds-check-invalidation.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/borrowck/slice-index-bounds-check-invalidation" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/borrowck/slice-index-bounds-check-invalidation/auxiliary"
    Error {
        line_num: 36,
        kind: Some(
            Error,
            Error,
        ),
        msg: "36:12: 36:17: cannot mutably borrow {$place_desc} in  [E0510]",
    Error {
        line_num: 50,
        kind: Some(
            Error,
            Error,
        ),
        msg: "50:12: 50:17: cannot mutably borrow {$place_desc} in  [E0510]",
    Error {
        line_num: 64,
        kind: Some(
            Error,
            Error,
        ),
        msg: "64:12: 64:17: cannot mutably borrow {$place_desc} in  [E0510]",
    Error {
        line_num: 71,
        kind: Some(
            Error,
            Error,
        ),
        msg: "71:12: 71:17: cannot mutably borrow {$place_desc} in  [E0510]",
]

not found errors (from test file): [
    Error {
    Error {
        line_num: 36,
        kind: Some(
            Error,
        ),
        msg: "cannot assign `x` in indexing expression",
    Error {
        line_num: 50,
        kind: Some(
            Error,
            Error,
        ),
        msg: "cannot assign `x` in indexing expression",
    Error {
        line_num: 64,
        kind: Some(
            Error,
            Error,
        ),
        msg: "cannot assign `x` in indexing expression",
    Error {
        line_num: 71,
        kind: Some(
            Error,
            Error,
        ),
        msg: "cannot assign `x` in indexing expression",
]

thread '[ui] src/test/ui/borrowck/slice-index-bounds-check-invalidation.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1434:13


---- [ui] src/test/ui/nll/issue-27282-mutate-before-diverging-arm-1.rs stdout ----

error: /checkout/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-1.rs:21: unexpected error: '21:14: 21:16: cannot mutably borrow {$place_desc} in  [E0510]'

error: /checkout/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-1.rs:21: expected error not found: cannot mutably borrow `x` in match guard [E0510]
error: 1 unexpected errors found, 1 expected errors not found
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-1.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-27282-mutate-before-diverging-arm-1" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-27282-mutate-before-diverging-arm-1/auxiliary"
    Error {
        line_num: 21,
        kind: Some(
            Error,
            Error,
        ),
        msg: "21:14: 21:16: cannot mutably borrow {$place_desc} in  [E0510]",
]

not found errors (from test file): [
    Error {
    Error {
        line_num: 21,
        kind: Some(
            Error,
        ),
        msg: "cannot mutably borrow `x` in match guard [E0510]",
]

thread '[ui] src/test/ui/nll/issue-27282-mutate-before-diverging-arm-1.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1434:13


---- [ui] src/test/ui/nll/issue-27282-mutate-before-diverging-arm-2.rs stdout ----

error: /checkout/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-2.rs:26: unexpected error: '26:18: 26:20: cannot mutably borrow {$place_desc} in  [E0510]'

error: /checkout/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-2.rs:26: expected error not found: cannot mutably borrow `x` in match guard [E0510]
error: 1 unexpected errors found, 1 expected errors not found
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-2.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-27282-mutate-before-diverging-arm-2" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-27282-mutate-before-diverging-arm-2/auxiliary"
    Error {
        line_num: 26,
        kind: Some(
            Error,
            Error,
        ),
        msg: "26:18: 26:20: cannot mutably borrow {$place_desc} in  [E0510]",
]

not found errors (from test file): [
    Error {
    Error {
        line_num: 26,
        kind: Some(
            Error,
        ),
        msg: "cannot mutably borrow `x` in match guard [E0510]",
]

thread '[ui] src/test/ui/nll/issue-27282-mutate-before-diverging-arm-2.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1434:13


---- [ui] src/test/ui/nll/issue-27282-mutate-before-diverging-arm-3.rs stdout ----

error: /checkout/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-3.rs:20: unexpected error: '20:14: 20:16: cannot mutably borrow {$place_desc} in  [E0510]'

error: /checkout/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-3.rs:20: expected error not found: cannot mutably borrow `x` in match guard [E0510]
error: 1 unexpected errors found, 1 expected errors not found
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/issue-27282-mutate-before-diverging-arm-3.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-27282-mutate-before-diverging-arm-3" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-27282-mutate-before-diverging-arm-3/auxiliary"
    Error {
        line_num: 20,
        kind: Some(
            Error,
            Error,
        ),
        msg: "20:14: 20:16: cannot mutably borrow {$place_desc} in  [E0510]",
]

not found errors (from test file): [
    Error {
    Error {
        line_num: 20,
        kind: Some(
            Error,
        ),
        msg: "cannot mutably borrow `x` in match guard [E0510]",
]

thread '[ui] src/test/ui/nll/issue-27282-mutate-before-diverging-arm-3.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1434:13

@AndyJado AndyJado closed this Oct 30, 2022
@davidtwco davidtwco mentioned this pull request Nov 8, 2022
84 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants