Skip to content

When error from local macro, include macro def span - #161051

Open
estebank wants to merge 1 commit into
rust-lang:mainfrom
estebank:macro_backtrace
Open

When error from local macro, include macro def span#161051
estebank wants to merge 1 commit into
rust-lang:mainfrom
estebank:macro_backtrace

Conversation

@estebank

Copy link
Copy Markdown
Contributor
  • mention -Zmacro-backtrace only for non-local macros
  • include span for local macro encompassing error

- mention `-Zmacro-backtrace` only for non-local macros
- include span for local macro encompassing error
@rustbot

rustbot commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

rustc_errors::emitter was changed

cc @Muscraft

@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 Aug 13, 2026
@rustbot

rustbot commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

r? @adwinwhite

rustbot has assigned @adwinwhite.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 18 candidates

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/internal-lints/find_attr/find_attr.stderr`
diff of stderr:

68    |
69 LL |     find_attr!(attrs, wildcard);
70    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    = note: this error originates in the macro `$crate::find_attr` which comes from the expansion of the macro `find_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: the error originates in the macro `$crate::find_attr` which comes from the expansion of the macro `find_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
72 
73 error: aborting due to 6 previous errors
---
To only update this specific test, also pass `--test-args internal-lints/find_attr.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/internal-lints/find_attr.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,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" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/internal-lints/find_attr" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Z" "unstable-options"
stdout: none
--- stderr -------------------------------
error: use of `AttributeKind` in `find_attr!(...)` invocation
##[error]  --> /checkout/tests/ui-fulldeps/internal-lints/find_attr.rs:14:23
   |
LL |     find_attr!(attrs, AttributeKind::Inline(..));
   |                       ^^^^^^^^^^^^^
   |
   = note: `find_attr!(...)` already imports `AttributeKind::*`
   = help: remove `AttributeKind`
note: the lint level is defined here
  --> /checkout/tests/ui-fulldeps/internal-lints/find_attr.rs:5:9
   |
LL | #![deny(rustc::bad_use_of_find_attr)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: use of `AttributeKind` in `find_attr!(...)` invocation
##[error]  --> /checkout/tests/ui-fulldeps/internal-lints/find_attr.rs:16:23
   |
LL |     find_attr!(attrs, AttributeKind::Inline{..} | AttributeKind::Deprecated {..});
   |                       ^^^^^^^^^^^^^
   |
   = note: `find_attr!(...)` already imports `AttributeKind::*`
   = help: remove `AttributeKind`

error: use of `AttributeKind` in `find_attr!(...)` invocation
##[error]  --> /checkout/tests/ui-fulldeps/internal-lints/find_attr.rs:16:51
   |
LL |     find_attr!(attrs, AttributeKind::Inline{..} | AttributeKind::Deprecated {..});
   |                                                   ^^^^^^^^^^^^^
   |
   = note: `find_attr!(...)` already imports `AttributeKind::*`
   = help: remove `AttributeKind`

error: use of `AttributeKind` in `find_attr!(...)` invocation
##[error]  --> /checkout/tests/ui-fulldeps/internal-lints/find_attr.rs:20:23
   |
LL |     find_attr!(attrs, AttributeKind::Inline(..) => todo!());
   |                       ^^^^^^^^^^^^^
   |
   = note: `find_attr!(...)` already imports `AttributeKind::*`
   = help: remove `AttributeKind`

error: use of `AttributeKind` in `find_attr!(...)` invocation
##[error]  --> /checkout/tests/ui-fulldeps/internal-lints/find_attr.rs:22:23
   |
LL |     find_attr!(attrs, AttributeKind::Inline(..) if true => todo!());
   |                       ^^^^^^^^^^^^^
   |
   = note: `find_attr!(...)` already imports `AttributeKind::*`
   = help: remove `AttributeKind`

error: unreachable pattern
##[error]  --> /checkout/tests/ui-fulldeps/internal-lints/find_attr.rs:25:5
   |
LL |     find_attr!(attrs, wildcard);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no value can reach this
   |
note: multiple earlier patterns match some of the same values
  --> /checkout/tests/ui-fulldeps/internal-lints/find_attr.rs:25:5
   |
LL |     find_attr!(attrs, wildcard);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     matches some of the same values
   |     matches some of the same values
   |     collectively making this unreachable
