We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d39677c commit 6130860Copy full SHA for 6130860
crates/ide-assists/src/handlers/generate_function.rs
@@ -73,7 +73,7 @@ fn gen_fn(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option<()> {
73
Some(hir::PathResolution::Def(hir::ModuleDef::Adt(adt))) => {
74
if let hir::Adt::Enum(_) = adt {
75
// Don't suggest generating function if the name starts with an uppercase letter
76
- if name_ref.text().starts_with(char::is_uppercase) {
+ if fn_name.starts_with(char::is_uppercase) {
77
return None;
78
}
79
0 commit comments