pub struct TestFn {
pub def_id: DefId,
pub name: String,
pub should_panic: bool,
}Expand description
A well-formed @test function, collected by [collect_item] in the same
order resolve_program’s item walk visits it — source order (modules in
registration order, items within a module in file order; see
collected_tests_are_in_source_order_with_should_panic_attached in
nova-typeck for why that order must be exact and stable). Task 3 reads
this to build a dispatching main that runs one test per process,
selected by index; Task 5 reads test names back out of the compiled
binary, not from this struct directly — so an index and a name can never
silently disagree between the two only if this order never does either.
Fields§
§def_id: DefId§name: String§should_panic: boolTrait Implementations§
Auto Trait Implementations§
impl Freeze for TestFn
impl RefUnwindSafe for TestFn
impl Send for TestFn
impl Sync for TestFn
impl Unpin for TestFn
impl UnsafeUnpin for TestFn
impl UnwindSafe for TestFn
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more