note: the lint level is defined here
  --> /checkout/tests/ui-fulldeps/internal-lints/find_attr.rs:25:5
   |
LL |     find_attr!(attrs, wildcard);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: the error originates in the macro `$crate::find_attr` which comes from the expansion of the macro `find_attr` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 6 previous errors
------------------------------------------
---
To only update this specific test, also pass `--test-args internal-lints/lint_pass_impl_without_macro.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,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" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/internal-lints/lint_pass_impl_without_macro" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Z" "unstable-options"
stdout: none
--- stderr -------------------------------
error: implementing `LintPass` by hand
##[error]  --> /checkout/tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs:20:6
   |
---
---- [ui] tests/ui-fulldeps/rustc-dev-remap.rs#only-remap stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/rustc-dev-remap.only-remap/rustc-dev-remap.only-remap.stderr`
diff of stderr:

24   ::: /rustc-dev/xyz/compiler/rustc_ast/src/visit.rs:LL:COL
25    |
26    = note: in this macro invocation
-    = note: this error originates in the macro `common_visitor_and_walkers` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: the error originates in the macro `common_visitor_and_walkers` (in Nightly builds, run with -Z macro-backtrace for more info)
28 
---
To only update this specific test, also pass `--test-args rustc-dev-remap.rs`

error in revision `only-remap`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/rustc-dev-remap.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "only_remap" "--check-cfg" "cfg(test,FALSE,only_remap,remap_unremap)" "--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" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/rustc-dev-remap.only-remap" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Z" "simulate-remapped-rust-src-base=/rustc-dev/xyz"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `NotAValidResultType: VisitorResult` is not satisfied
##[error]  --> /checkout/tests/ui-fulldeps/rustc-dev-remap.rs:26:19
   |
LL |     type Result = NotAValidResultType;
   |                   ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
   |
help: the nightly-only, unstable trait `VisitorResult` is not implemented for `NotAValidResultType`
  --> /checkout/tests/ui-fulldeps/rustc-dev-remap.rs:23:1
   |
LL | struct NotAValidResultType;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
help: the following other types implement trait `VisitorResult`
  --> /rustc-dev/xyz/compiler/rustc_ast_ir/src/visit.rs:12:0
   |
   = note: `()`
  ::: /rustc-dev/xyz/compiler/rustc_ast_ir/src/visit.rs:27:0
   |
   = note: `ControlFlow<T>`
  ::: /rustc-dev/xyz/compiler/rustc_ast_ir/src/visit.rs:44:0
   |
   = note: `Result<(), E>`
note: required by a bound in `rustc_ast::visit::Visitor::Result`
  --> /rustc-dev/xyz/compiler/rustc_ast/src/visit.rs:516:16
  ::: /rustc-dev/xyz/compiler/rustc_ast/src/visit.rs:1143:0
   |
   = note: in this macro invocation
   = note: the error originates in the macro `common_visitor_and_walkers` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error
---
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/rustc-dev-remap.remap-unremap/rustc-dev-remap.remap-unremap.stderr`
diff of stderr:

28 ...
29 LL | common_visitor_and_walkers!(Visitor<'a>);
30    | ---------------------------------------- in this macro invocation
-    = note: this error originates in the macro `common_visitor_and_walkers` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: the error originates in the macro `common_visitor_and_walkers` (in Nightly builds, run with -Z macro-backtrace for more info)
32 
33 error: aborting due to 1 previous error
---
To only update this specific test, also pass `--test-args rustc-dev-remap.rs`

error in revision `remap-unremap`: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/rustc-dev-remap.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "remap_unremap" "--check-cfg" "cfg(test,FALSE,only_remap,remap_unremap)" "--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" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/rustc-dev-remap.remap-unremap" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Z" "simulate-remapped-rust-src-base=/rustc-dev/xyz" "-Ztranslate-remapped-path-to-local-path=yes"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `NotAValidResultType: VisitorResult` is not satisfied
##[error]  --> /checkout/tests/ui-fulldeps/rustc-dev-remap.rs:26:19
   |
LL |     type Result = NotAValidResultType;
   |                   ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
   |
help: the nightly-only, unstable trait `VisitorResult` is not implemented for `NotAValidResultType`
  --> /checkout/tests/ui-fulldeps/rustc-dev-remap.rs:23:1
   |
LL | struct NotAValidResultType;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
help: the following other types implement trait `VisitorResult`
---
...
LL | impl<T> VisitorResult for ControlFlow<T> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ControlFlow<T>`
...
LL | impl<E> VisitorResult for Result<(), E> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Result<(), E>`
note: required by a bound in `rustc_ast::visit::Visitor::Result`
  --> /checkout/compiler/rustc_ast/src/visit.rs:516:30
   |
LL |                 type Result: VisitorResult = ();
   |                              ^^^^^^^^^^^^^ required by this bound in `Visitor::Result`
...
LL | common_visitor_and_walkers!(Visitor<'a>);
   | ---------------------------------------- in this macro invocation
   = note: the error originates in the macro `common_visitor_and_walkers` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

---
To only update this specific test, also pass `--test-args session-diagnostic/diagnostic-derive-doc-comment-field.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,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" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0"
stdout: none
--- stderr -------------------------------
error[E0277]: the trait bound `NotIntoDiagArg: IntoDiagArg` is not satisfied
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs:35:10
   |
