sst-linux/scripts
Tamir Duberstein 78cc9c3304 scripts: generate_rust_analyzer: add missing macros deps
[ Upstream commit 2e0f91aba507a3cb59f7a12fc3ea2b7d4d6675b7 ]

The macros crate has depended on std and proc_macro since its
introduction in commit 1fbde52bde ("rust: add `macros` crate"). These
dependencies were omitted from commit 8c4555ccc5 ("scripts: add
`generate_rust_analyzer.py`") resulting in missing go-to-definition and
autocomplete, and false-positive warnings emitted from rust-analyzer
such as:

  [{
  	"resource": "/Users/tamird/src/linux/rust/macros/module.rs",
  	"owner": "_generated_diagnostic_collection_name_#1",
  	"code": {
  		"value": "non_snake_case",
  		"target": {
  			"$mid": 1,
  			"path": "/rustc/",
  			"scheme": "https",
  			"authority": "doc.rust-lang.org",
  			"query": "search=non_snake_case"
  		}
  	},
  	"severity": 4,
  	"message": "Variable `None` should have snake_case name, e.g. `none`",
  	"source": "rust-analyzer",
  	"startLineNumber": 123,
  	"startColumn": 17,
  	"endLineNumber": 123,
  	"endColumn": 21
  }]

Add the missing dependencies to improve the developer experience.

  [ Fiona had a different approach (thanks!) at:

        https://lore.kernel.org/rust-for-linux/20241205115438.234221-1-me@kloenk.dev/

    But Tamir and Fiona agreed to this one. - Miguel ]

Fixes: 8c4555ccc5 ("scripts: add `generate_rust_analyzer.py`")
Reviewed-by: Fiona Behrens <me@kloenk.dev>
Diagnosed-by: Chayim Refael Friedman <chayimfr@gmail.com>
Link: https://github.com/rust-lang/rust-analyzer/issues/17759#issuecomment-2646328275
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Tested-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://lore.kernel.org/r/20250210-rust-analyzer-macros-core-dep-v3-1-45eb4836f218@gmail.com
[ Removed `return`. Changed tag name. Added Link. Slightly
  reworded. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-28 21:58:58 +01:00
..
atomic
basic
clang-tools gen_compile_commands: fix invalid escape sequence warning 2024-03-26 18:20:25 -04:00
coccinelle
dtc
dummy-tools
gcc-plugins gcc-plugins: Rename last_stmt() for GCC 14+ 2024-07-25 09:49:07 +02:00
gdb scripts/gdb: fix SB_* constants parsing 2024-06-16 13:41:32 +02:00
genksyms genksyms: fix memory leak when the same symbol is read from *.symref file 2025-02-21 13:49:23 +01:00
kconfig kconfig: fix memory leak in sym_warn_unmet_dep() 2025-02-21 13:49:24 +01:00
ksymoops
mod modpost: fix the missed iteration for the max bit in do_input() 2025-01-09 13:30:05 +01:00
package
selinux
tracing
.gitignore
adjust_autoksyms.sh
as-version.sh
asn1_compiler.c
bin2c.c
bloat-o-meter
bootgraph.pl
bpf_doc.py scripts/bpf_doc: Use silent mode when exec make cmd 2024-04-10 16:28:21 +02:00
cc-can-link.sh
cc-version.sh
check_extable.sh
check-local-export
check-sysctl-docs
checkdeclares.pl
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl locking: Introduce __cleanup() based infrastructure 2024-02-23 09:12:51 +01:00
checkstack.pl
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch
coccicheck
config
const_structs.checkpatch
decode_stacktrace.sh scripts/decode_stacktrace.sh: optionally use LLVM utilities 2024-01-20 11:50:11 +01:00
decodecode
depmod.sh
dev-needs.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract_xc3028.pl
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line
file-size.sh
find-unused-docs.sh
gcc-x86_32-has-stack-protector.sh kbuild: Fix '-S -c' in x86 stack protector scripts 2024-08-03 08:49:39 +02:00
gcc-x86_64-has-stack-protector.sh kbuild: Fix '-S -c' in x86 stack protector scripts 2024-08-03 08:49:39 +02:00
gen_autoksyms.sh
gen_ksymdeps.sh
gen-randstruct-seed.sh
generate_initcall_order.pl
generate_rust_analyzer.py scripts: generate_rust_analyzer: add missing macros deps 2025-03-28 21:58:58 +01:00
generate_rust_target.rs
get_abi.pl scripts/get_abi: fix source path leak 2024-01-31 16:17:01 -08:00
get_dvb_firmware
get_feat.pl
get_maintainer.pl
gfp-translate
head-object-list.txt
headerdep.pl
headers_install.sh
insert-sys-cert.c
install.sh
jobserver-exec
kallsyms.c
Kbuild.include
Kconfig.include
kernel-doc
ld-version.sh kbuild: Make ld-version.sh more robust against version string changes 2024-07-18 13:18:44 +02:00
leaking_addresses.pl
Lindent
link-vmlinux.sh kbuild: fix short log for AS in link-vmlinux.sh 2024-07-11 12:47:18 +02:00
Makefile
Makefile.asm-generic
Makefile.build kbuild: rust: avoid creating temporary files 2024-05-17 11:56:10 +02:00
Makefile.clang
Makefile.clean
Makefile.compiler powerpc: remove checks for binutils older than 2.25 2024-01-25 15:27:18 -08:00
Makefile.debug
Makefile.dtbinst kbuild: Install dtb files as 0644 in Makefile.dtbinst 2024-07-05 09:31:57 +02:00
Makefile.extrawarn kbuild: Move -Wenum-enum-conversion to W=2 2025-02-21 13:49:46 +01:00
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host kbuild: rust: avoid creating temporary files 2024-05-17 11:56:10 +02:00
Makefile.kasan
Makefile.kcov
Makefile.kcsan
Makefile.kmsan
Makefile.lib kbuild: switch from lz4c to lz4 for compression 2025-02-21 13:49:25 +01:00
Makefile.modfinal btf, scripts: rust: drop is_rust_module.sh 2024-05-17 11:56:17 +02:00
Makefile.modinst
Makefile.modpost modpost: propagate W=1 build option to modpost 2024-02-23 09:12:38 +01:00
Makefile.package
Makefile.randstruct
Makefile.ubsan
Makefile.userprogs
Makefile.vmlinux
Makefile.vmlinux_o
makelst
markup_oops.pl
min-tool-version.sh
mkcompile_h
mksysmap
mkuboot.sh
module.lds.S
modules-check.sh
nsdeps
objdiff
objdump-func
pahole-flags.sh
pahole-version.sh
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl
remove-stale-files
rust_is_available_bindgen_libclang.h
rust_is_available.sh rust: work around bindgen 0.69.0 issue 2024-08-29 17:30:32 +02:00
setlocalversion
show_delta
sign-file.c
sorttable.c
sorttable.h scripts/sorttable: fix orc_sort_cmp() to maintain symmetry and transitivity 2025-01-17 13:34:38 +01:00
spdxcheck-test.sh
spdxcheck.py
spdxexclude
spelling.txt
sphinx-pre-install
split-man.pl
stackdelta
stackusage
subarch.include
syscallhdr.sh
syscallnr.sh
syscalltbl.sh
tags.sh
test_fortify.sh
tools-support-relr.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh