Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,10 @@ rustc_queries! {
/// The root query triggering all analysis passes like typeck or borrowck.
query analysis(key: ()) {
eval_always
desc { "running analysis passes on this crate" }
desc { |tcx|
"running analysis passes on crate `{}`",
tcx.crate_name(LOCAL_CRATE),
}
}

/// This query checks the fulfillment of collected lint expectations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ note: ...which requires elaborating drops for `<impl at $DIR/issue-24949-assoc-c
LL | const BAR: u32 = IMPL_REF_BAR;
| ^^^^^^^^^^^^
= note: ...which again requires simplifying constant for the type system `IMPL_REF_BAR`, completing the cycle
= note: cycle used when running analysis passes on this crate
= note: cycle used when running analysis passes on crate `issue_24949_assoc_const_static_recursion_impl`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error: aborting due to 1 previous error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ note: ...which requires elaborating drops for `<impl at $DIR/issue-24949-assoc-c
LL | const BAR: u32 = TRAIT_REF_BAR;
| ^^^^^^^^^^^^^
= note: ...which again requires simplifying constant for the type system `TRAIT_REF_BAR`, completing the cycle
= note: cycle used when running analysis passes on this crate
= note: cycle used when running analysis passes on crate `issue_24949_assoc_const_static_recursion_trait`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error: aborting due to 1 previous error
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/consts/const-eval/const-eval-query-stack.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ note: please make sure that you have updated to the latest nightly
query stack during panic:
#0 [eval_to_allocation_raw] const-evaluating + checking `X`
#1 [eval_to_const_value_raw] simplifying constant for the type system `X`
#2 [analysis] running analysis passes on this crate
#2 [analysis] running analysis passes on crate `const_eval_query_stack`
end of query stack
2 changes: 1 addition & 1 deletion tests/ui/consts/recursive-zst-static.default.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ note: ...which requires evaluating initializer of static `B`...
LL | static B: () = A;
| ^^^^^^^^^^^^
= note: ...which again requires evaluating initializer of static `A`, completing the cycle
= note: cycle used when running analysis passes on this crate
= note: cycle used when running analysis passes on crate `recursive_zst_static`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error: aborting due to 2 previous errors
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/consts/recursive-zst-static.unleash.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ note: ...which requires evaluating initializer of static `B`...
LL | static B: () = A;
| ^^^^^^^^^^^^
= note: ...which again requires evaluating initializer of static `A`, completing the cycle
= note: cycle used when running analysis passes on this crate
= note: cycle used when running analysis passes on crate `recursive_zst_static`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error: aborting due to 2 previous errors
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/issues/issue-17252.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ note: ...which requires const-evaluating + checking `FOO`...
LL | const FOO: usize = FOO;
| ^^^
= note: ...which again requires simplifying constant for the type system `FOO`, completing the cycle
= note: cycle used when running analysis passes on this crate
= note: cycle used when running analysis passes on crate `issue_17252`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error[E0391]: cycle detected when simplifying constant for the type system `main::BAR`
Expand All @@ -25,7 +25,7 @@ note: ...which requires const-evaluating + checking `main::BAR`...
LL | const BAR: usize = BAR;
| ^^^
= note: ...which again requires simplifying constant for the type system `main::BAR`, completing the cycle
= note: cycle used when running analysis passes on this crate
= note: cycle used when running analysis passes on crate `issue_17252`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error: aborting due to 2 previous errors
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/parallel-rustc/cycle_crash-issue-135870.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ note: ...which requires const-evaluating + checking `FOO`...
LL | const FOO: usize = FOO;
| ^^^
= note: ...which again requires simplifying constant for the type system `FOO`, completing the cycle
= note: cycle used when running analysis passes on this crate
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does is this line removed?

Copy link
Contributor

Choose a reason for hiding this comment

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

The rest of the PR looks fine, but this is a worry, because this test looks very similar to the other tests but it is changed in a different way.

= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0391`.
For more information about this error, try `rustc --explain E0391`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the file-ending newline removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be perfectly honest: not the faintest idea why my changes affect this test at all 😵

2 changes: 1 addition & 1 deletion tests/ui/recursion/issue-23302-3.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ note: ...which requires const-evaluating + checking `B`...
LL | const B: i32 = A;
| ^
= note: ...which again requires simplifying constant for the type system `A`, completing the cycle
= note: cycle used when running analysis passes on this crate
= note: cycle used when running analysis passes on crate `issue_23302_3`
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

error: aborting due to 1 previous error
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/track-diagnostics/track.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ note: compiler flags: ... -Z ui-testing ... -Z track-diagnostics

query stack during panic:
#0 [typeck] type-checking `main`
#1 [analysis] running analysis passes on this crate
#1 [analysis] running analysis passes on crate `track`
end of query stack
error: aborting due to 3 previous errors

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/treat-err-as-bug/err.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ error: the compiler unexpectedly panicked. this is a bug.

query stack during panic:
#0 [eval_static_initializer] evaluating initializer of static `C`
#1 [analysis] running analysis passes on this crate
#1 [analysis] running analysis passes on crate `err`
end of query stack
Loading