From b430d1e2b911cf7525f69832428983f39850fac1 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Fri, 3 Oct 2025 13:43:41 -0400 Subject: [PATCH] aya-ebpf: re-enable generic_const_exprs --- ebpf/aya-ebpf/build.rs | 3 +-- xtask/public-api/aya-ebpf.txt | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ebpf/aya-ebpf/build.rs b/ebpf/aya-ebpf/build.rs index b38c385b..9a189b6f 100644 --- a/ebpf/aya-ebpf/build.rs +++ b/ebpf/aya-ebpf/build.rs @@ -35,8 +35,7 @@ fn main() { #[rustversion::nightly] fn check_rust_version() { - // TODO(https://github.com/rust-lang/rust/issues/141492): restore this. - // println!("cargo:rustc-cfg=generic_const_exprs"); + println!("cargo:rustc-cfg=generic_const_exprs"); } #[rustversion::not(nightly)] diff --git a/xtask/public-api/aya-ebpf.txt b/xtask/public-api/aya-ebpf.txt index b9cc7957..757c39c9 100644 --- a/xtask/public-api/aya-ebpf.txt +++ b/xtask/public-api/aya-ebpf.txt @@ -556,7 +556,7 @@ impl aya_ebpf::maps::ring_buf::RingBuf pub fn aya_ebpf::maps::ring_buf::RingBuf::output(&self, data: &T, flags: u64) -> core::result::Result<(), i64> pub const fn aya_ebpf::maps::ring_buf::RingBuf::pinned(byte_size: u32, flags: u32) -> Self pub fn aya_ebpf::maps::ring_buf::RingBuf::query(&self, flags: u64) -> u64 -pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve(&self, flags: u64) -> core::option::Option> +pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve(&self, flags: u64) -> core::option::Option> where aya_ebpf::maps::ring_buf::const_assert::Assert<{ _ }>: aya_ebpf::maps::ring_buf::const_assert::IsTrue pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve_bytes(&self, size: usize, flags: u64) -> core::option::Option> pub const fn aya_ebpf::maps::ring_buf::RingBuf::with_byte_size(byte_size: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::ring_buf::RingBuf @@ -1319,7 +1319,7 @@ impl aya_ebpf::maps::ring_buf::RingBuf pub fn aya_ebpf::maps::ring_buf::RingBuf::output(&self, data: &T, flags: u64) -> core::result::Result<(), i64> pub const fn aya_ebpf::maps::ring_buf::RingBuf::pinned(byte_size: u32, flags: u32) -> Self pub fn aya_ebpf::maps::ring_buf::RingBuf::query(&self, flags: u64) -> u64 -pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve(&self, flags: u64) -> core::option::Option> +pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve(&self, flags: u64) -> core::option::Option> where aya_ebpf::maps::ring_buf::const_assert::Assert<{ _ }>: aya_ebpf::maps::ring_buf::const_assert::IsTrue pub fn aya_ebpf::maps::ring_buf::RingBuf::reserve_bytes(&self, size: usize, flags: u64) -> core::option::Option> pub const fn aya_ebpf::maps::ring_buf::RingBuf::with_byte_size(byte_size: u32, flags: u32) -> Self impl core::marker::Sync for aya_ebpf::maps::ring_buf::RingBuf