is:
>
> const _: () = {
> if true {
> ::kernel::bindings::#name
> } else {
> #name
> };
> };
>
> where #name has type Ident.
>
> Signed-off-by: Alice Ryhl
Reviewed-by: Andreas Hindborg
Best regards,
Andreas Hindborg
ut by saying "`if` and
> `else` have incompatible types", but I believe the rest of the error
> message is reasonably clear and not too confusing.
>
> Signed-off-by: Alice Ryhl
Reviewed-by: Andreas Hindborg
Best regards,
Andreas Hindborg
,6 +143,16 @@ macro_rules! quote_spanned {
> ));
> quote_spanned!(@proc $v $span $($tt)*);
> };
> +(@proc $v:ident $span:ident = $($tt:tt)*) => {
> +$v.push(::proc_macro::TokenTree::Punct(
> +::proc_macro::Punct::new('=', ::proc_macro::Spacing::Alone)
> +));
> +quote_spanned!(@proc $v $span $($tt)*);
> +};
> +(@proc $v:ident $span:ident _ $($tt:tt)*) => {
> +$v.push(::proc_macro::TokenTree::Ident(::proc_macro::Ident::new("_",
> $span)));
> +quote_spanned!(@proc $v $span $($tt)*);
> +};
> (@proc $v:ident $span:ident $id:ident $($tt:tt)*) => {
>
> $v.push(::proc_macro::TokenTree::Ident(::proc_macro::Ident::new(stringify!($id),
> $span)));
> quote_spanned!(@proc $v $span $($tt)*);
The update to `impl ToTokens for TokenTree` should be split out in a
separate patch and should carry some explanation of the change.
Best regards,
Andreas Hindborg
"Alice Ryhl" writes:
> On Fri, Feb 28, 2025 at 8:19 AM Andreas Hindborg
> wrote:
>>
>> "Alice Ryhl" writes:
>>
>> > Signed-off-by: Alice Ryhl
>>
>> What is going on with the cover letter of this one?
>
> It's empt
"Alice Ryhl" writes:
> On Fri, Feb 28, 2025 at 9:20 AM Andreas Hindborg
> wrote:
>>
>> "Alice Ryhl" writes:
>>
>> > This macro behaves like #[no_mangle], but also performs an assertion
>> > that the Rust function has the same si
"Alice Ryhl" writes:
> On Fri, Feb 28, 2025 at 9:20 AM Andreas Hindborg
> wrote:
>>
>> "Alice Ryhl" writes:
>>
>> > Without this change, the rest of this series will emit the following
>> > error message:
>> >
>> &g
afe extern "C" fn(_, _) -> _
> {kernel::bindings::drm_panic_qr_max_data_size}`
>found fn item `extern "C" fn(_, _) -> _
> {drm_panic_qr_max_data_size}`
>
> Signed-off-by: Alice Ryhl
Reviewed-by: Andreas Hindborg
Best regards,
Andreas Hindborg
"Alice Ryhl" writes:
> This moves the rust_fmt_argument function over to use the new #[export]
> macro, which will verify at compile-time that the function signature
> matches what is in the header file.
>
> Signed-off-by: Alice Ryhl
Reviewed-by: Andreas Hindborg
ust/kernel/print.rs
> +++ b/rust/kernel/print.rs
> @@ -6,13 +6,13 @@
> //!
> //! Reference: <https://docs.kernel.org/core-api/printk-basics.html>
>
> -use core::{
> +use core::fmt;
> +
> +use crate::{
> ffi::{c_char, c_void},
> -fmt,
> +str::RawF
"Alice Ryhl" writes:
> Signed-off-by: Alice Ryhl
What is going on with the cover letter of this one?
Best regards,
Andreas Hindborg
10 matches
Mail list logo