---
             Box<(dyn std::error::Error + 'static)>
             CString
             Cow<'a, str>
           and 44 others
   = note: there's an inherent method on `DiagInner` of the same name, which can be auto-dereferenced from `&mut DiagInner`
note: required by a bound in `Diag::<'a, G>::arg`
  --> /rustc/FAKE_PREFIX/compiler/rustc_errors/src/diagnostic.rs:520:8
  ::: /rustc/FAKE_PREFIX/compiler/rustc_errors/src/diagnostic.rs:1230:7
   |
   = note: in this macro invocation
   = note: the error originates in the macro `with_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
---
diff of stderr:

163    |          ^^^^^^^^^^ expected `}` in format string
164    |
165    = note: if you intended to print `{`, you can escape it using `{{`
-    = note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: the error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
167 
168 error: invalid format string: unmatched `}` found
169   --> $DIR/diagnostic-derive-inline.rs:178:10

172    |          ^^^^^^^^^^ unmatched `}` in format string
173    |
174    = note: if you intended to print `}`, you can escape it using `}}`
-    = note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: the error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
176 
177 error: derive(Diagnostic): the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
178   --> $DIR/diagnostic-derive-inline.rs:198:5


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args session-diagnostic/diagnostic-derive-inline.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,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" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/diagnostic-derive-inline" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0"
stdout: none
--- stderr -------------------------------
error: derive(Diagnostic): unsupported type attribute for diagnostic derive enum
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:44:1
   |
---
   |
LL |     Foo,
   |     ^^^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: derive(Diagnostic): diagnostic message not specified
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:49:5
   |
LL |     Bar,
   |     ^^^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: expected parentheses: #[diag(...)]
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:55:8
   |
LL | #[diag = "E0123"]
   |        ^

error: derive(Diagnostic): `#[nonsense(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:60:1
   |
LL | #[nonsense("this is an example message", code = E0123)]
   | ^

error: derive(Diagnostic): diagnostic message not specified
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:60:1
   |
LL | #[nonsense("this is an example message", code = E0123)]
   | ^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: derive(Diagnostic): diagnostic message not specified
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:67:1
   |
LL | #[diag(code = E0123)]
   | ^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: derive(Diagnostic): diagnostic message not specified
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:72:1
   |
LL | #[diag(nonsense("foo"), code = E0123, slug = "foo")]
   | ^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: derive(Diagnostic): diagnostic message not specified
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:77:1
   |
LL | #[diag(nonsense = "...", code = E0123, slug = "foo")]
   | ^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: derive(Diagnostic): diagnostic message not specified
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:82:1
   |
LL | #[diag(nonsense = 4, code = E0123, slug = "foo")]
   | ^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: derive(Diagnostic): unknown argument
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:87:52
   |
LL | #[diag("this is an example message", code = E0123, slug = "foo")]
   |                                                    ^^^^
   |
   = note: only the `code` parameter is valid after the message

