<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in diagnostics.rs</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2025</copyright>
    <generator>Java</generator><item>
        <title>c17ee635fd3a482b2ad2bf5e269755c2eae5f25e - Merge drm/drm-fixes into drm-misc-fixes</title>
        <link>http://opengrok.net:8080/history/linux/rust/pin-init/internal/src/diagnostics.rs#c17ee635fd3a482b2ad2bf5e269755c2eae5f25e</link>
        <description>Merge drm/drm-fixes into drm-misc-fixes7.0-rc1 was just released, let&apos;s merge it to kick the new release cycle.Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;

            List of files:
            /linux/rust/pin-init/internal/src/diagnostics.rs</description>
        <pubDate>Mon, 23 Feb 2026 09:09:45 +0000</pubDate>
        <dc:creator>Maxime Ripard &lt;mripard@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>a9aabb3b839aba094ed80861054993785c61462c - Merge tag &apos;rust-6.20-7.0&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux</title>
        <link>http://opengrok.net:8080/history/linux/rust/pin-init/internal/src/diagnostics.rs#a9aabb3b839aba094ed80861054993785c61462c</link>
        <description>Merge tag &apos;rust-6.20-7.0&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linuxPull rust updates from Miguel Ojeda: &quot;Toolchain and infrastructure:   - Add &apos;__rust_helper&apos; annotation to the C helpers     This is needed to inline these helpers into Rust code   - Remove imports available via the prelude, treewide     This was possible thanks to a new lint in Klint that Gary has     implemented -- more Klint-related changes, including initial     upstream support, are coming   - Deduplicate pin-init flags  &apos;kernel&apos; crate:   - Add support for calling a function exactly once with the new     &apos;do_once_lite!&apos; macro (and &apos;OnceLite&apos; type)     Based on this, add &apos;pr_*_once!&apos; macros to print only once   - Add &apos;impl_flags!&apos; macro for defining common bitflags operations:         impl_flags!(             /// Represents multiple permissions.             #[derive(Debug, Clone, Default, Copy, PartialEq, Eq)]             pub struct Permissions(u32);             /// Represents a single permission.             #[derive(Debug, Clone, Copy, PartialEq, Eq)]             pub enum Permission {                 /// Read permission.                 Read = 1 &lt;&lt; 0,                 /// Write permission.                 Write = 1 &lt;&lt; 1,                 /// Execute permission.                 Execute = 1 &lt;&lt; 2,             }         );         let mut f: Permissions = Permission::Read | Permission::Write;         assert!(f.contains(Permission::Read));         assert!(!f.contains(Permission::Execute));         f |= Permission::Execute;         assert!(f.contains(Permission::Execute));         let f2: Permissions = Permission::Write | Permission::Execute;         assert!((f ^ f2).contains(Permission::Read));         assert!(!(f ^ f2).contains(Permission::Write));   - &apos;bug&apos; module: support &apos;CONFIG_DEBUG_BUGVERBOSE_DETAILED&apos; in the     &apos;warn_on!&apos; macro in order to show the evaluated condition alongside     the file path:          ------------[ cut here ]------------          WARNING: [val == 1] linux/samples/rust/rust_minimal.rs:27 at ...          Modules linked in: rust_minimal(+)   - Add safety module with &apos;unsafe_precondition_assert!&apos; macro,     currently a wrapper for &apos;debug_assert!&apos;, intended to mark the     validation of safety preconditions where possible:         /// # Safety         ///         /// The caller must ensure that `index` is less than `N`.         unsafe fn set_unchecked(&amp;mut self, index: usize, value: T) {             unsafe_precondition_assert!(                 index &lt; N,                 &quot;set_unchecked() requires index ({index}) &lt; N ({N})&quot;             );             ...         }   - Add instructions to &apos;build_assert!&apos; documentation requesting to     always inline functions when used with function arguments   - &apos;ptr&apos; module: replace &apos;build_assert!&apos; with a &apos;const&apos; one   - &apos;rbtree&apos; module: reduce unsafe blocks on pointer derefs   - &apos;transmute&apos; module: implement &apos;FromBytes&apos; and &apos;AsBytes&apos; for     inhabited ZSTs, and use it in Nova   - More treewide replacements of &apos;c_str!&apos; with C string literals  &apos;macros&apos; crate:   - Rewrite most procedural macros (&apos;module!&apos;, &apos;concat_idents!&apos;,     &apos;#[export]&apos;, &apos;#[vtable]&apos;, &apos;#[kunit_tests]&apos;) to use the &apos;syn&apos;     parsing library which we introduced last cycle, with better     diagnostics     This also allows to support &apos;#[cfg]&apos; properly in the &apos;#[vtable]&apos;     macro, to support arbitrary types in &apos;module!&apos; macro (not just an     identifier) and to remove several custom parsing helpers we had   - Use &apos;quote!&apos; from the recently vendored &apos;quote&apos; library and remove     our custom one     The vendored one also allows us to avoid quoting &apos;&quot;&apos; and &apos;{}&apos;     inside the template anymore and editors can now highlight it. In     addition, it improves robustness as it eliminates the need for     string quoting and escaping   - Use &apos;pin_init::zeroed()&apos; to simplify KUnit code  &apos;pin-init&apos; crate:   - Rewrite all procedural macros (&apos;[pin_]init!&apos;, &apos;#[pin_data]&apos;,     &apos;#[pinned_drop]&apos;, &apos;derive([Maybe]Zeroable)&apos;) to use the &apos;syn&apos;     parsing library which we introduced last cycle, with better     diagnostics   - Implement &apos;InPlaceWrite&apos; for &apos;&amp;&apos;static mut MaybeUninit&lt;T&gt;&apos;. This     enables users to use external allocation mechanisms such as     &apos;static_cell&apos;   - Support tuple structs in &apos;derive([Maybe]Zeroable)&apos;   - Support attributes on fields in &apos;[pin_]init!&apos; (such as     &apos;#[cfg(...)]&apos;)   - Add a &apos;#[default_error(&lt;type&gt;)]&apos; attribute to &apos;[pin_]init!&apos; to     override the default error (when no &apos;? Error&apos; is specified)   - Support packed structs in &apos;[pin_]init!&apos; with     &apos;#[disable_initialized_field_access]&apos;   - Remove &apos;try_[pin_]init!&apos; in favor of merging their feature with     &apos;[pin_]init!&apos;. Update the kernel&apos;s own &apos;try_[pin_]init!&apos; macros to     use the &apos;default_error&apos; attribute   - Correct &apos;T: Sized&apos; bounds to &apos;T: ?Sized&apos; in the generated     &apos;PinnedDrop&apos; check by &apos;#[pin_data]&apos;  Documentation:   - Conclude the Rust experiment  MAINTAINERS:   - Add &quot;RUST [RUST-ANALYZER]&quot; entry for the rust-analyzer support.     Tamir and Jesung will take care of it. They have both been active     around it for a while. The new tree will flow through the Rust one   - Add Gary as maintainer for &quot;RUST [PIN-INIT]&quot;   - Update Boqun and Tamir emails to their kernel.org accounts  And a few other cleanups and improvements&quot;* tag &apos;rust-6.20-7.0&apos; of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux: (59 commits)  rust: safety: introduce `unsafe_precondition_assert!` macro  rust: add `impl_flags!` macro for defining common bitflag operations  rust: print: Add pr_*_once macros  rust: bug: Support DEBUG_BUGVERBOSE_DETAILED option  rust: print: Add support for calling a function exactly once  rust: kbuild: deduplicate pin-init flags  gpu: nova-core: remove imports available via prelude  rust: clk: replace `kernel::c_str!` with C-Strings  MAINTAINERS: Update my email address to @kernel.org  rust: macros: support `#[cfg]` properly in `#[vtable]` macro.  rust: kunit: use `pin_init::zeroed` instead of custom null value  rust: macros: rearrange `#[doc(hidden)]` in `module!` macro  rust: macros: allow arbitrary types to be used in `module!` macro  rust: macros: convert `#[kunit_tests]` macro to use `syn`  rust: macros: convert `concat_idents!` to use `syn`  rust: macros: convert `#[export]` to use `syn`  rust: macros: use `quote!` for `module!` macro  rust: macros: use `syn` to parse `module!` macro  rust: macros: convert `#[vtable]` macro to use `syn`  rust: macros: use `quote!` from vendored crate  ...

            List of files:
            /linux/rust/pin-init/internal/src/diagnostics.rs</description>
        <pubDate>Tue, 10 Feb 2026 19:53:01 +0000</pubDate>
        <dc:creator>Linus Torvalds &lt;torvalds@linux-foundation.org&gt;</dc:creator>
    </item>
<item>
        <title>99ba0fa10de0cc0386ea61e6e5068a78a8394060 - Merge tag &apos;pin-init-v7.0&apos; of https://github.com/Rust-for-Linux/linux into rust-next</title>
        <link>http://opengrok.net:8080/history/linux/rust/pin-init/internal/src/diagnostics.rs#99ba0fa10de0cc0386ea61e6e5068a78a8394060</link>
        <description>Merge tag &apos;pin-init-v7.0&apos; of https://github.com/Rust-for-Linux/linux into rust-nextPull pin-init updates from Benno Lossin: &quot;Added:   - Implement &apos;InPlaceWrite&apos; for &apos;&amp;&apos;static mut MaybeUninit&lt;T&gt;&apos;. This     enables users to use external allocation mechanisms such as     &apos;static_cell&apos;.   - Add Gary Guo as a Maintainer.  Changed:   - Rewrote all proc-macros (&apos;[pin_]init!&apos;, &apos;#[pin_data]&apos;,     &apos;#[pinned_drop]&apos;, &apos;derive([Maybe]Zeroable)&apos;), using &apos;syn&apos; with     better diagnostics.   - Support tuple structs in &apos;derive([Maybe]Zeroable)&apos;.   - Support attributes on fields in &apos;[pin_]init!&apos; (such as     &apos;#[cfg(...)]&apos;).   - Add a &apos;#[default_error(&lt;type&gt;)]&apos; attribute to &apos;[pin_]init!&apos; to     override the default error (when no &apos;? Error&apos; is specified).   - Support packed structs in &apos;[pin_]init!&apos; with     &apos;#[disable_initialized_field_access]&apos;.  Removed:   - Remove &apos;try_[pin_]init!&apos; in favor of merging their feature     with &apos;[pin_]init!&apos;. Update the kernel&apos;s own &apos;try_[pin_]init!&apos;     macros to use the &apos;default_error&apos; attribute.  Fixed:   - Correct &apos;T: Sized&apos; bounds to &apos;T: ?Sized&apos; in the generated     &apos;PinnedDrop&apos; check by &apos;#[pin_data]&apos;.&quot;* tag &apos;pin-init-v7.0&apos; of https://github.com/Rust-for-Linux/linux:  rust: pin-init: Implement `InPlaceWrite&lt;T&gt;` for `&amp;&apos;static mut MaybeUninit&lt;T&gt;`  MAINTAINERS: add Gary Guo to pin-init  rust: pin-init: internal: init: simplify Zeroable safety check  rust: pin-init: internal: init: add escape hatch for referencing initialized fields  rust: pin-init: internal: init: add support for attributes on initializer fields  rust: init: use `#[default_error(err)]` for the initializer macros  rust: pin-init: add `#[default_error(&lt;type&gt;)]` attribute to initializer macros  rust: pin-init: rewrite the initializer macros using `syn`  rust: pin-init: add `?Sized` bounds to traits in `#[pin_data]` macro  rust: pin-init: rewrite `#[pin_data]` using `syn`  rust: pin-init: rewrite the `#[pinned_drop]` attribute macro using `syn`  rust: pin-init: rewrite `derive(Zeroable)` and `derive(MaybeZeroable)` using `syn`  rust: pin-init: internal: add utility API for syn error handling  rust: pin-init: add `syn` dependency and remove `proc-macro[2]` and `quote` workarounds  rust: pin-init: allow the crate to refer to itself as `pin-init` in doc tests  rust: pin-init: remove `try_` versions of the initializer macros

            List of files:
            /linux/rust/pin-init/internal/src/diagnostics.rs</description>
        <pubDate>Tue, 27 Jan 2026 13:33:55 +0000</pubDate>
        <dc:creator>Miguel Ojeda &lt;ojeda@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>50426bde1577d17e61362bd199d487dbeb159110 - rust: pin-init: rewrite `derive(Zeroable)` and `derive(MaybeZeroable)` using `syn`</title>
        <link>http://opengrok.net:8080/history/linux/rust/pin-init/internal/src/diagnostics.rs#50426bde1577d17e61362bd199d487dbeb159110</link>
        <description>rust: pin-init: rewrite `derive(Zeroable)` and `derive(MaybeZeroable)` using `syn`Rewrite the two derive macros for `Zeroable` using `syn`. One positiveside effect of this change is that tuple structs are now supported bythem. Additionally, syntax errors and the error emitted when trying touse one of the derive macros on an `enum` are improved. Otherwise nofunctional changes intended.For example:    #[derive(Zeroable)]    enum Num {        A(u32),        B(i32),    }Produced this error before this commit:    error: no rules expected keyword `enum`     --&gt; tests/ui/compile-fail/zeroable/enum.rs:5:1      |    5 | enum Num {      | ^^^^ no rules expected this token in macro call      |    note: while trying to match keyword `struct`     --&gt; src/macros.rs      |      |             $vis:vis struct $name:ident      |                      ^^^^^^Now the error is:    error: cannot derive `Zeroable` for an enum     --&gt; tests/ui/compile-fail/zeroable/enum.rs:5:1      |    5 | enum Num {      | ^^^^    error: cannot derive `Zeroable` for an enumTested-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;Reviewed-by: Gary Guo &lt;gary@garyguo.net&gt;Signed-off-by: Benno Lossin &lt;lossin@kernel.org&gt;

            List of files:
            /linux/rust/pin-init/internal/src/diagnostics.rs</description>
        <pubDate>Fri, 16 Jan 2026 10:54:20 +0000</pubDate>
        <dc:creator>Benno Lossin &lt;lossin@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>26bd9402389eaebed086755afb03453dcae6617a - rust: pin-init: internal: add utility API for syn error handling</title>
        <link>http://opengrok.net:8080/history/linux/rust/pin-init/internal/src/diagnostics.rs#26bd9402389eaebed086755afb03453dcae6617a</link>
        <description>rust: pin-init: internal: add utility API for syn error handlingThe API is similar to diagnostics handling in rustc and uses a`ErrorGuaranteed` value to signify that an error has been emitted. Itsupports both fatal errors (which abort the macro expansion immediatelyby returning `Err(ErrorGuaranteed)`) and non-fatal ones at generationtime. These errors are appended to the token stream after generation hasfinished normally. This allows giving good errors while still expandingmost of the code as expected to avoid the user encountering additionalerrors (for example missing definitions).Suggested-by: Gary Guo &lt;gary@garyguo.net&gt;Tested-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;Reviewed-by: Gary Guo &lt;gary@garyguo.net&gt;[ remove duplicate word in commit message - Benno ]Signed-off-by: Benno Lossin &lt;lossin@kernel.org&gt;

            List of files:
            /linux/rust/pin-init/internal/src/diagnostics.rs</description>
        <pubDate>Fri, 16 Jan 2026 10:54:19 +0000</pubDate>
        <dc:creator>Benno Lossin &lt;lossin@kernel.org&gt;</dc:creator>
    </item>
</channel>
</rss>
