Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@colin-kiegel
Created February 20, 2017 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colin-kiegel/c451cad4f544cde9e33b9034766c70ce to your computer and use it in GitHub Desktop.
Save colin-kiegel/c451cad4f544cde9e33b9034766c70ce to your computer and use it in GitHub Desktop.
#![feature(prelude_import)]
#![no_std]
#![no_std]
#![feature(collections)]
#![allow(dead_code)]
#[prelude_import]
use core::prelude::v1::*;
#[macro_use]
extern crate core as core;
#[macro_use]
extern crate derive_builder;
extern crate collections;
struct IgnoreEmptyStruct {}
#[doc =
// this is just a compile-test - no run time checks required.
"Builder for `IgnoreEmptyStruct`.\n\n# Examples\n\n```rust\nlet builder = <IgnoreEmptyStructBuilder as Default>::default();\n// .. call some setters on `builder`\nlet _x: Result<IgnoreEmptyStruct, String> = builder.build();\n```\n"]
struct IgnoreEmptyStructBuilder {}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::core::default::Default for IgnoreEmptyStructBuilder {
#[inline]
fn default() -> IgnoreEmptyStructBuilder {
IgnoreEmptyStructBuilder {}
}
}
#[automatically_derived]
#[allow(unused_qualifications)]
impl ::core::clone::Clone for IgnoreEmptyStructBuilder {
#[inline]
fn clone(&self) -> IgnoreEmptyStructBuilder {
match *self {
IgnoreEmptyStructBuilder {} => IgnoreEmptyStructBuilder {},
}
}
}
#[allow(dead_code)]
impl IgnoreEmptyStructBuilder {
#[doc =
"Builds a new `IgnoreEmptyStruct`.\n\n# Errors\n\nIf some field has not been initialized.\n"]
#[cfg(not(no_std))]
fn build(&self) -> ::std::result::Result<IgnoreEmptyStruct, ::std::string::String> {
Ok(IgnoreEmptyStruct {})
}
}
#[test]
pub fn empty_struct() {}
#[test]
pub fn write_docs() {
{
static _MSG_FILE_LINE: (&'static str, &'static str, u32) =
("not yet implemented", "tests/no_std.rs", 19u32);
::panicking::panic(&_MSG_FILE_LINE)
}
}
pub mod __test_reexports {
#[allow(private_in_public)]
pub use super::empty_struct;
#[allow(private_in_public)]
pub use super::write_docs;
}
pub mod __test {
extern crate test;
#[main]
pub fn main() -> () {
test::test_main_static(TESTS)
}
const TESTS: &'static [self::test::TestDescAndFn] =
&[self::test::TestDescAndFn {
desc: self::test::TestDesc {
name: self::test::StaticTestName("empty_struct"),
ignore: false,
should_panic: self::test::ShouldPanic::No,
},
testfn: self::test::StaticTestFn(::__test_reexports::empty_struct),
},
self::test::TestDescAndFn {
desc: self::test::TestDesc {
name: self::test::StaticTestName("write_docs"),
ignore: false,
should_panic: self::test::ShouldPanic::No,
},
testfn: self::test::StaticTestFn(::__test_reexports::write_docs),
}];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment