File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -833,31 +833,6 @@ impl ast::IdentPat {
833833 }
834834}
835835
836- pub trait HasVisibilityEdit : ast:: HasVisibility {
837- fn set_visibility ( & self , visibility : Option < ast:: Visibility > ) {
838- if let Some ( visibility) = visibility {
839- match self . visibility ( ) {
840- Some ( current_visibility) => {
841- ted:: replace ( current_visibility. syntax ( ) , visibility. syntax ( ) )
842- }
843- None => {
844- let vis_before = self
845- . syntax ( )
846- . children_with_tokens ( )
847- . find ( |it| !matches ! ( it. kind( ) , WHITESPACE | COMMENT | ATTR ) )
848- . unwrap_or_else ( || self . syntax ( ) . first_child_or_token ( ) . unwrap ( ) ) ;
849-
850- ted:: insert ( ted:: Position :: before ( vis_before) , visibility. syntax ( ) ) ;
851- }
852- }
853- } else if let Some ( visibility) = self . visibility ( ) {
854- ted:: remove ( visibility. syntax ( ) ) ;
855- }
856- }
857- }
858-
859- impl < T : ast:: HasVisibility > HasVisibilityEdit for T { }
860-
861836pub trait Indent : AstNode + Clone + Sized {
862837 fn indent_level ( & self ) -> IndentLevel {
863838 IndentLevel :: from_node ( self . syntax ( ) )
You can’t perform that action at this time.
0 commit comments