File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -625,31 +625,6 @@ impl ast::IdentPat {
625625 }
626626}
627627
628- pub trait HasVisibilityEdit : ast:: HasVisibility {
629- fn set_visibility ( & self , visibility : Option < ast:: Visibility > ) {
630- if let Some ( visibility) = visibility {
631- match self . visibility ( ) {
632- Some ( current_visibility) => {
633- ted:: replace ( current_visibility. syntax ( ) , visibility. syntax ( ) )
634- }
635- None => {
636- let vis_before = self
637- . syntax ( )
638- . children_with_tokens ( )
639- . find ( |it| !matches ! ( it. kind( ) , WHITESPACE | COMMENT | ATTR ) )
640- . unwrap_or_else ( || self . syntax ( ) . first_child_or_token ( ) . unwrap ( ) ) ;
641-
642- ted:: insert ( ted:: Position :: before ( vis_before) , visibility. syntax ( ) ) ;
643- }
644- }
645- } else if let Some ( visibility) = self . visibility ( ) {
646- ted:: remove ( visibility. syntax ( ) ) ;
647- }
648- }
649- }
650-
651- impl < T : ast:: HasVisibility > HasVisibilityEdit for T { }
652-
653628pub trait Indent : AstNode + Clone + Sized {
654629 fn indent_level ( & self ) -> IndentLevel {
655630 IndentLevel :: from_node ( self . syntax ( ) )
You can’t perform that action at this time.
0 commit comments