Skip to main content

ast_rename

Function ast_rename 

Source
pub fn ast_rename(
    path: &Path,
    old: &str,
    new: &str,
    mode: ApplyMode,
    guard: Option<&PathGuard>,
) -> Result<EditResult>
Expand description

Rename all identifier occurrences of old to new in a source file.

Tree-sitter based (skips strings/comments). Zero replacements → NoMatch. See #1493.