Skip to content
Closed
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
26 changes: 11 additions & 15 deletions compiler/rustc_middle/src/query/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,22 +342,18 @@ macro_rules! define_callbacks {
})*
}

/// Holds per-query arenas for queries with the `arena_cache` modifier.
#[derive(Default)]
pub struct QueryArenas<'tcx> {
$($(#[$attr])* pub $name: query_if_arena!([$($modifiers)*]
(TypedArena<<$V as $crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>)
()
),)*
}

impl Default for QueryArenas<'_> {
fn default() -> Self {
Self {
$($name: query_if_arena!([$($modifiers)*]
(Default::default())
()
),)*
}
}
$(
$(#[$attr])*
pub $name: query_if_arena!([$($modifiers)*]
// Use the `ArenaCached` helper trait to determine the arena's value type.
(TypedArena<<$V as $crate::query::arena_cached::ArenaCached<'tcx>>::Allocated>)
// No arena for this query, so the field type is `()`.
()
),
)*
}

#[derive(Default)]
Expand Down
20 changes: 13 additions & 7 deletions tests/debuginfo/basic-stepping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@
//@ ignore-aarch64: Doesn't work yet.
//@ ignore-loongarch64: Doesn't work yet.
//@ ignore-riscv64: Doesn't work yet.
//@ compile-flags: -g
//@ ignore-backends: gcc

// Debugger tests need debuginfo
//@ compile-flags: -g

// FIXME(#128945): SingleUseConsts shouldn't need to be disabled.
//@ revisions: default-mir-passes no-SingleUseConsts-mir-pass
//@ [no-SingleUseConsts-mir-pass] compile-flags: -Zmir-enable-passes=-SingleUseConsts

//@ gdb-command: run
// FIXME(#97083): Should we be able to break on initialization of zero-sized types?
// FIXME(#97083): Right now the first breakable line is:
//@ gdb-check: let mut c = 27;
//@ gdb-command: next
//@ gdb-check: let d = c = 99;
//@ gdb-command: next
// FIXME(#33013): gdb-check: let e = "hi bob";
// FIXME(#33013): gdb-command: next
// FIXME(#33013): gdb-check: let f = b"hi bob";
// FIXME(#33013): gdb-command: next
// FIXME(#33013): gdb-check: let g = b'9';
// FIXME(#33013): gdb-command: next
//@ [no-SingleUseConsts-mir-pass] gdb-check: let e = "hi bob";
//@ [no-SingleUseConsts-mir-pass] gdb-command: next
//@ [no-SingleUseConsts-mir-pass] gdb-check: let f = b"hi bob";
//@ [no-SingleUseConsts-mir-pass] gdb-command: next
//@ [no-SingleUseConsts-mir-pass] gdb-check: let g = b'9';
//@ [no-SingleUseConsts-mir-pass] gdb-command: next
//@ gdb-check: let h = ["whatever"; 8];
//@ gdb-command: next
//@ gdb-check: let i = [1,2,3,4];
Expand Down
Loading