error: derive(Diagnostic): `#[suggestion = ...]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:94:5
   |
LL |     #[suggestion = "bar"]
   |     ^

---

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:106:52
   |
LL | #[diag("this is an example message", code = E0123, code = E0456)]
   |                                                    ^^^^
   |
note: previously specified here
  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:106:38
   |
LL | #[diag("this is an example message", code = E0123, code = E0456)]
   |                                      ^^^^

error: derive(Diagnostic): diagnostic message must be the first argument
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:111:38
   |
LL | #[diag("this is an example message", no_crate::example, code = E0123)]
   |                                      ^^^^^^^^

error: derive(Diagnostic): diagnostic message not specified
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:116:1
   |
LL | struct KindNotProvided {} //~ ERROR diagnostic message not specified
   | ^^^^^^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: derive(Diagnostic): diagnostic message not specified
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:119:1
   |
LL | #[diag(code = E0123)]
   | ^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: derive(Diagnostic): the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:130:5
   |
LL |     #[primary_span]
   |     ^

error: derive(Diagnostic): `#[nonsense]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:138:5
   |
LL |     #[nonsense]
   |     ^

error: derive(Diagnostic): the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:155:5
   |
LL |     #[label("with a label")]
   |     ^

error: derive(Diagnostic): `name` doesn't refer to a field on this type
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:163:46
   |
LL |     #[suggestion("with a suggestion", code = "{name}")]
   |                                              ^^^^^^^^

error: invalid format string: expected `}` but string was terminated
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:168:10
   |
LL | #[derive(Diagnostic)]
   |          ^^^^^^^^^^ expected `}` in format string
   |
   = note: if you intended to print `{`, you can escape it using `{{`
   = note: the error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)

error: invalid format string: unmatched `}` found
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:178:10
   |
LL | #[derive(Diagnostic)]
   |          ^^^^^^^^^^ unmatched `}` in format string
   |
   = note: if you intended to print `}`, you can escape it using `}}`
   = note: the error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)

error: derive(Diagnostic): the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:198:5
   |
LL |     #[label("with a label")]
   |     ^

error: derive(Diagnostic): suggestion without `code = "..."`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:217:5
   |
LL |     #[suggestion("with a suggestion")]
   |     ^

error: derive(Diagnostic): invalid nested attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:225:39
   |
LL |     #[suggestion("with a suggestion", nonsense = "bar")]
   |                                       ^^^^^^^^
   |
   = help: only `style`, `code` and `applicability` are valid nested attributes

error: derive(Diagnostic): suggestion without `code = "..."`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:225:5
   |
LL |     #[suggestion("with a suggestion", nonsense = "bar")]
   |     ^

error: derive(Diagnostic): invalid nested attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:234:39
   |
LL |     #[suggestion("with a suggestion", msg = "bar")]
   |                                       ^^^
   |
   = help: only `style`, `code` and `applicability` are valid nested attributes

error: derive(Diagnostic): suggestion without `code = "..."`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:234:5
   |
LL |     #[suggestion("with a suggestion", msg = "bar")]
   |     ^

error: derive(Diagnostic): wrong field type for suggestion
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:257:5
   |
LL |     #[suggestion("with a suggestion", code = "This is suggested code")]
   |     ^
   |
   = help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:273:24
   |
LL |     suggestion: (Span, Span, Applicability),
---
   |
LL |     suggestion: (Applicability, Applicability, Span),
   |                  ^^^^^^^^^^^^^

error: derive(Diagnostic): `#[label = ...]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:288:5
   |
LL |     #[label = "bar"]
   |     ^

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:387:5
   |
LL |     #[suggestion("with a suggestion", code = "...", applicability = "maybe-incorrect")]
   |     ^
   |
note: previously specified here
  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:389:24
   |
LL |     suggestion: (Span, Applicability),
   |                        ^^^^^^^^^^^^^

error: derive(Diagnostic): invalid applicability
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:395:69
   |
LL |     #[suggestion("with a suggestion", code = "...", applicability = "batman")]
   |                                                                     ^^^^^^^^

error: derive(Diagnostic): the `#[help(...)]` attribute can only be applied to fields of type `Span`, `MultiSpan`, `bool` or `()`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:458:5
   |
LL |     #[help("with a help")]
   |     ^

error: derive(Diagnostic): no nested attribute expected here
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:467:29
   |
LL |     #[label("with a label", foo)]
   |                             ^^^

