<commit_before>// Some ideas for future improvements:
// - Support replacing aliases which are used in expressions, e.g. `A::new()`.
// - "inline_alias_to_users" assist #10881.
// - Remove unused aliases if there are no longer any users, see inline_call.rs.

use hir::PathResolution;
use itertools::Itertools;
use std::collections::HashMap;
use syntax::{
    ast::{
        self,
        make::{self},
        HasGenericParams, HasName,
    },
    ted::{self},
    AstNode, NodeOrToken, SyntaxKind, SyntaxNode,
};

use crate::{
    assist_context::{AssistContext, Assists},
    AssistId, AssistKind,
};

// Assist: inline_type_alias
//
// Replace a type alias with its concrete type.
//
// ```
// type A<T = u32> = Vec<T>;<commit_msg>chore: Remove unused import<commit_after>// Some ideas for future improvements:
// - Support replacing aliases which are used in expressions, e.g. `A::new()`.
// - "inline_alias_to_users" assist #10881.
// - Remove unused aliases if there are no longer any users, see inline_call.rs.

use hir::PathResolution;
use itertools::Itertools;
use std::collections::HashMap;
use syntax::{
    ast::{
        self,
        make::{self},
        HasGenericParams, HasName,
    },
    ted::{self},
    AstNode, NodeOrToken, SyntaxNode,
};

use crate::{
    assist_context::{AssistContext, Assists},
    AssistId, AssistKind,
};

// Assist: inline_type_alias
//
// Replace a type alias with its concrete type.
//
// ```
// type A<T = u32> = Vec<T>;
{'fraction_non_alphanumeric': 0.145578231292517, 'fraction_numerical': 0.009523809523809525, 'mean_word_length': 3.364985163204748, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6810776', 'n_tokens_mistral': 480, 'n_tokens_neox': 487, 'n_words': 139}