Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rust-cbindgen for openSUSE:Factory checked in at 2026-04-04 19:04:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rust-cbindgen (Old) and /work/SRC/openSUSE:Factory/.rust-cbindgen.new.21863 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rust-cbindgen" Sat Apr 4 19:04:54 2026 rev:26 rq:1344006 version:0.29.2+git0 Changes: -------- --- /work/SRC/openSUSE:Factory/rust-cbindgen/rust-cbindgen.changes 2025-12-10 15:30:11.209376313 +0100 +++ /work/SRC/openSUSE:Factory/.rust-cbindgen.new.21863/rust-cbindgen.changes 2026-04-04 19:05:39.664804464 +0200 @@ -1,0 +2,15 @@ +Wed Apr 01 03:42:29 UTC 2026 - [email protected] + +- Update to version 0.29.2+git0: + * ci: Add a meta job to block the merge queue on it. + * Check for CMSE ABI's as well + * Fix doc attribute parsing to properly handle block comments + * Expose the line_endings config option to use with the builder + * fix env in workflow file + * use env to pass output parameters + * Explicitly request serde's std features to avoid issues with newer toml versions. + * Account for master -> main rename. + * Update changelog and bump version. + * enum: Track dependencies properly in enumerations. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rust-cbindgen.spec ++++++ --- /var/tmp/diff_new_pack.q38mqA/_old 2026-04-04 19:05:40.488838249 +0200 +++ /var/tmp/diff_new_pack.q38mqA/_new 2026-04-04 19:05:40.492838413 +0200 @@ -1,6 +1,7 @@ # # spec file for package rust-cbindgen # +# Copyright (c) 2026 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties ++++++ _service ++++++ --- /var/tmp/diff_new_pack.q38mqA/_old 2026-04-04 19:05:40.552840874 +0200 +++ /var/tmp/diff_new_pack.q38mqA/_new 2026-04-04 19:05:40.556841037 +0200 @@ -1,11 +1,11 @@ <services> <service mode="disabled" name="obs_scm"> - <param name="url">https://github.com/eqrion/cbindgen.git</param> + <param name="url">https://github.com/mozilla/cbindgen.git</param> <param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@</param> <param name="scm">git</param> - <param name="revision">v0.29.2</param> + <param name="revision">0.29.2</param> <param name="match-tag">*</param> - <param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param> + <param name="versionrewrite-pattern">(\d+\.\d+\.\d+)</param> <param name="versionrewrite-replacement">\1</param> <param name="changesgenerate">enable</param> <param name="changesauthor">[email protected]</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.q38mqA/_old 2026-04-04 19:05:40.584842186 +0200 +++ /var/tmp/diff_new_pack.q38mqA/_new 2026-04-04 19:05:40.588842350 +0200 @@ -1,6 +1,8 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/eqrion/cbindgen.git</param> - <param name="changesrevision">76f41c090c0587d940a0ef81a41c8b995f074926</param></service></servicedata> + <param name="changesrevision">76f41c090c0587d940a0ef81a41c8b995f074926</param></service><service name="tar_scm"> + <param name="url">https://github.com/mozilla/cbindgen.git</param> + <param name="changesrevision">d4586349557ec4dbb34c7d19e133374e3cc8994d</param></service></servicedata> (No newline at EOF) ++++++ cbindgen-0.29.2+git0.tar.zst ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/.github/workflows/cbindgen.yml new/cbindgen-0.29.2+git0/.github/workflows/cbindgen.yml --- old/cbindgen-0.29.2+git0/.github/workflows/cbindgen.yml 2025-10-22 01:10:06.000000000 +0200 +++ new/cbindgen-0.29.2+git0/.github/workflows/cbindgen.yml 2026-02-21 11:16:15.000000000 +0100 @@ -8,12 +8,11 @@ branches: - main merge_group: - types: - - checks_requested + branches: + - main jobs: rustfmt-clippy: - runs-on: ubuntu-24.04 steps: @@ -37,8 +36,10 @@ uses: dtolnay/[email protected] - name: Build with minimum supported Rust version + env: + NAME: ${{steps.msrv.outputs.name}} run: | - cargo +${{steps.msrv.outputs.name}} test nonexistent-test --verbose + cargo +$NAME test nonexistent-test --verbose build: runs-on: ubuntu-24.04 @@ -119,4 +120,18 @@ - name: Test minimal-versions run: | cargo +nightly update -Zminimal-versions - cargo +nightly test + + # One job that "summarizes" the success state of this pipeline. This can then + # be added to branch protection, rather than having to add each job + # separately. + success: + runs-on: ubuntu-24.04 + needs: [rustfmt-clippy, build] + # GitHub branch protection is exceedingly silly and treats "jobs skipped + # because a dependency failed" as success. So we have to do some + # contortions to ensure the job fails if any of its dependencies fails. + if: always() # make sure this is never "skipped" + steps: + # Manually check the status of all dependencies. `if: failure()` does not work. + - name: check if any dependency failed + run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/.github/workflows/deploy.yml new/cbindgen-0.29.2+git0/.github/workflows/deploy.yml --- old/cbindgen-0.29.2+git0/.github/workflows/deploy.yml 2025-10-22 01:10:06.000000000 +0200 +++ new/cbindgen-0.29.2+git0/.github/workflows/deploy.yml 2026-02-21 11:16:15.000000000 +0100 @@ -59,9 +59,9 @@ - name: Create a release run: | - TAG=${{ steps.tagName.outputs.version }} cp target/release/cbindgen cbindgen-ubuntu22.04 cp target/aarch64-unknown-linux-gnu/release/cbindgen cbindgen-ubuntu22.04-aarch64 gh release create ${TAG} --title "${TAG}" --notes-file "CHANGES.txt" --draft cbindgen-ubuntu22.04 cbindgen-ubuntu22.04-aarch64 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ steps.tagName.outputs.version }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/src/bindgen/builder.rs new/cbindgen-0.29.2+git0/src/bindgen/builder.rs --- old/cbindgen-0.29.2+git0/src/bindgen/builder.rs 2025-10-22 01:10:06.000000000 +0200 +++ new/cbindgen-0.29.2+git0/src/bindgen/builder.rs 2026-02-21 11:16:15.000000000 +0100 @@ -6,7 +6,7 @@ use crate::bindgen::bindings::Bindings; use crate::bindgen::cargo::Cargo; -use crate::bindgen::config::{Braces, Config, Language, Profile, Style}; +use crate::bindgen::config::{Braces, Config, Language, LineEndingStyle, Profile, Style}; use crate::bindgen::error::Error; use crate::bindgen::library::Library; use crate::bindgen::parser::{self, Parse}; @@ -343,6 +343,12 @@ self } + #[allow(unused)] + pub fn with_line_endings(mut self, line_ending_style: LineEndingStyle) -> Builder { + self.config.line_endings = line_ending_style; + self + } + pub fn generate(self) -> Result<Bindings, Error> { // If macro expansion is enabled, then cbindgen will attempt to build the crate // and will run its build script which may run cbindgen again. That second run may start diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/src/bindgen/parser.rs new/cbindgen-0.29.2+git0/src/bindgen/parser.rs --- old/cbindgen-0.29.2+git0/src/bindgen/parser.rs 2025-10-22 01:10:06.000000000 +0200 +++ new/cbindgen-0.29.2+git0/src/bindgen/parser.rs 2026-02-21 11:16:15.000000000 +0100 @@ -728,7 +728,7 @@ items.join("::") }; - let is_extern_c = sig.abi.is_omitted() || sig.abi.is_c(); + let is_extern_c = sig.abi.is_omitted() || sig.abi.is_c() || sig.abi.is_cmse(); let exported_name = named_symbol.exported_name(); match (is_extern_c, exported_name) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/src/bindgen/utilities.rs new/cbindgen-0.29.2+git0/src/bindgen/utilities.rs --- old/cbindgen-0.29.2+git0/src/bindgen/utilities.rs 2025-10-22 01:10:06.000000000 +0200 +++ new/cbindgen-0.29.2+git0/src/bindgen/utilities.rs 2026-02-21 11:16:15.000000000 +0100 @@ -384,24 +384,19 @@ /// Helper function for accessing Abi information pub trait SynAbiHelpers { fn is_c(&self) -> bool; + fn is_cmse(&self) -> bool; fn is_omitted(&self) -> bool; } impl SynAbiHelpers for Option<syn::Abi> { fn is_c(&self) -> bool { - if let Some(ref abi) = *self { - if let Some(ref lit_string) = abi.name { - return matches!(lit_string.value().as_str(), "C" | "C-unwind"); - } - } - false + self.as_ref().is_some_and(|abi| abi.is_c()) + } + fn is_cmse(&self) -> bool { + self.as_ref().is_some_and(|abi| abi.is_cmse()) } fn is_omitted(&self) -> bool { - if let Some(ref abi) = *self { - abi.name.is_none() - } else { - false - } + self.as_ref().is_some_and(|abi| abi.is_omitted()) } } @@ -413,6 +408,16 @@ false } } + fn is_cmse(&self) -> bool { + if let Some(ref lit_string) = self.name { + matches!( + lit_string.value().as_str(), + "cmse-nonsecure-entry" | "cmse-nonsecure-call" + ) + } else { + false + } + } fn is_omitted(&self) -> bool { self.name.is_none() } @@ -425,13 +430,43 @@ } fn split_doc_attr(input: &str) -> Vec<String> { - input - // Convert two newline (indicate "new paragraph") into two line break. - .replace("\n\n", " \n \n") - // Convert newline after two spaces (indicate "line break") into line break. - .split(" \n") - // Convert single newline (indicate hard-wrapped) into space. - .map(|s| s.replace('\n', " ")) - .map(|s| s.trim_end().to_string()) - .collect() + if !input.contains('\n') { + // This is a special case for single-line doc comments, which normally already contain a leading space + // if it is desired. + return vec![input.to_owned()]; + } + + // Calculate the common leading whitespace across all non-empty lines, so we can trim it from all lines while + // preserving relative indentation. This is important for items nested (esp. in modules) where the doc comment + // is usually indented to the same level as the item, leaving whitespace at the beginning of each line. + // We want to trim that, but preserve relative indentation. + // Note: we assume you aren't using mixed tabs and spaces, but that is probably safe to assume for rust code + // which is usually indented with spaces. + let common_indent = input + .lines() + .filter(|line| !line.trim().is_empty()) + .map(|line| line.chars().take_while(|c| c.is_whitespace()).count()) + .min() + .unwrap_or(0); + + let mut lines: Vec<String> = input + .lines() + // Trim leading empty/whitespace lines + .skip_while(|line| line.trim().is_empty()) + // Add a leading space to non-empty lines to prevent misinterpreting leading symbols and + // mirror the behaviour of single-line doc comments, which already have a leading space. + .map(|s| { + if s.trim().is_empty() { + String::new() + } else { + format!(" {}", s.chars().skip(common_indent).collect::<String>()) + } + }) + .collect(); + // Remove trailing empty/whitespace lines + while lines.last().is_some_and(|line| line.trim().is_empty()) { + lines.pop(); + } + + lines } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/cmse.c new/cbindgen-0.29.2+git0/tests/expectations/cmse.c --- old/cbindgen-0.29.2+git0/tests/expectations/cmse.c 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/expectations/cmse.c 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,8 @@ +#include <stdarg.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdlib.h> + +void foo(void); + +void bar(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/cmse.compat.c new/cbindgen-0.29.2+git0/tests/expectations/cmse.compat.c --- old/cbindgen-0.29.2+git0/tests/expectations/cmse.compat.c 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/expectations/cmse.compat.c 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,16 @@ +#include <stdarg.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdlib.h> + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +void foo(void); + +void bar(void); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/cmse.cpp new/cbindgen-0.29.2+git0/tests/expectations/cmse.cpp --- old/cbindgen-0.29.2+git0/tests/expectations/cmse.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/expectations/cmse.cpp 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,13 @@ +#include <cstdarg> +#include <cstdint> +#include <cstdlib> +#include <ostream> +#include <new> + +extern "C" { + +void foo(); + +void bar(); + +} // extern "C" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/cmse.pyx new/cbindgen-0.29.2+git0/tests/expectations/cmse.pyx --- old/cbindgen-0.29.2+git0/tests/expectations/cmse.pyx 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/expectations/cmse.pyx 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,11 @@ +from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t +from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t +cdef extern from *: + ctypedef bint bool + ctypedef struct va_list + +cdef extern from *: + + void foo(); + + void bar(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.c new/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.c --- old/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.c 2025-10-22 01:10:06.000000000 +0200 +++ new/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.c 2026-02-21 11:16:15.000000000 +0100 @@ -8,13 +8,14 @@ *like this one with a new line character at its end *and this one as well. So they are in the same paragraph * - *Line ends with one new line should not break + *We treat empty doc comments as empty lines, so they break to the next paragraph. * - *Line ends with two spaces and a new line - *should break to next line + * Newlines are preserved with leading spaces added + * to prettify and avoid misinterpreting leading symbols. + *like headings and lists. * - *Line ends with two new lines + * Line ends with two new lines * - *Should break to next paragraph + * Should break to next paragraph */ void root(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.compat.c new/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.compat.c --- old/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.compat.c 2025-10-22 01:10:06.000000000 +0200 +++ new/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.compat.c 2026-02-21 11:16:15.000000000 +0100 @@ -12,14 +12,15 @@ *like this one with a new line character at its end *and this one as well. So they are in the same paragraph * - *Line ends with one new line should not break + *We treat empty doc comments as empty lines, so they break to the next paragraph. * - *Line ends with two spaces and a new line - *should break to next line + * Newlines are preserved with leading spaces added + * to prettify and avoid misinterpreting leading symbols. + *like headings and lists. * - *Line ends with two new lines + * Line ends with two new lines * - *Should break to next paragraph + * Should break to next paragraph */ void root(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.cpp new/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.cpp --- old/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.cpp 2025-10-22 01:10:06.000000000 +0200 +++ new/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.cpp 2026-02-21 11:16:15.000000000 +0100 @@ -10,14 +10,15 @@ ///like this one with a new line character at its end ///and this one as well. So they are in the same paragraph /// -///Line ends with one new line should not break +///We treat empty doc comments as empty lines, so they break to the next paragraph. /// -///Line ends with two spaces and a new line -///should break to next line +/// Newlines are preserved with leading spaces added +/// to prettify and avoid misinterpreting leading symbols. +///like headings and lists. /// -///Line ends with two new lines +/// Line ends with two new lines /// -///Should break to next paragraph +/// Should break to next paragraph void root(); } // extern "C" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.pyx new/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.pyx --- old/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.pyx 2025-10-22 01:10:06.000000000 +0200 +++ new/cbindgen-0.29.2+git0/tests/expectations/documentation_attr.pyx 2026-02-21 11:16:15.000000000 +0100 @@ -10,12 +10,13 @@ #like this one with a new line character at its end #and this one as well. So they are in the same paragraph # - #Line ends with one new line should not break + #We treat empty doc comments as empty lines, so they break to the next paragraph. # - #Line ends with two spaces and a new line - #should break to next line + # Newlines are preserved with leading spaces added + # to prettify and avoid misinterpreting leading symbols. + #like headings and lists. # - #Line ends with two new lines + # Line ends with two new lines # - #Should break to next paragraph + # Should break to next paragraph void root(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/documentation_block.c new/cbindgen-0.29.2+git0/tests/expectations/documentation_block.c --- old/cbindgen-0.29.2+git0/tests/expectations/documentation_block.c 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/expectations/documentation_block.c 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,48 @@ +#include <stdarg.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdlib.h> + +/** + * Some docs. + */ +extern const uint32_t FOO; + +/** + * The root of all evil. + * + * But at least it contains some more documentation as someone would expect + * from a simple test case like this. + * + * # Hint + * Always ensure that everything is properly documented, even if you feel lazy. + * **Sometimes** it is also helpful to include some markdown formatting. + * + * //////////////////////////////////////////////////////////////////////////// + * + * Attention: + * + * This is an indentation test. + * The indentation should be preserved in the generated documentation. + * + * ...and here is my shopping list to check that we do not mess with line breaks and indentation: + * - Bread + * - Brown + * - White + * - Milk + * - Eggs + */ +void root(void); + +/** + * In this block, we're testing indentation handling. + * Since all of these lines are equally indented, we want to discard the common leading whitespace, + * but preserve the relative indentation and line breaks. + * + * Including between paragraphs, + * + * - And + * - within + * - Lists + */ +void block_function(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/documentation_block.compat.c new/cbindgen-0.29.2+git0/tests/expectations/documentation_block.compat.c --- old/cbindgen-0.29.2+git0/tests/expectations/documentation_block.compat.c 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/expectations/documentation_block.compat.c 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,56 @@ +#include <stdarg.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdlib.h> + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/** + * Some docs. + */ +extern const uint32_t FOO; + +/** + * The root of all evil. + * + * But at least it contains some more documentation as someone would expect + * from a simple test case like this. + * + * # Hint + * Always ensure that everything is properly documented, even if you feel lazy. + * **Sometimes** it is also helpful to include some markdown formatting. + * + * //////////////////////////////////////////////////////////////////////////// + * + * Attention: + * + * This is an indentation test. + * The indentation should be preserved in the generated documentation. + * + * ...and here is my shopping list to check that we do not mess with line breaks and indentation: + * - Bread + * - Brown + * - White + * - Milk + * - Eggs + */ +void root(void); + +/** + * In this block, we're testing indentation handling. + * Since all of these lines are equally indented, we want to discard the common leading whitespace, + * but preserve the relative indentation and line breaks. + * + * Including between paragraphs, + * + * - And + * - within + * - Lists + */ +void block_function(void); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/documentation_block.cpp new/cbindgen-0.29.2+git0/tests/expectations/documentation_block.cpp --- old/cbindgen-0.29.2+git0/tests/expectations/documentation_block.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/expectations/documentation_block.cpp 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,47 @@ +#include <cstdarg> +#include <cstdint> +#include <cstdlib> +#include <ostream> +#include <new> + +extern "C" { + +/// Some docs. +extern const uint32_t FOO; + +/// The root of all evil. +/// +/// But at least it contains some more documentation as someone would expect +/// from a simple test case like this. +/// +/// # Hint +/// Always ensure that everything is properly documented, even if you feel lazy. +/// **Sometimes** it is also helpful to include some markdown formatting. +/// +/// //////////////////////////////////////////////////////////////////////////// +/// +/// Attention: +/// +/// This is an indentation test. +/// The indentation should be preserved in the generated documentation. +/// +/// ...and here is my shopping list to check that we do not mess with line breaks and indentation: +/// - Bread +/// - Brown +/// - White +/// - Milk +/// - Eggs +void root(); + +/// In this block, we're testing indentation handling. +/// Since all of these lines are equally indented, we want to discard the common leading whitespace, +/// but preserve the relative indentation and line breaks. +/// +/// Including between paragraphs, +/// +/// - And +/// - within +/// - Lists +void block_function(); + +} // extern "C" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations/documentation_block.pyx new/cbindgen-0.29.2+git0/tests/expectations/documentation_block.pyx --- old/cbindgen-0.29.2+git0/tests/expectations/documentation_block.pyx 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/expectations/documentation_block.pyx 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,45 @@ +from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t +from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t +cdef extern from *: + ctypedef bint bool + ctypedef struct va_list + +cdef extern from *: + + # Some docs. + extern const uint32_t FOO; + + # The root of all evil. + # + # But at least it contains some more documentation as someone would expect + # from a simple test case like this. + # + # # Hint + # Always ensure that everything is properly documented, even if you feel lazy. + # **Sometimes** it is also helpful to include some markdown formatting. + # + # //////////////////////////////////////////////////////////////////////////// + # + # Attention: + # + # This is an indentation test. + # The indentation should be preserved in the generated documentation. + # + # ...and here is my shopping list to check that we do not mess with line breaks and indentation: + # - Bread + # - Brown + # - White + # - Milk + # - Eggs + void root(); + + # In this block, we're testing indentation handling. + # Since all of these lines are equally indented, we want to discard the common leading whitespace, + # but preserve the relative indentation and line breaks. + # + # Including between paragraphs, + # + # - And + # - within + # - Lists + void block_function(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations-symbols/cmse.c.sym new/cbindgen-0.29.2+git0/tests/expectations-symbols/cmse.c.sym --- old/cbindgen-0.29.2+git0/tests/expectations-symbols/cmse.c.sym 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/expectations-symbols/cmse.c.sym 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,4 @@ +{ +foo; +bar; +}; \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/expectations-symbols/documentation_block.c.sym new/cbindgen-0.29.2+git0/tests/expectations-symbols/documentation_block.c.sym --- old/cbindgen-0.29.2+git0/tests/expectations-symbols/documentation_block.c.sym 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/expectations-symbols/documentation_block.c.sym 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,5 @@ +{ +root; +block_function; +FOO; +}; \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/rust/cmse.rs new/cbindgen-0.29.2+git0/tests/rust/cmse.rs --- old/cbindgen-0.29.2+git0/tests/rust/cmse.rs 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/rust/cmse.rs 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,5 @@ +#[no_mangle] +pub extern "cmse-nonsecure-entry" fn foo() {} + +#[no_mangle] +pub extern "cmse-nonsecure-call" fn bar() {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/rust/documentation_attr.rs new/cbindgen-0.29.2+git0/tests/rust/documentation_attr.rs --- old/cbindgen-0.29.2+git0/tests/rust/documentation_attr.rs 2025-10-22 01:10:06.000000000 +0200 +++ new/cbindgen-0.29.2+git0/tests/rust/documentation_attr.rs 2026-02-21 11:16:15.000000000 +0100 @@ -1,12 +1,12 @@ -#[doc="With doc attr, each attr contribute to one line of document"] -#[doc="like this one with a new line character at its end"] -#[doc="and this one as well. So they are in the same paragraph"] -#[doc=""] -#[doc="Line ends with one new line\nshould not break"] -#[doc=""] -#[doc="Line ends with two spaces and a new line \nshould break to next line"] -#[doc=""] -#[doc="Line ends with two new lines\n\nShould break to next paragraph"] +#[doc = "With doc attr, each attr contribute to one line of document"] +#[doc = "like this one with a new line character at its end"] +#[doc = "and this one as well. So they are in the same paragraph"] +#[doc = ""] +#[doc = "We treat empty doc comments as empty lines, so they break to the next paragraph."] +#[doc = ""] +#[doc = "Newlines are preserved with leading spaces added\nto prettify and avoid misinterpreting leading symbols."] +#[doc = "like headings and lists."] +#[doc = ""] +#[doc = "Line ends with two new lines\n\nShould break to next paragraph"] #[no_mangle] -pub extern "C" fn root() { -} +pub extern "C" fn root() {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cbindgen-0.29.2+git0/tests/rust/documentation_block.rs new/cbindgen-0.29.2+git0/tests/rust/documentation_block.rs --- old/cbindgen-0.29.2+git0/tests/rust/documentation_block.rs 1970-01-01 01:00:00.000000000 +0100 +++ new/cbindgen-0.29.2+git0/tests/rust/documentation_block.rs 2026-02-21 11:16:15.000000000 +0100 @@ -0,0 +1,48 @@ +/** +The root of all evil. + +But at least it contains some more documentation as someone would expect +from a simple test case like this. + +# Hint +Always ensure that everything is properly documented, even if you feel lazy. +**Sometimes** it is also helpful to include some markdown formatting. + +//////////////////////////////////////////////////////////////////////////// + +Attention: + + This is an indentation test. + The indentation should be preserved in the generated documentation. + +...and here is my shopping list to check that we do not mess with line breaks and indentation: +- Bread + - Brown + - White +- Milk +- Eggs +*/ +#[no_mangle] +pub extern "C" fn root() {} + +/** +Some docs. +*/ +#[no_mangle] +pub static FOO: u32 = 4; + +mod abc { + /** + In this block, we're testing indentation handling. + Since all of these lines are equally indented, we want to discard the common leading whitespace, + but preserve the relative indentation and line breaks. + + Including between paragraphs, + + - And + - within + - Lists + */ + #[no_mangle] + pub extern "C" fn block_function() {} +} ++++++ vendor.tar.zst ++++++ ++++ 2292153 lines of diff (skipped)
