Something went wrong. Try again.
(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132// SPDX-License-Identifier: Apache-2.0 OR MIT
#![cfg_attr(feature = "alloc", feature(allocator_api))]
use core::convert::Infallible;
#[cfg(feature = "alloc")]use std::alloc::AllocError;
#[derive(Debug)]pub struct Error;
impl From<Infallible> for Error { #[inline] fn from(e: Infallible) -> Self { match e {} }}
#[cfg(feature = "alloc")]impl From<AllocError> for Error { #[inline] fn from(_: AllocError) -> Self { Self }}
#[allow(dead_code)]fn main() { let _ = Error;}