error: derive(Diagnostic): a diagnostic message must be the first argument to the attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:475:29
   |
LL |     #[label("with a label", "and another one?")]
   |                             ^^^^^^^^^^^^^^^^^^

error: derive(Diagnostic): no nested attribute expected here
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:483:29
   |
LL |     #[label("with a label", foo = "...")]
   |                             ^^^

error: derive(Diagnostic): no nested attribute expected here
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:491:29
   |
LL |     #[label("with a label", foo("..."))]
   |                             ^^^

error: derive(Diagnostic): `#[error(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:511:1
   |
---
   |
LL | #[error("this is an example message", code = E0123)]
   | ^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: derive(Diagnostic): `#[warn_(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:518:1
   |
LL | #[warn_("this is an example message", code = E0123)]
   | ^

error: derive(Diagnostic): diagnostic message not specified
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:518:1
   |
LL | #[warn_("this is an example message", code = E0123)]
   | ^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: derive(Diagnostic): `#[lint(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:525:1
   |
LL | #[lint("this is an example message", code = E0123)]
---
   |
LL | #[lint("this is an example message", code = E0123)]
   | ^
   |
   = help: specify the message as the first argument to the `#[diag(...)]` attribute, such as `#[diag("Example error")]`

error: derive(Diagnostic): attribute specified multiple times
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:534:53
   |
LL |     #[suggestion("with a suggestion", code = "...", code = ",,,")]
   |                                                     ^^^^
   |
note: previously specified here
  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:534:39
   |
LL |     #[suggestion("with a suggestion", code = "...", code = ",,,")]
   |                                       ^^^^

error: derive(Diagnostic): wrong types for suggestion
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:543:24
   |
LL |     suggestion: (Span, usize),
   |                        ^^^^^
   |
   = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`

error: derive(Diagnostic): wrong types for suggestion
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:551:17
   |
LL |     suggestion: (Span,),
   |                 ^^^^^^^
   |
   = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`

error: derive(Diagnostic): suggestion without `code = "..."`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:558:5
   |
LL |     #[suggestion("with a suggestion")]
   |     ^

error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:565:1
   |
LL | #[multipart_suggestion("with a suggestion")]
   | ^
   |
   = help: consider creating a `Subdiagnostic` instead

error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:568:1
   |
LL | #[multipart_suggestion()]
   | ^
   |
   = help: consider creating a `Subdiagnostic` instead

error: derive(Diagnostic): `#[multipart_suggestion(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:572:5
   |
LL |     #[multipart_suggestion("with a suggestion")]
   |     ^
   |
   = help: consider creating a `Subdiagnostic` instead

error: derive(Diagnostic): `#[suggestion(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:580:1
   |
LL | #[suggestion("with a suggestion", code = "...")]
   | ^
   |
   = help: `#[label]` and `#[suggestion]` can only be applied to fields

error: derive(Diagnostic): `#[label]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:589:1
   |
LL | #[label]
   | ^
   |
   = help: subdiagnostic message is missing

error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:623:5
   |
LL |     #[subdiagnostic(bad)]
   |     ^

error: derive(Diagnostic): `#[subdiagnostic = ...]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:631:5
   |
LL |     #[subdiagnostic = "bad"]
   |     ^

error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:639:5
   |
LL |     #[subdiagnostic(bad, bad)]
   |     ^

error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:647:5
   |
LL |     #[subdiagnostic("bad")]
   |     ^

error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:655:5
   |
LL |     #[subdiagnostic(eager)]
   |     ^

error: derive(Diagnostic): `#[subdiagnostic(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:676:5
   |
LL |     #[subdiagnostic(eager)]
   |     ^

error: derive(Diagnostic): expected at least one string literal for `code(...)`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:707:44
   |
LL |     #[suggestion("with a suggestion", code())]
   |                                            ^

error: derive(Diagnostic): `code(...)` must contain only string literals
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:715:44
   |
LL |     #[suggestion("with a suggestion", code(foo))]
   |                                            ^^^

error: unexpected token, expected `)`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:715:44
   |
LL |     #[suggestion("with a suggestion", code(foo))]
   |                                            ^^^

error: expected string literal
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:724:46
   |
LL |     #[suggestion("with a suggestion", code = 3)]
   |                                              ^

error: derive(Diagnostic): `#[suggestion(...)]` is not a valid attribute
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:739:5
   |
