Repository: rust-lang/rust-analyzer
Pull request #12239 (2022-05-13 12:11:44)

minor: Fix typo in publisher field


Patch:
diff --git a/crates/mbe/src/syntax_bridge.rs b/crates/mbe/src/syntax_bridge.rs
index 361633e39d..fb6f8d66c6 100644
--- a/crates/mbe/src/syntax_bridge.rs
+++ b/crates/mbe/src/syntax_bridge.rs
@@ -243,8 +243,6 @@ fn convert_tokens<C: TokenConvertor>(conv: &mut C) -> tt::Subtree {
             let char = match token.to_char(conv) {
                 Some(c) => c,
                 None => {
-                    // FIXME: this isn't really correct, `to_char` yields the *first* char of the token,
-                    // and this is relevant when eg. creating 2 `tt::Punct` from a single `::` token
                     panic!("Token from lexer must be single char: token = {:#?}", token);
                 }
             };
diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs
index 4ebf2157c6..f68d7196c8 100644
--- a/crates/parser/src/grammar.rs
+++ b/crates/parser/src/grammar.rs
@@ -324,9 +324,7 @@ fn name_ref_or_index(p: &mut Parser) {
     );
     let m = p.start();
     if p.at(FLOAT_NUMBER_PART) || p.at_ts(FLOAT_LITERAL_FIRST) {
-        // Ideally we'd remap this to `INT_NUMBER` instead, but that causes the MBE conversion to
-        // lose track of what's a float and what isn't, causing panics.
-        p.bump_remap(FLOAT_NUMBER_PART);
+        p.bump_remap(INT_NUMBER);
     } else {
         p.bump_any();
     }
diff --git a/editors/code/package.json b/editors/code/package.json
index a88f605f47..d21d1139d3 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -1,13 +1,13 @@
 {
     "name": "rust-analyzer",
     "displayName": "rust-analyzer",
-    "description": "An alternative rust language server to the RLS",
+    "description": "A language server for the rust programming language",
     "preview": true,
     "private": true,
     "icon": "icon.png",
     "version": "0.4.0-dev",
     "releaseTag": null,
-    "publisher": "ryst-lang",
+    "publisher": "rust-lang",
     "repository": {
         "url": "https://github.com/rust-analyzer/rust-analyzer.git",
         "type": "git"


Test patch:
diff --git a/crates/hir-def/src/macro_expansion_tests/proc_macros.rs b/crates/hir-def/src/macro_expansion_tests/proc_macros.rs
index e4b065d020..0ca30fb799 100644
--- a/crates/hir-def/src/macro_expansion_tests/proc_macros.rs
+++ b/crates/hir-def/src/macro_expansion_tests/proc_macros.rs
@@ -92,40 +92,3 @@ fn foo() {
 }"##]],
     );
 }
-
-#[test]
-fn float_parsing_panic() {
-    // Regression test for https://github.com/rust-lang/rust-analyzer/issues/12211
-    check(
-        r#"
-//- proc_macros: identity
-macro_rules! id {
-    ($($t:tt)*) => {
-        $($t)*
-    };
-}
-
-id! {
-    #[proc_macros::identity]
-    impl Foo for WrapBj {
-        async fn foo(&self) {
-            self.0. id().await;
-        }
-    }
-}
-"#,
-        expect![[r##"
-macro_rules! id {
-    ($($t:tt)*) => {
-        $($t)*
-    };
-}
-
-#[proc_macros::identity] impl Foo for WrapBj {
-    async fn foo(&self ) {
-        self .0.id().await ;
-    }
-}
-"##]],
-    );
-}
diff --git a/crates/parser/test_data/parser/inline/ok/0011_field_expr.rast b/crates/parser/test_data/parser/inline/ok/0011_field_expr.rast
index a1efb3a9fb..19fab593fa 100644
--- a/crates/parser/test_data/parser/inline/ok/0011_field_expr.rast
+++ b/crates/parser/test_data/parser/inline/ok/0011_field_expr.rast
@@ -50,7 +50,7 @@ SOURCE_FILE
                       IDENT "x"
               DOT "."
               NAME_REF
-                FLOAT_NUMBER_PART "0"
+                INT_NUMBER "0"
             DOT "."
             WHITESPACE " "
             NAME_REF
@@ -67,10 +67,10 @@ SOURCE_FILE
                       IDENT "x"
               DOT "."
               NAME_REF
-                FLOAT_NUMBER_PART "0"
+                INT_NUMBER "0"
             DOT "."
             NAME_REF
-              FLOAT_NUMBER_PART "1"
+              INT_NUMBER "1"
           SEMICOLON ";"
         WHITESPACE "\n    "
         EXPR_STMT