31 lines · 526 B · Rust
RawDownload
// 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;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t