Skip to content

Commit 577f70c

Browse files
committed
Reduce visibility
1 parent dfd2cef commit 577f70c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

crates/hir_expand/src/fixup.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ use tt::Subtree;
1414
/// (appending to and replacing nodes), the information that is needed to
1515
/// reverse those changes afterwards, and a token map.
1616
#[derive(Debug)]
17-
pub struct SyntaxFixups {
18-
pub append: FxHashMap<SyntaxNode, Vec<SyntheticToken>>,
19-
pub replace: FxHashMap<SyntaxNode, Vec<SyntheticToken>>,
20-
pub undo_info: SyntaxFixupUndoInfo,
21-
pub token_map: TokenMap,
22-
pub next_id: u32,
17+
pub(crate) struct SyntaxFixups {
18+
pub(crate) append: FxHashMap<SyntaxNode, Vec<SyntheticToken>>,
19+
pub(crate) replace: FxHashMap<SyntaxNode, Vec<SyntheticToken>>,
20+
pub(crate) undo_info: SyntaxFixupUndoInfo,
21+
pub(crate) token_map: TokenMap,
22+
pub(crate) next_id: u32,
2323
}
2424

2525
/// This is the information needed to reverse the fixups.
@@ -30,7 +30,7 @@ pub struct SyntaxFixupUndoInfo {
3030

3131
const EMPTY_ID: SyntheticTokenId = SyntheticTokenId(!0);
3232

33-
pub fn fixup_syntax(node: &SyntaxNode) -> SyntaxFixups {
33+
pub(crate) fn fixup_syntax(node: &SyntaxNode) -> SyntaxFixups {
3434
let mut append = FxHashMap::default();
3535
let mut replace = FxHashMap::default();
3636
let mut preorder = node.preorder();
@@ -122,7 +122,7 @@ fn has_error_to_handle(node: &SyntaxNode) -> bool {
122122
has_error(node) || node.children().any(|c| !can_handle_error(&c) && has_error_to_handle(&c))
123123
}
124124

125-
pub fn reverse_fixups(tt: &mut Subtree, token_map: &TokenMap, undo_info: &SyntaxFixupUndoInfo) {
125+
pub(crate) fn reverse_fixups(tt: &mut Subtree, token_map: &TokenMap, undo_info: &SyntaxFixupUndoInfo) {
126126
tt.token_trees.retain(|tt| match tt {
127127
tt::TokenTree::Leaf(leaf) => {
128128
token_map.synthetic_token_id(leaf.id()).is_none()

0 commit comments

Comments
 (0)