LL |     #[suggestion("with a suggestion", code = "")]
   |     ^
   |
   = note: `#[suggestion(...)]` applied to `Vec` field is ambiguous
   = help: to show a suggestion consisting of multiple parts, use a `Subdiagnostic` annotated with `#[multipart_suggestion(...)]`
   = help: to show a variable set of suggestions, use a `Vec` of `Subdiagnostic`s annotated with `#[suggestion(...)]`

error: derive(Diagnostic): Variable `nosub` not found in diagnostic 
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:751:8
   |
LL | #[diag("does not exist: {$nosub}")]
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: Available fields: "sub"

error: cannot find attribute `nonsense` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:60:3
   |
LL | #[nonsense("this is an example message", code = E0123)]
   |   ^^^^^^^^

error: cannot find attribute `nonsense` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:138:7
   |
---

error: cannot find attribute `warn_` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:518:3
   |
LL | #[warn_("this is an example message", code = E0123)]
   |   ^^^^^
   |
help: a built-in attribute with a similar name exists
   |
LL - #[warn_("this is an example message", code = E0123)]
LL + #[warn("this is an example message", code = E0123)]
   |

error: cannot find attribute `lint` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:525:3
   |
LL | #[lint("this is an example message", code = E0123)]
   |   ^^^^
   |
help: a built-in attribute with a similar name exists
   |
LL - #[lint("this is an example message", code = E0123)]
LL + #[link("this is an example message", code = E0123)]
   |

error: cannot find attribute `multipart_suggestion` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:565:3
   |
LL | #[multipart_suggestion("with a suggestion")]
   |   ^^^^^^^^^^^^^^^^^^^^
   |
help: `multipart_suggestion` is an attribute that can be used by the derive macro `Subdiagnostic`, you might be missing a `derive` attribute
   |
LL + #[derive(Subdiagnostic)]
---

error: cannot find attribute `multipart_suggestion` in this scope
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-inline.rs:572:7
   |
LL |     #[multipart_suggestion("with a suggestion")]
   |       ^^^^^^^^^^^^^^^^^^^^
   |
   = note: `multipart_suggestion` is an attribute that can be used by the derive macro `Subdiagnostic`, you might be missing a `derive` attribute

error: aborting due to 75 previous errors
---
diff of stderr:

47    = note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
48    = help: add `#![feature(rustc_private)]` to the crate attributes to enable
49    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-    = note: this error originates in the derive macro `StableHash` (in Nightly builds, run with -Z macro-backtrace for more info)
+    = note: the error originates in the derive macro `StableHash` (in Nightly builds, run with -Z macro-backtrace for more info)
51 
52 error: aborting due to 5 previous errors
53 
---
To only update this specific test, also pass `--test-args stable-hash-is-unstable.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui-fulldeps/stable-hash-is-unstable.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,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" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui-fulldeps/stable-hash-is-unstable" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Zdeduplicate-diagnostics=yes"
stdout: none
--- stderr -------------------------------
error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
##[error]  --> /checkout/tests/ui-fulldeps/stable-hash-is-unstable.rs:2:1
   |
LL | extern crate rustc_data_structures;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
   = help: add `#![feature(rustc_private)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
##[error]  --> /checkout/tests/ui-fulldeps/stable-hash-is-unstable.rs:6:1
   |
LL | extern crate rustc_macros;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
   = help: add `#![feature(rustc_private)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
##[error]  --> /checkout/tests/ui-fulldeps/stable-hash-is-unstable.rs:10:1
   |
LL | extern crate rustc_middle;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
   = help: add `#![feature(rustc_private)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
##[error]  --> /checkout/tests/ui-fulldeps/stable-hash-is-unstable.rs:15:5
   |
LL | use rustc_macros::StableHash;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
   = help: add `#![feature(rustc_private)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
##[error]  --> /checkout/tests/ui-fulldeps/stable-hash-is-unstable.rs:20:10
   |
LL | #[derive(StableHash)]
   |          ^^^^^^^^^^
   |
   = note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
   = help: add `#![feature(rustc_private)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = note: the error originates in the derive macro `StableHash` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 5 previous errors

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

@rust-bors

rust-bors Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants