pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/rust-analyzer



Module Name:    pkgsrc
Committed By:   adam
Date:           Mon Feb 14 08:27:17 UTC 2022

Modified Files:
        pkgsrc/lang/rust-analyzer: distinfo
Added Files:
        pkgsrc/lang/rust-analyzer/patches:
            patch-crates_hir__expand_src_builtin__fn__macro.rs
            patch-crates_ide__completion_src_completions_fn__param.rs
            patch-crates_mbe_src_expander_matcher.rs
            patch-crates_mbe_src_expander_transcriber.rs
            patch-crates_mbe_src_tt__iter.rs
            patch-crates_project__model_src_rustc__cfg.rs

Log Message:
rust-analyzer: Use pre-1.58.0 format strings.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/lang/rust-analyzer/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/rust-analyzer/patches/patch-crates_hir__expand_src_builtin__fn__macro.rs \
    pkgsrc/lang/rust-analyzer/patches/patch-crates_ide__completion_src_completions_fn__param.rs \
    pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_expander_matcher.rs \
    pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_expander_transcriber.rs \
    pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_tt__iter.rs \
    pkgsrc/lang/rust-analyzer/patches/patch-crates_project__model_src_rustc__cfg.rs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/rust-analyzer/distinfo
diff -u pkgsrc/lang/rust-analyzer/distinfo:1.8 pkgsrc/lang/rust-analyzer/distinfo:1.9
--- pkgsrc/lang/rust-analyzer/distinfo:1.8      Tue Feb  8 20:45:00 2022
+++ pkgsrc/lang/rust-analyzer/distinfo  Mon Feb 14 08:27:17 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2022/02/08 20:45:00 adam Exp $
+$NetBSD: distinfo,v 1.9 2022/02/14 08:27:17 adam Exp $
 
 BLAKE2s (addr2line-0.17.0.crate) = f7fa3b016f0e80c4ea9967f8947de15edc9fa39d0c0cdea692dccd0c41c28039
 SHA512 (addr2line-0.17.0.crate) = ef3bbd7c6d1dfdd0b47e3be1fb4c8b15ed61a769bed7e80dce80461a1ee13ef21c75e62e9a66328504f862341f1e808abec5790ac79784e18655afcc16206b95
@@ -489,3 +489,9 @@ Size (xshell-0.1.17.crate) = 21019 bytes
 BLAKE2s (xshell-macros-0.1.17.crate) = 98fe6d6cfdf1931df28789287100a183c72f2b65daf1d9e4e8b98d9cddcbb695
 SHA512 (xshell-macros-0.1.17.crate) = 838f8bfc530051d8fe6c1b2a3c8e2fe7c6946705d6e6a084807b35817d5d6bae6f2941cb97a47fdf5c970aa3f4baef222aac938039bb520aadbb3fd7fd1a7bf7
 Size (xshell-macros-0.1.17.crate) = 2682 bytes
+SHA1 (patch-crates_hir__expand_src_builtin__fn__macro.rs) = c564d9621047aa2717ee7cabf77b5ed2f6f9ee49
+SHA1 (patch-crates_ide__completion_src_completions_fn__param.rs) = 81360db924bc173e5b68e0c51818fc291e0b4306
+SHA1 (patch-crates_mbe_src_expander_matcher.rs) = 5221e1506cb31a3c58292e90c47990a440773c58
+SHA1 (patch-crates_mbe_src_expander_transcriber.rs) = daa047add6555ec77ddbe5ec06f7e175540a2293
+SHA1 (patch-crates_mbe_src_tt__iter.rs) = 0f5f7ca4c6356bce1a05f97d46e498cd3d7dd320
+SHA1 (patch-crates_project__model_src_rustc__cfg.rs) = 0b0eda6a833913732061c614d7e69e85ddbe207d

Added files:

Index: pkgsrc/lang/rust-analyzer/patches/patch-crates_hir__expand_src_builtin__fn__macro.rs
diff -u /dev/null pkgsrc/lang/rust-analyzer/patches/patch-crates_hir__expand_src_builtin__fn__macro.rs:1.1
--- /dev/null   Mon Feb 14 08:27:17 2022
+++ pkgsrc/lang/rust-analyzer/patches/patch-crates_hir__expand_src_builtin__fn__macro.rs        Mon Feb 14 08:27:17 2022
@@ -0,0 +1,20 @@
+$NetBSD: patch-crates_hir__expand_src_builtin__fn__macro.rs,v 1.1 2022/02/14 08:27:17 adam Exp $
+
+Use pre-1.58.0 format strings.
+
+--- crates/hir_expand/src/builtin_fn_macro.rs.orig     2022-02-14 08:20:47.000000000 +0000
++++ crates/hir_expand/src/builtin_fn_macro.rs
+@@ -452,11 +452,11 @@ fn relative_file(
+     let call_site = call_id.as_file().original_file(db);
+     let path = AnchoredPath { anchor: call_site, path: path_str };
+     let res = db.resolve_path(path).ok_or_else(|| {
+-        mbe::ExpandError::Other(format!("failed to load file `{path_str}`").into())
++        mbe::ExpandError::Other(format!("failed to load file `{}`", path_str).into())
+     })?;
+     // Prevent include itself
+     if res == call_site && !allow_recursion {
+-        Err(mbe::ExpandError::Other(format!("recursive inclusion of `{path_str}`").into()))
++        Err(mbe::ExpandError::Other(format!("recursive inclusion of `{}`", path_str).into()))
+     } else {
+         Ok(res)
+     }
Index: pkgsrc/lang/rust-analyzer/patches/patch-crates_ide__completion_src_completions_fn__param.rs
diff -u /dev/null pkgsrc/lang/rust-analyzer/patches/patch-crates_ide__completion_src_completions_fn__param.rs:1.1
--- /dev/null   Mon Feb 14 08:27:17 2022
+++ pkgsrc/lang/rust-analyzer/patches/patch-crates_ide__completion_src_completions_fn__param.rs Mon Feb 14 08:27:17 2022
@@ -0,0 +1,24 @@
+$NetBSD: patch-crates_ide__completion_src_completions_fn__param.rs,v 1.1 2022/02/14 08:27:17 adam Exp $
+
+Use pre-1.58.0 format strings.
+
+--- crates/ide_completion/src/completions/fn_param.rs.orig     2022-02-14 08:22:58.000000000 +0000
++++ crates/ide_completion/src/completions/fn_param.rs
+@@ -45,7 +45,7 @@ pub(crate) fn complete_fn_param(acc: &mu
+         ParamKind::Closure(closure) => {
+             let stmt_list = closure.syntax().ancestors().find_map(ast::StmtList::cast)?;
+             params_from_stmt_list_scope(ctx, stmt_list, |name, ty| {
+-                add_new_item_to_acc(&format!("{name}: {ty}"), name.to_string());
++                add_new_item_to_acc(&format!("{}: {}", name, ty), name.to_string());
+             });
+         }
+     }
+@@ -94,7 +94,7 @@ fn fill_fn_params(
+ 
+     if let Some(stmt_list) = function.syntax().parent().and_then(ast::StmtList::cast) {
+         params_from_stmt_list_scope(ctx, stmt_list, |name, ty| {
+-            file_params.entry(format!("{name}: {ty}")).or_insert(name.to_string());
++            file_params.entry(format!("{}: {}", name, ty)).or_insert(name.to_string());
+         });
+     }
+ 
Index: pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_expander_matcher.rs
diff -u /dev/null pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_expander_matcher.rs:1.1
--- /dev/null   Mon Feb 14 08:27:17 2022
+++ pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_expander_matcher.rs  Mon Feb 14 08:27:17 2022
@@ -0,0 +1,15 @@
+$NetBSD: patch-crates_mbe_src_expander_matcher.rs,v 1.1 2022/02/14 08:27:17 adam Exp $
+
+Use pre-1.58.0 format strings.
+
+--- crates/mbe/src/expander/matcher.rs.orig    2022-02-14 08:16:44.000000000 +0000
++++ crates/mbe/src/expander/matcher.rs
+@@ -657,7 +657,7 @@ fn match_loop(pattern: &MetaTemplate, sr
+ fn match_leaf(lhs: &tt::Leaf, src: &mut TtIter) -> Result<(), ExpandError> {
+     let rhs = src
+         .expect_leaf()
+-        .map_err(|()| ExpandError::BindingError(format!("expected leaf: `{lhs}`").into()))?;
++        .map_err(|()| ExpandError::BindingError(format!("expected leaf: `{}`", lhs).into()))?;
+     match (lhs, rhs) {
+         (
+             tt::Leaf::Punct(tt::Punct { char: lhs, .. }),
Index: pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_expander_transcriber.rs
diff -u /dev/null pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_expander_transcriber.rs:1.1
--- /dev/null   Mon Feb 14 08:27:17 2022
+++ pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_expander_transcriber.rs      Mon Feb 14 08:27:17 2022
@@ -0,0 +1,40 @@
+$NetBSD: patch-crates_mbe_src_expander_transcriber.rs,v 1.1 2022/02/14 08:27:17 adam Exp $
+
+Use pre-1.58.0 format strings.
+
+--- crates/mbe/src/expander/transcriber.rs.orig        2022-02-14 08:17:53.000000000 +0000
++++ crates/mbe/src/expander/transcriber.rs
+@@ -21,28 +21,28 @@ impl Bindings {
+         }
+ 
+         let mut b: &Binding =
+-            self.inner.get(name).ok_or_else(|| binding_err!("could not find binding `{name}`"))?;
++            self.inner.get(name).ok_or_else(|| binding_err!("could not find binding `{}`", name))?;
+         for nesting_state in nesting.iter_mut() {
+             nesting_state.hit = true;
+             b = match b {
+                 Binding::Fragment(_) => break,
+                 Binding::Nested(bs) => bs.get(nesting_state.idx).ok_or_else(|| {
+                     nesting_state.at_end = true;
+-                    binding_err!("could not find nested binding `{name}`")
++                    binding_err!("could not find nested binding `{}`", name)
+                 })?,
+                 Binding::Empty => {
+                     nesting_state.at_end = true;
+-                    return Err(binding_err!("could not find empty binding `{name}`"));
++                    return Err(binding_err!("could not find empty binding `{}`", name));
+                 }
+             };
+         }
+         match b {
+             Binding::Fragment(it) => Ok(it),
+             Binding::Nested(_) => {
+-                Err(binding_err!("expected simple binding, found nested binding `{name}`"))
++                Err(binding_err!("expected simple binding, found nested binding `{}`", name))
+             }
+             Binding::Empty => {
+-                Err(binding_err!("expected simple binding, found empty binding `{name}`"))
++                Err(binding_err!("expected simple binding, found empty binding `{}`", name))
+             }
+         }
+     }
Index: pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_tt__iter.rs
diff -u /dev/null pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_tt__iter.rs:1.1
--- /dev/null   Mon Feb 14 08:27:17 2022
+++ pkgsrc/lang/rust-analyzer/patches/patch-crates_mbe_src_tt__iter.rs  Mon Feb 14 08:27:17 2022
@@ -0,0 +1,15 @@
+$NetBSD: patch-crates_mbe_src_tt__iter.rs,v 1.1 2022/02/14 08:27:17 adam Exp $
+
+Use pre-1.58.0 format strings.
+
+--- crates/mbe/src/tt_iter.rs.orig     2022-02-14 08:19:00.000000000 +0000
++++ crates/mbe/src/tt_iter.rs
+@@ -106,7 +106,7 @@ impl<'a> TtIter<'a> {
+         }
+ 
+         let err = if error || !cursor.is_root() {
+-            Some(ExpandError::BindingError(format!("expected {entry_point:?}").into()))
++            Some(ExpandError::BindingError(format!("expected {:?}", entry_point).into()))
+         } else {
+             None
+         };
Index: pkgsrc/lang/rust-analyzer/patches/patch-crates_project__model_src_rustc__cfg.rs
diff -u /dev/null pkgsrc/lang/rust-analyzer/patches/patch-crates_project__model_src_rustc__cfg.rs:1.1
--- /dev/null   Mon Feb 14 08:27:17 2022
+++ pkgsrc/lang/rust-analyzer/patches/patch-crates_project__model_src_rustc__cfg.rs     Mon Feb 14 08:27:17 2022
@@ -0,0 +1,24 @@
+$NetBSD: patch-crates_project__model_src_rustc__cfg.rs,v 1.1 2022/02/14 08:27:17 adam Exp $
+
+Use pre-1.58.0 format strings.
+
+--- crates/project_model/src/rustc_cfg.rs.orig 2022-02-14 08:19:52.000000000 +0000
++++ crates/project_model/src/rustc_cfg.rs
+@@ -29,7 +29,7 @@ pub(crate) fn get(cargo_toml: Option<&Ma
+             );
+             res.extend(rustc_cfgs.lines().filter_map(|it| it.parse().ok()));
+         }
+-        Err(e) => tracing::error!("failed to get rustc cfgs: {e:?}"),
++        Err(e) => tracing::error!("failed to get rustc cfgs: {:?}", e),
+     }
+ 
+     res
+@@ -47,7 +47,7 @@ fn get_rust_cfgs(cargo_toml: Option<&Man
+         }
+         match utf8_stdout(cargo_config) {
+             Ok(it) => return Ok(it),
+-            Err(e) => tracing::debug!("{e:?}: falling back to querying rustc for cfgs"),
++            Err(e) => tracing::debug!("{:?}: falling back to querying rustc for cfgs", e),
+         }
+     }
+     // using unstable cargo features failed, fall back to using plain rustc



Home | Main Index | Thread Index | Old Index