Skip to content

Commit 5f07e18

Browse files
authored
Merge pull request #247 from nikomatsakis/doc-comment
move doc comments into macro so they reach rustdoc
2 parents 457b473 + 93e133c commit 5f07e18

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

chalk-engine/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ index_struct! {
8585
}
8686
}
8787

88-
/// The StackIndex identifies the position of a table's goal in the
89-
/// stack of goals that are actively being processed. Note that once a
90-
/// table is completely evaluated, it may be popped from the stack,
91-
/// and hence no longer have a stack index.
9288
index_struct! {
89+
/// The StackIndex identifies the position of a table's goal in the
90+
/// stack of goals that are actively being processed. Note that once a
91+
/// table is completely evaluated, it may be popped from the stack,
92+
/// and hence no longer have a stack index.
9393
struct StackIndex {
9494
value: usize,
9595
}

chalk-engine/src/stack.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ pub(crate) struct Stack {
88
stack: Vec<StackEntry>,
99
}
1010

11-
/// The StackIndex identifies the position of a table's goal in the
12-
/// stack of goals that are actively being processed. Note that once a
13-
/// table is completely evaluated, it may be popped from the stack,
14-
/// and hence no longer have a stack index.
1511
index_struct! {
12+
/// The StackIndex identifies the position of a table's goal in the
13+
/// stack of goals that are actively being processed. Note that once a
14+
/// table is completely evaluated, it may be popped from the stack,
15+
/// and hence no longer have a stack index.
1616
pub(crate) struct StackIndex {
1717
value: usize,
1818
}

chalk-macros/src/index.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#[macro_export]
22
macro_rules! index_struct {
3-
($v:vis struct $n:ident {
3+
($(#[$m:meta])* $v:vis struct $n:ident {
44
$vf:vis value: usize,
55
}) => {
66
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7+
$(#[$m])*
78
$v struct $n {
89
$vf value: usize,
910
}

chalk-solve/src/wf.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ impl FoldInputTypes for Ty {
8585
// lazily, so no need to include them here.
8686
Ty::ForAll(..) => (),
8787

88-
Ty::InferenceVar(..) => {
89-
panic!("unexpected inference variable in wf rules: {:?}", self,)
90-
}
88+
Ty::InferenceVar(..) => panic!("unexpected inference variable in wf rules: {:?}", self),
9189
}
9290
}
9391
}

0 commit comments

Comments
 (0)