Repository: rust-analyzer/rust-analyzer
Pull request #10767 (2021-11-14 15:26:43)

minor: Rename intern_macro -> intern_macro_call
We potentially want to intern macro definitions so the names would probably collide
bors r+


Patch:
diff --git a/crates/flycheck/src/lib.rs b/crates/flycheck/src/lib.rs
index d34c9e1472..1641f744cd 100644
--- a/crates/flycheck/src/lib.rs
+++ b/crates/flycheck/src/lib.rs
@@ -326,13 +326,13 @@ impl CargoActor {
         );
         match output {
             Ok(_) if read_at_least_one_message => Ok(()),
-            Ok(output) if output.status.success() => Ok(()),
-            Ok(output)  => {
+            Ok(output) if output.status.success() => {
                 Err(io::Error::new(io::ErrorKind::Other, format!(
                     "Cargo watcher failed, the command produced no valid metadata (exit code: {:?})",
                     output.status
                 )))
             }
+            Ok(_) => Err(io::Error::new(io::ErrorKind::Other, error)),
             Err(e) => Err(e),
         }
     }
diff --git a/crates/hir/src/db.rs b/crates/hir/src/db.rs
index 19898f6839..e25d867845 100644
--- a/crates/hir/src/db.rs
+++ b/crates/hir/src/db.rs
@@ -5,7 +5,7 @@
 //! But we need this for at least LRU caching at the query level.
 pub use hir_def::db::*;
 pub use hir_expand::db::{
-    AstDatabase, AstDatabaseStorage, AstIdMapQuery, HygieneFrameQuery, InternMacroQuery,
+    AstDatabase, AstDatabaseStorage, AstIdMapQuery, HygieneFrameQuery, InternMacroCallQuery,
     MacroArgTextQuery, MacroDefQuery, MacroExpandQuery, ParseMacroExpansionQuery,
 };
 pub use hir_ty::db::*;
diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs
index c753369bfd..0cf868e64e 100644
--- a/crates/hir/src/semantics.rs
+++ b/crates/hir/src/semantics.rs
@@ -842,7 +842,7 @@ impl<'db> SemanticsImpl<'db> {
     fn resolve_attr_macro_call(&self, item: &ast::Item) -> Option<MacroDef> {
         let item_in_file = self.find_file(item.syntax().clone()).with_value(item.clone());
         let macro_call_id = self.with_ctx(|ctx| ctx.item_to_macro_call(item_in_file))?;
-        Some(MacroDef { id: self.db.lookup_intern_macro(macro_call_id).def })
+        Some(MacroDef { id: self.db.lookup_intern_macro_call(macro_call_id).def })
     }
 
     fn resolve_path(&self, path: &ast::Path) -> Option<PathResolution> {
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs
index 1c578dbdc2..b486beea7d 100644
--- a/crates/hir_def/src/nameres/collector.rs
+++ b/crates/hir_def/src/nameres/collector.rs
@@ -1141,7 +1141,7 @@ impl DefCollector<'_> {
                         &resolver,
                     ) {
                         Ok(call_id) => {
-                            let loc: MacroCallLoc = self.db.lookup_intern_macro(call_id);
+                            let loc: MacroCallLoc = self.db.lookup_intern_macro_call(call_id);
                             if let MacroDefKind::ProcMacro(exp, ..) = &loc.def.kind {
                                 if exp.is_dummy() {
                                     // Proc macros that cannot be expanded are treated as not
@@ -1214,7 +1214,7 @@ impl DefCollector<'_> {
         // First, fetch the raw expansion result for purposes of error reporting. This goes through
         // `macro_expand_error` to avoid depending on the full expansion result (to improve
         // incrementality).
-        let loc: MacroCallLoc = self.db.lookup_intern_macro(macro_call_id);
+        let loc: MacroCallLoc = self.db.lookup_intern_macro_call(macro_call_id);
         let err = self.db.macro_expand_error(macro_call_id);
         if let Some(err) = err {
             let diag = match err {
diff --git a/crates/hir_expand/src/builtin_derive_macro.rs b/crates/hir_expand/src/builtin_derive_macro.rs
index 31b99e3c41..c20dae8e6f 100644
--- a/crates/hir_expand/src/builtin_derive_macro.rs
+++ b/crates/hir_expand/src/builtin_derive_macro.rs
@@ -168,7 +168,7 @@ fn find_builtin_crate(db: &dyn AstDatabase, id: MacroCallId) -> tt::TokenTree {
     // FIXME: make hygiene works for builtin derive macro
     // such that $crate can be used here.
     let cg = db.crate_graph();
-    let krate = db.lookup_intern_macro(id).krate;
+    let krate = db.lookup_intern_macro_call(id).krate;
 
     // XXX
     //  All crates except core itself should have a dependency on core,
diff --git a/crates/hir_expand/src/builtin_fn_macro.rs b/crates/hir_expand/src/builtin_fn_macro.rs
index 7d45ba00d6..3add4c1103 100644
--- a/crates/hir_expand/src/builtin_fn_macro.rs
+++ b/crates/hir_expand/src/builtin_fn_macro.rs
@@ -326,7 +326,7 @@ fn cfg_expand(
     id: MacroCallId,
     tt: &tt::Subtree,
 ) -> ExpandResult<tt::Subtree> {
-    let loc = db.lookup_intern_macro(id);
+    let loc = db.lookup_intern_macro_call(id);
     let expr = CfgExpr::parse(tt);
     let enabled = db.crate_graph()[loc.krate].cfg_options.check(&expr) != Some(false);
     let expanded = if enabled { quote!(true) } else { quote!(false) };
@@ -338,7 +338,7 @@ fn panic_expand(
     id: MacroCallId,
     tt: &tt::Subtree,
 ) -> ExpandResult<tt::Subtree> {
-    let loc: MacroCallLoc = db.lookup_intern_macro(id);
+    let loc: MacroCallLoc = db.lookup_intern_macro_call(id);
     // Expand to a macro call `$crate::panic::panic_{edition}`
     let krate = tt::Ident { text: "$crate".into(), id: tt::TokenId::unspecified() };
     let mut call = if db.crate_graph()[loc.krate].edition == Edition::Edition2021 {
@@ -531,7 +531,7 @@ fn include_str_expand(
 }
 
 fn get_env_inner(db: &dyn AstDatabase, arg_id: MacroCallId, key: &str) -> Option<String> {
-    let krate = db.lookup_intern_macro(arg_id).krate;
+    let krate = db.lookup_intern_macro_call(arg_id).krate;
     db.crate_graph()[krate].env.get(key)
 }
 
diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs
index 63b5022ae8..747a19a509 100644
--- a/crates/hir_expand/src/db.rs
+++ b/crates/hir_expand/src/db.rs
@@ -103,7 +103,7 @@ pub trait AstDatabase: SourceDatabase {
     /// We encode macro definitions into ids of macro calls, this what allows us
     /// to be incremental.
     #[salsa::interned]
-    fn intern_macro(&self, macro_call: MacroCallLoc) -> MacroCallId;
+    fn intern_macro_call(&self, macro_call: MacroCallLoc) -> MacroCallId;
 
     /// Lowers syntactic macro call to a token tree representation.
     #[salsa::transparent]
@@ -139,7 +139,7 @@ pub fn expand_speculative(
     speculative_args: &SyntaxNode,
     token_to_map: SyntaxToken,
 ) -> Option<(SyntaxNode, SyntaxToken)> {
-    let loc = db.lookup_intern_macro(actual_macro_call);
+    let loc = db.lookup_intern_macro_call(actual_macro_call);
     let macro_def = db.macro_def(loc.def).ok()?;
     let token_range = token_to_map.text_range();
 
@@ -231,7 +231,7 @@ fn parse_macro_expansion(
         // Note:
         // The final goal we would like to make all parse_macro success,
         // such that the following log will not call anyway.
-        let loc: MacroCallLoc = db.lookup_intern_macro(macro_file.macro_call_id);
+        let loc: MacroCallLoc = db.lookup_intern_macro_call(macro_file.macro_call_id);
         let node = loc.kind.to_node(db);
 
         // collect parent information for warning log
@@ -296,7 +296,7 @@ fn parse_macro_expansion(
 
 fn macro_arg(db: &dyn AstDatabase, id: MacroCallId) -> Option<Arc<(tt::Subtree, mbe::TokenMap)>> {
     let arg = db.macro_arg_text(id)?;
-    let loc = db.lookup_intern_macro(id);
+    let loc = db.lookup_intern_macro_call(id);
 
     let node = SyntaxNode::new_root(arg);
     let censor = censor_for_macro_input(&loc, &node);
@@ -339,7 +339,7 @@ fn censor_for_macro_input(loc: &MacroCallLoc, node: &SyntaxNode) -> FxHashSet<Sy
 }
 
 fn macro_arg_text(db: &dyn AstDatabase, id: MacroCallId) -> Option<GreenNode> {
-    let loc = db.lookup_intern_macro(id);
+    let loc = db.lookup_intern_macro_call(id);
     let arg = loc.kind.arg(db)?;
     if matches!(loc.kind, MacroCallKind::FnLike { .. }) {
         let first = arg.first_child_or_token().map_or(T![.], |it| it.kind());
@@ -402,7 +402,7 @@ fn macro_def(db: &dyn AstDatabase, id: MacroDefId) -> Result<Arc<TokenExpander>,
 
 fn macro_expand(db: &dyn AstDatabase, id: MacroCallId) -> ExpandResult<Option<Arc<tt::Subtree>>> {
     let _p = profile::span("macro_expand");
-    let loc: MacroCallLoc = db.lookup_intern_macro(id);
+    let loc: MacroCallLoc = db.lookup_intern_macro_call(id);
     if let Some(eager) = &loc.eager {
         return ExpandResult {
             value: Some(eager.arg_or_expansion.clone()),
@@ -443,7 +443,7 @@ fn macro_expand_error(db: &dyn AstDatabase, macro_call: MacroCallId) -> Option<E
 }
 
 fn expand_proc_macro(db: &dyn AstDatabase, id: MacroCallId) -> ExpandResult<tt::Subtree> {
-    let loc: MacroCallLoc = db.lookup_intern_macro(id);
+    let loc: MacroCallLoc = db.lookup_intern_macro_call(id);
     let macro_arg = match db.macro_arg(id) {
         Some(it) => it,
         None => return ExpandResult::str_err("No arguments for proc-macro".to_string()),
@@ -488,7 +488,7 @@ fn hygiene_frame(db: &dyn AstDatabase, file_id: HirFileId) -> Arc<HygieneFrame>
 }
 
 fn macro_expand_to(db: &dyn AstDatabase, id: MacroCallId) -> ExpandTo {
-    let loc: MacroCallLoc = db.lookup_intern_macro(id);
+    let loc: MacroCallLoc = db.lookup_intern_macro_call(id);
     loc.kind.expand_to()
 }
 
diff --git a/crates/hir_expand/src/eager.rs b/crates/hir_expand/src/eager.rs
index b78d740c53..ea57c2c410 100644
--- a/crates/hir_expand/src/eager.rs
+++ b/crates/hir_expand/src/eager.rs
@@ -119,7 +119,7 @@ pub fn expand_eager_macro(
     // When `lazy_expand` is called, its *parent* file must be already exists.
     // Here we store an eager macro id for the argument expanded subtree here
     // for that purpose.
-    let arg_id = db.intern_macro(MacroCallLoc {
+    let arg_id = db.intern_macro_call(MacroCallLoc {
         def,
         krate,
         eager: Some(EagerCallInfo {
@@ -157,7 +157,7 @@ pub fn expand_eager_macro(
             kind: MacroCallKind::FnLike { ast_id: call_id, expand_to },
         };
 
-        Ok(db.intern_macro(loc))
+        Ok(db.intern_macro_call(loc))
     } else {
         panic!("called `expand_eager_macro` on non-eager macro def {:?}", def);
     }
diff --git a/crates/hir_expand/src/hygiene.rs b/crates/hir_expand/src/hygiene.rs
index 51f14d684c..e74c705217 100644
--- a/crates/hir_expand/src/hygiene.rs
+++ b/crates/hir_expand/src/hygiene.rs
@@ -141,7 +141,7 @@ impl HygieneInfo {
         let token_id = self.exp_map.token_by_range(token)?;
         let (mut token_id, origin) = self.macro_def.map_id_up(token_id);
 
-        let loc = db.lookup_intern_macro(self.file.macro_call_id);
+        let loc = db.lookup_intern_macro_call(self.file.macro_call_id);
 
         let (token_map, tt) = match &loc.kind {
             MacroCallKind::Attr { attr_args, .. } => match self.macro_arg_shift.unshift(token_id) {
@@ -213,7 +213,7 @@ impl HygieneFrame {
         let (info, krate, local_inner) = match file_id.0 {
             HirFileIdRepr::FileId(_) => (None, None, false),
             HirFileIdRepr::MacroFile(macro_file) => {
-                let loc = db.lookup_intern_macro(macro_file.macro_call_id);
+                let loc = db.lookup_intern_macro_call(macro_file.macro_call_id);
                 let info =
                     make_hygiene_info(db, macro_file, &loc).map(|info| (loc.kind.file_id(), info));
                 match loc.def.kind {
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs
index 0c4fdfa0fe..fdb639f55d 100644
--- a/crates/hir_expand/src/lib.rs
+++ b/crates/hir_expand/src/lib.rs
@@ -148,7 +148,7 @@ impl HirFileId {
         match self.0 {
             HirFileIdRepr::FileId(file_id) => file_id,
             HirFileIdRepr::MacroFile(macro_file) => {
-                let loc: MacroCallLoc = db.lookup_intern_macro(macro_file.macro_call_id);
+                let loc: MacroCallLoc = db.lookup_intern_macro_call(macro_file.macro_call_id);
                 let file_id = match &loc.eager {
                     Some(EagerCallInfo { included_file: Some(file), .. }) => (*file).into(),
                     _ => loc.kind.file_id(),
@@ -162,7 +162,7 @@ impl HirFileId {
         let mut level = 0;
         let mut curr = self;
         while let HirFileIdRepr::MacroFile(macro_file) = curr.0 {
-            let loc: MacroCallLoc = db.lookup_intern_macro(macro_file.macro_call_id);
+            let loc: MacroCallLoc = db.lookup_intern_macro_call(macro_file.macro_call_id);
 
             level += 1;
             curr = loc.kind.file_id();
@@ -175,7 +175,7 @@ impl HirFileId {
         match self.0 {
             HirFileIdRepr::FileId(_) => None,
             HirFileIdRepr::MacroFile(macro_file) => {
-                let loc: MacroCallLoc = db.lookup_intern_macro(macro_file.macro_call_id);
+                let loc: MacroCallLoc = db.lookup_intern_macro_call(macro_file.macro_call_id);
                 Some(loc.kind.to_node(db))
             }
         }
@@ -186,7 +186,7 @@ impl HirFileId {
         match self.0 {
             HirFileIdRepr::FileId(_) => None,
             HirFileIdRepr::MacroFile(macro_file) => {
-                let loc: MacroCallLoc = db.lookup_intern_macro(macro_file.macro_call_id);
+                let loc: MacroCallLoc = db.lookup_intern_macro_call(macro_file.macro_call_id);
 
                 let arg_tt = loc.kind.arg(db)?;
 
@@ -231,7 +231,7 @@ impl HirFileId {
         match self.0 {
             HirFileIdRepr::FileId(_) => None,
             HirFileIdRepr::MacroFile(macro_file) => {
-                let loc: MacroCallLoc = db.lookup_intern_macro(macro_file.macro_call_id);
+                let loc: MacroCallLoc = db.lookup_intern_macro_call(macro_file.macro_call_id);
                 let item = match loc.def.kind {
                     MacroDefKind::BuiltInDerive(..) => loc.kind.to_node(db),
                     _ => return None,
@@ -245,7 +245,7 @@ impl HirFileId {
         match self.0 {
             HirFileIdRepr::FileId(_) => false,
             HirFileIdRepr::MacroFile(macro_file) => {
-                let loc: MacroCallLoc = db.lookup_intern_macro(macro_file.macro_call_id);
+                let loc: MacroCallLoc = db.lookup_intern_macro_call(macro_file.macro_call_id);
                 match loc.def.kind {
                     MacroDefKind::ProcMacro(_, ProcMacroKind::CustomDerive, _) => true,
                     _ => false,
@@ -258,7 +258,7 @@ impl HirFileId {
     pub fn is_include_macro(&self, db: &dyn db::AstDatabase) -> bool {
         match self.0 {
             HirFileIdRepr::MacroFile(macro_file) => {
-                let loc: MacroCallLoc = db.lookup_intern_macro(macro_file.macro_call_id);
+                let loc: MacroCallLoc = db.lookup_intern_macro_call(macro_file.macro_call_id);
                 matches!(loc.eager, Some(EagerCallInfo { included_file: Some(_), .. }))
             }
             _ => false,
@@ -269,7 +269,7 @@ impl HirFileId {
     pub fn is_attr_macro(&self, db: &dyn db::AstDatabase) -> bool {
         match self.0 {
             HirFileIdRepr::MacroFile(macro_file) => {
-                let loc: MacroCallLoc = db.lookup_intern_macro(macro_file.macro_call_id);
+                let loc: MacroCallLoc = db.lookup_intern_macro_call(macro_file.macro_call_id);
                 matches!(loc.kind, MacroCallKind::Attr { .. })
             }
             _ => false,
@@ -288,7 +288,7 @@ impl MacroDefId {
         krate: CrateId,
         kind: MacroCallKind,
     ) -> MacroCallId {
-        db.intern_macro(MacroCallLoc { def: self, krate, eager: None, kind })
+        db.intern_macro_call(MacroCallLoc { def: self, krate, eager: None, kind })
     }
 
     pub fn ast_id(&self) -> Either<AstId<ast::Macro>, AstId<ast::Fn>> {
@@ -402,7 +402,7 @@ impl ExpansionInfo {
                 HirFileIdRepr::FileId(_) => return None,
                 HirFileIdRepr::MacroFile(macro_file) => macro_file.macro_call_id,
             };
-            let loc = db.lookup_intern_macro(call_id);
+            let loc = db.lookup_intern_macro_call(call_id);
 
             let token_range = token.value.text_range();
             match &loc.kind {
@@ -458,7 +458,7 @@ impl ExpansionInfo {
             HirFileIdRepr::FileId(_) => return None,
             HirFileIdRepr::MacroFile(macro_file) => macro_file.macro_call_id,
         };
-        let loc = db.lookup_intern_macro(call_id);
+        let loc = db.lookup_intern_macro_call(call_id);
 
         let (token_map, tt) = match &loc.kind {
             MacroCallKind::Attr { attr_args, .. } => match self.macro_arg_shift.unshift(token_id) {
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs
index f3c5dce7c3..710d6b7882 100644
--- a/crates/ide/src/inlay_hints.rs
+++ b/crates/ide/src/inlay_hints.rs
@@ -16,7 +16,6 @@ pub struct InlayHintsConfig {
     pub type_hints: bool,
     pub parameter_hints: bool,
     pub chaining_hints: bool,
-    pub hide_named_constructor_hints: bool,
     pub max_length: Option<usize>,
 }
 
@@ -214,9 +213,7 @@ fn get_bind_pat_hints(
         Some(label) => label,
         None => {
             let ty_name = ty.display_truncated(sema.db, config.max_length).to_string();
-            if config.hide_named_constructor_hints
-                && is_named_constructor(sema, pat, &ty_name).is_some()
-            {
+            if is_named_constructor(sema, pat, &ty_name).is_some() {
                 return None;
             }
             ty_name.into()
@@ -540,7 +537,6 @@ mod tests {
         type_hints: true,
         parameter_hints: true,
         chaining_hints: true,
-        hide_named_constructor_hints: false,
         max_length: None,
     };
 
@@ -556,7 +552,6 @@ mod tests {
                 parameter_hints: true,
                 type_hints: false,
                 chaining_hints: false,
-                hide_named_constructor_hints: false,
                 max_length: None,
             },
             ra_fixture,
@@ -570,7 +565,6 @@ mod tests {
                 parameter_hints: false,
                 type_hints: true,
                 chaining_hints: false,
-                hide_named_constructor_hints: false,
                 max_length: None,
             },
             ra_fixture,
@@ -584,7 +578,6 @@ mod tests {
                 parameter_hints: false,
                 type_hints: false,
                 chaining_hints: true,
-                hide_named_constructor_hints: false,
                 max_length: None,
             },
             ra_fixture,
@@ -615,7 +608,6 @@ mod tests {
                 type_hints: false,
                 parameter_hints: false,
                 chaining_hints: false,
-                hide_named_constructor_hints: false,
                 max_length: None,
             },
             r#"
@@ -1321,55 +1313,6 @@ fn main() {
 
     #[test]
     fn skip_constructor_type_hints() {
-        check_with_config(
-            InlayHintsConfig {
-                type_hints: true,
-                parameter_hints: true,
-                chaining_hints: true,
-                hide_named_constructor_hints: true,
-                max_length: None,
-            },
-            r#"
-//- minicore: try
-use core::ops::ControlFlow;
-
-struct Struct;
-struct TupleStruct();
-
-impl Struct {
-    fn new() -> Self {
-        Struct
-    }
-    fn try_new() -> ControlFlow<(), Self> {
-        ControlFlow::Continue(Struct)
-    }
-}
-
-struct Generic<T>(T);
-impl Generic<i32> {
-    fn new() -> Self {
-        Generic(0)
-    }
-}
-
-fn main() {
-    let strukt = Struct::new();
-    let tuple_struct = TupleStruct();
-    let generic0 = Generic::new();
-     // ^^^^^^^^ Generic<i32>
-    let generic1 = Generic::<i32>::new();
-    let generic2 = <Generic<i32>>::new();
-}
-
-fn fallible() -> ControlFlow<()> {
-    let strukt = Struct::try_new()?;
-}
-"#,
-        );
-    }
-
-    #[test]
-    fn shows_constructor_type_hints_when_enabled() {
         check_types(
             r#"
 //- minicore: try
@@ -1396,20 +1339,15 @@ impl Generic<i32> {
 
 fn main() {
     let strukt = Struct::new();
-     // ^^^^^^ Struct
     let tuple_struct = TupleStruct();
-     // ^^^^^^^^^^^^ TupleStruct
     let generic0 = Generic::new();
      // ^^^^^^^^ Generic<i32>
     let generic1 = Generic::<i32>::new();
-     // ^^^^^^^^ Generic<i32>
     let generic2 = <Generic<i32>>::new();
-     // ^^^^^^^^ Generic<i32>
 }
 
 fn fallible() -> ControlFlow<()> {
     let strukt = Struct::try_new()?;
-     // ^^^^^^ Struct
 }
 "#,
         );
@@ -1470,7 +1408,6 @@ fn main() {
                 parameter_hints: false,
                 type_hints: false,
                 chaining_hints: true,
-                hide_named_constructor_hints: false,
                 max_length: None,
             },
             r#"
@@ -1527,7 +1464,6 @@ fn main() {
                 parameter_hints: false,
                 type_hints: false,
                 chaining_hints: true,
-                hide_named_constructor_hints: false,
                 max_length: None,
             },
             r#"
@@ -1572,7 +1508,6 @@ fn main() {
                 parameter_hints: false,
                 type_hints: false,
                 chaining_hints: true,
-                hide_named_constructor_hints: false,
                 max_length: None,
             },
             r#"
@@ -1618,7 +1553,6 @@ fn main() {
                 parameter_hints: false,
                 type_hints: false,
                 chaining_hints: true,
-                hide_named_constructor_hints: false,
                 max_length: None,
             },
             r#"
diff --git a/crates/ide/src/static_index.rs b/crates/ide/src/static_index.rs
index 036839a801..75249a959d 100644
--- a/crates/ide/src/static_index.rs
+++ b/crates/ide/src/static_index.rs
@@ -106,7 +106,6 @@ impl StaticIndex<'_> {
                     type_hints: true,
                     parameter_hints: true,
                     chaining_hints: true,
-                    hide_named_constructor_hints: false,
                     max_length: Some(25),
                 },
                 file_id,
diff --git a/crates/ide_assists/src/handlers/add_missing_match_arms.rs b/crates/ide_assists/src/handlers/add_missing_match_arms.rs
index eeed0386ad..463fb1c914 100644
--- a/crates/ide_assists/src/handlers/add_missing_match_arms.rs
+++ b/crates/ide_assists/src/handlers/add_missing_match_arms.rs
@@ -197,19 +197,6 @@ fn cursor_at_trivial_match_arm_list(
         return Some(());
     }
 
-    // match x {
-    //     bar => baz,
-    //     $0
-    // }
-    if let Some(last_arm) = match_arm_list.arms().last() {
-        let last_arm_range = last_arm.syntax().text_range();
-        let match_expr_range = match_expr.syntax().text_range();
-        if last_arm_range.end() <= ctx.offset() && ctx.offset() < match_expr_range.end() {
-            cov_mark::hit!(add_missing_match_arms_end_of_last_arm);
-            return Some(());
-        }
-    }
-
     // match { _$0 => {...} }
     let wild_pat = ctx.find_node_at_offset_with_descend::<ast::WildcardPat>()?;
     let arm = wild_pat.syntax().parent().and_then(ast::MatchArm::cast)?;
@@ -689,41 +676,6 @@ fn main() {
         );
     }
 
-    #[test]
-    fn add_missing_match_arms_end_of_last_arm() {
-        cov_mark::check!(add_missing_match_arms_end_of_last_arm);
-        check_assist(
-            add_missing_match_arms,
-            r#"
-enum A { One, Two }
-enum B { One, Two }
-
-fn main() {
-    let a = A::One;
-    let b = B::One;
-    match (a, b) {
-        (A::Two, B::One) => {},$0
-    }
-}
-"#,
-            r#"
-enum A { One, Two }
-enum B { One, Two }
-
-fn main() {
-    let a = A::One;
-    let b = B::One;
-    match (a, b) {
-        (A::Two, B::One) => {},
-        $0(A::One, B::One) => todo!(),
-        (A::One, B::Two) => todo!(),
-        (A::Two, B::Two) => todo!(),
-    }
-}
-"#,
-        );
-    }
-
     #[test]
     fn add_missing_match_arms_tuple_of_enum() {
         check_assist(
diff --git a/crates/ide_completion/src/completions/flyimport.rs b/crates/ide_completion/src/completions/flyimport.rs
index 784a1a0637..47036f2e13 100644
--- a/crates/ide_completion/src/completions/flyimport.rs
+++ b/crates/ide_completion/src/completions/flyimport.rs
@@ -113,7 +113,6 @@ pub(crate) fn import_on_the_fly(acc: &mut Completions, ctx: &CompletionContext)
         || ctx.is_path_disallowed()
         || ctx.expects_item()
         || ctx.expects_assoc_item()
-        || ctx.expects_variant()
     {
         return None;
     }
diff --git a/crates/ide_completion/src/context.rs b/crates/ide_completion/src/context.rs
index 8759e2d108..05ae95769b 100644
--- a/crates/ide_completion/src/context.rs
+++ b/crates/ide_completion/src/context.rs
@@ -171,10 +171,6 @@ impl<'a> CompletionContext<'a> {
         matches!(self.completion_location, Some(ImmediateLocation::Trait | ImmediateLocation::Impl))
     }
 
-    pub(crate) fn expects_variant(&self) -> bool {
-        matches!(self.completion_location, Some(ImmediateLocation::Variant))
-    }
-
     pub(crate) fn expects_non_trait_assoc_item(&self) -> bool {
         matches!(self.completion_location, Some(ImmediateLocation::Impl))
     }
diff --git a/crates/ide_completion/src/patterns.rs b/crates/ide_completion/src/patterns.rs
index 13c739325c..4c2e704a7f 100644
--- a/crates/ide_completion/src/patterns.rs
+++ b/crates/ide_completion/src/patterns.rs
@@ -45,7 +45,6 @@ pub(crate) enum ImmediateLocation {
     StmtList,
     ItemList,
     TypeBound,
-    Variant,
     /// Fake file ast node
     Attribute(ast::Attr),
     /// Fake file ast node
@@ -214,7 +213,6 @@ pub(crate) fn determine_location(
             ast::SourceFile(_it) => ImmediateLocation::ItemList,
             ast::ItemList(_it) => ImmediateLocation::ItemList,
             ast::RefExpr(_it) => ImmediateLocation::RefExpr,
-            ast::Variant(_it) => ImmediateLocation::Variant,
             ast::RecordField(it) => if it.ty().map_or(false, |it| it.syntax().text_range().contains(offset)) {
                 return None;
             } else {
diff --git a/crates/ide_db/src/apply_change.rs b/crates/ide_db/src/apply_change.rs
index 0df0b0035d..bba270421c 100644
--- a/crates/ide_db/src/apply_change.rs
+++ b/crates/ide_db/src/apply_change.rs
@@ -78,7 +78,7 @@ impl RootDatabase {
             hir::db::ParseMacroExpansionQuery
             hir::db::MacroExpandQuery
             hir::db::HygieneFrameQuery
-            hir::db::InternMacroQuery
+            hir::db::InternMacroCallQuery
 
             // DefDatabase
             hir::db::FileItemTreeQuery
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 6a72c4e326..81f4ccd365 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -195,16 +195,14 @@ config_data! {
         hoverActions_run: bool             = "true",
 
         /// Whether to show inlay type hints for method chains.
-        inlayHints_chainingHints: bool              = "true",
+        inlayHints_chainingHints: bool      = "true",
         /// Maximum length for inlay hints. Set to null to have an unlimited length.
-        inlayHints_maxLength: Option<usize>         = "25",
+        inlayHints_maxLength: Option<usize> = "25",
         /// Whether to show function parameter name inlay hints at the call
         /// site.
-        inlayHints_parameterHints: bool             = "true",
+        inlayHints_parameterHints: bool     = "true",
         /// Whether to show inlay type hints for variables.
-        inlayHints_typeHints: bool                  = "true",
-        /// Whether to hide inlay hints for constructors.
-        inlayHints_hideNamedConstructorHints: bool  = "false",
+        inlayHints_typeHints: bool          = "true",
 
         /// Join lines inserts else between consecutive ifs.
         joinLines_joinElseIf: bool = "true",
@@ -770,7 +768,6 @@ impl Config {
             type_hints: self.data.inlayHints_typeHints,
             parameter_hints: self.data.inlayHints_parameterHints,
             chaining_hints: self.data.inlayHints_chainingHints,
-            hide_named_constructor_hints: self.data.inlayHints_hideNamedConstructorHints,
             max_length: self.data.inlayHints_maxLength,
         }
     }
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md
index b925f146a7..9076b93d35 100644
--- a/docs/dev/lsp-extensions.md
+++ b/docs/dev/lsp-extensions.md
@@ -272,7 +272,7 @@ interface SsrParams {
     /// The specific syntax is specified outside of the protocol.
     query: string,
     /// If true, only check the syntax of the query and don't compute the actual edit.
-    parseOnly: boolean,
+    parseOnly: bool,
     /// The current text document. This and `position` will be used to determine in what scope
     /// paths in `query` should be resolved.
     textDocument: TextDocumentIdentifier;
@@ -449,7 +449,7 @@ interface ServerStatusParams {
     health: "ok" | "warning" | "error",
     /// Is there any pending background work which might change the status?
     /// For example, are dependencies being downloaded?
-    quiescent: boolean,
+    quiescent: bool,
     /// Explanatory message to show on hover.
     message?: string,
 }
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc
index c7bb1bf642..9a00a0eb66 100644
--- a/docs/user/generated_config.adoc
+++ b/docs/user/generated_config.adoc
@@ -308,11 +308,6 @@ site.
 --
 Whether to show inlay type hints for variables.
 --
-[[rust-analyzer.inlayHints.hideNamedConstructorHints]]rust-analyzer.inlayHints.hideNamedConstructorHints (default: `false`)::
-+
---
-Whether to hide inlay hints for constructors.
---
 [[rust-analyzer.joinLines.joinElseIf]]rust-analyzer.joinLines.joinElseIf (default: `true`)::
 +
 --
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index 1db6cb5cd4..ef2e9ce749 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -200,8 +200,7 @@ $ pacman -S rust-analyzer
 
 `rust-analyzer` is available in the GURU repository:
 
-- https://gitweb.gentoo.org/repo/proj/guru.git/tree/dev-util/rust-analyzer?id=9895cea62602cfe599bd48e0fb02127411ca6e81[`dev-util/rust-analyzer`] builds from source
-- https://gitweb.gentoo.org/repo/proj/guru.git/tree/dev-util/rust-analyzer-bin?id=9895cea62602cfe599bd48e0fb02127411ca6e81[`dev-util/rust-analyzer-bin`] installs an official binary release
+- https://gitweb.gentoo.org/repo/proj/guru.git/tree/dev-util/rust-analyzer-bin/rust-analyzer-bin-9999.ebuild[`dev-util/rust-analyzer-bin-9999`] (the https://github.com/rust-analyzer/rust-analyzer/releases/latest[latest release] as a live binary ebuild)
 
 If not already, GURU must be enabled (e.g. using `app-eselect/eselect-repository`) and sync'd before running `emerge`:
 
diff --git a/editors/code/package.json b/editors/code/package.json
index e1cbe8ba64..4c718f0b79 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -752,11 +752,6 @@
                     "default": true,
                     "type": "boolean"
                 },
-                "rust-analyzer.inlayHints.hideNamedConstructorHints": {
-                    "markdownDescription": "Whether to hide inlay hints for constructors.",
-                    "default": false,
-                    "type": "boolean"
-                },
                 "rust-analyzer.joinLines.joinElseIf": {
                     "markdownDescription": "Join lines inserts else between consecutive ifs.",
                     "default": true,
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index a3e29fc156..3f3ca63098 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -114,7 +114,6 @@ export class Config {
             typeHints: this.get<boolean>("inlayHints.typeHints"),
             parameterHints: this.get<boolean>("inlayHints.parameterHints"),
             chainingHints: this.get<boolean>("inlayHints.chainingHints"),
-            hideNamedConstructorHints: this.get<boolean>("inlayHints.hideNamedConstructorHints"),
             smallerHints: this.get<boolean>("inlayHints.smallerHints"),
             maxLength: this.get<null | number>("inlayHints.maxLength"),
         };


Test patch:
diff --git a/crates/ide_completion/src/tests/flyimport.rs b/crates/ide_completion/src/tests/flyimport.rs
index 18880a67aa..201443e10c 100644
--- a/crates/ide_completion/src/tests/flyimport.rs
+++ b/crates/ide_completion/src/tests/flyimport.rs
@@ -1012,34 +1012,3 @@ use self as Str$0;
         expect![[r#""#]],
     );
 }
-
-#[test]
-fn flyimport_enum_variant() {
-    check(
-        r#"
-mod foo {
-    pub struct Barbara;
-}
-
-enum Foo {
-    Barba$0()
-}
-}"#,
-        expect![[r#""#]],
-    );
-
-    check(
-        r#"
-mod foo {
-    pub struct Barbara;
-}
-
-enum Foo {
-    Barba(Barba$0)
-}
-}"#,
-        expect![[r#"
-            st Barbara (use foo::Barbara)
-        "#]],
-    )
-}