Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'rust-fixes-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux

Pull rust fixes from Miguel Ojeda:

- Workaround 'rustdoc' target modifiers bug in Rust >= 1.88.0. It will
be fixed in Rust 1.90.0 (expected 2025-09-18).

- Clean 'rustdoc' output before running it to avoid confusing the tool
when files from previous versions remain.

* tag 'rust-fixes-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
rust: kbuild: clean output before running `rustdoc`
rust: workaround `rustdoc` target modifiers bug

+13 -3
+13 -3
rust/Makefile
··· 65 65 66 66 core-edition := $(if $(call rustc-min-version,108700),2024,2021) 67 67 68 + # `rustdoc` did not save the target modifiers, thus workaround for 69 + # the time being (https://github.com/rust-lang/rust/issues/144521). 70 + rustdoc_modifiers_workaround := $(if $(call rustc-min-version,108800),-Cunsafe-allow-abi-mismatch=fixed-x18) 71 + 68 72 # `rustc` recognizes `--remap-path-prefix` since 1.26.0, but `rustdoc` only 69 73 # since Rust 1.81.0. Moreover, `rustdoc` ICEs on out-of-tree builds since Rust 70 74 # 1.82.0 (https://github.com/rust-lang/rust/issues/138520). Thus workaround both ··· 81 77 -Zunstable-options --generate-link-to-definition \ 82 78 --output $(rustdoc_output) \ 83 79 --crate-name $(subst rustdoc-,,$@) \ 80 + $(rustdoc_modifiers_workaround) \ 84 81 $(if $(rustdoc_host),,--sysroot=/dev/null) \ 85 82 @$(objtree)/include/generated/rustc_cfg $< 86 83 ··· 111 106 rustdoc-macros: private rustdoc_host = yes 112 107 rustdoc-macros: private rustc_target_flags = --crate-type proc-macro \ 113 108 --extern proc_macro 114 - rustdoc-macros: $(src)/macros/lib.rs FORCE 109 + rustdoc-macros: $(src)/macros/lib.rs rustdoc-clean FORCE 115 110 +$(call if_changed,rustdoc) 116 111 117 112 # Starting with Rust 1.82.0, skipping `-Wrustdoc::unescaped_backticks` should 118 113 # not be needed -- see https://github.com/rust-lang/rust/pull/128307. 119 114 rustdoc-core: private skip_flags = --edition=2021 -Wrustdoc::unescaped_backticks 120 115 rustdoc-core: private rustc_target_flags = --edition=$(core-edition) $(core-cfgs) 121 - rustdoc-core: $(RUST_LIB_SRC)/core/src/lib.rs FORCE 116 + rustdoc-core: $(RUST_LIB_SRC)/core/src/lib.rs rustdoc-clean FORCE 122 117 +$(call if_changed,rustdoc) 123 118 124 119 rustdoc-compiler_builtins: $(src)/compiler_builtins.rs rustdoc-core FORCE ··· 130 125 rustdoc-pin_init_internal: private rustdoc_host = yes 131 126 rustdoc-pin_init_internal: private rustc_target_flags = --cfg kernel \ 132 127 --extern proc_macro --crate-type proc-macro 133 - rustdoc-pin_init_internal: $(src)/pin-init/internal/src/lib.rs FORCE 128 + rustdoc-pin_init_internal: $(src)/pin-init/internal/src/lib.rs \ 129 + rustdoc-clean FORCE 134 130 +$(call if_changed,rustdoc) 135 131 136 132 rustdoc-pin_init: private rustdoc_host = yes ··· 148 142 rustdoc-pin_init rustdoc-compiler_builtins $(obj)/$(libmacros_name) \ 149 143 $(obj)/bindings.o FORCE 150 144 +$(call if_changed,rustdoc) 145 + 146 + rustdoc-clean: FORCE 147 + $(Q)rm -rf $(rustdoc_output) 151 148 152 149 quiet_cmd_rustc_test_library = $(RUSTC_OR_CLIPPY_QUIET) TL $< 153 150 cmd_rustc_test_library = \ ··· 224 215 --extern bindings --extern uapi \ 225 216 --no-run --crate-name kernel -Zunstable-options \ 226 217 --sysroot=/dev/null \ 218 + $(rustdoc_modifiers_workaround) \ 227 219 --test-builder $(objtree)/scripts/rustdoc_test_builder \ 228 220 $< $(rustdoc_test_kernel_quiet); \ 229 221 $(objtree)/scripts/rustdoc_test_gen