-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: convert unmerge_use to SyntaxFactory SyntaxEditor abstraction #18565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,7 +2,7 @@ | |||||
use itertools::Itertools; | ||||||
|
||||||
use crate::{ | ||||||
ast::{self, make, HasName}, | ||||||
ast::{self, make, HasName, HasVisibility, Use, UseTree}, | ||||||
syntax_editor::SyntaxMappingBuilder, | ||||||
AstNode, | ||||||
}; | ||||||
|
@@ -107,4 +107,12 @@ | |||||
|
||||||
ast | ||||||
} | ||||||
|
||||||
pub fn use_(&self, visibility: Option<ast::Visibility>, use_tree: ast::UseTree) -> ast::Use { | ||||||
make::use_(visibility, use_tree) | ||||||
} | ||||||
|
||||||
pub fn use_tree(&self, path: ast::Path, use_tree_list: Option<ast::UseTreeList>, alias: Option<ast::Rename>, add_star: bool) -> ast::UseTree { | ||||||
make::use_tree(path, use_tree_list, alias, add_star) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have implemented this change, but I am unable to run |
||||||
} | ||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have implemented this change, but I am unable to run
cargo test
due to some build error on my side. I think it has to do with the new version of Rust, but I am unable to compile a number of crates likeserde
and linking withrust-lld
with crates likelibc
andcrossbeam-utils