diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-15 16:37:08 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-17 16:30:22 -0600 |
| commit | 45df4d0d9b577fecee798d672695fe24ff57fb1b (patch) | |
| tree | 1b99bf645035b58e0d6db08c7a83521f41f7a75b /vendor/displaydoc/tests | |
| parent | f94f79608393d4ab127db63cc41668445ef6b243 (diff) | |
feat: migrate from Cedar to SpiceDB authorization system
This is a major architectural change that replaces the Cedar policy-based
authorization system with SpiceDB's relation-based authorization.
Key changes:
- Migrate from Rust to Go implementation
- Replace Cedar policies with SpiceDB schema and relationships
- Switch from envoy `ext_authz` with Cedar to SpiceDB permission checks
- Update build system and dependencies for Go ecosystem
- Maintain Envoy integration for external authorization
This change enables more flexible permission modeling through SpiceDB's
Google Zanzibar inspired relation-based system, supporting complex
hierarchical permissions that were difficult to express in Cedar.
Breaking change: Existing Cedar policies and Rust-based configuration
will no longer work and need to be migrated to SpiceDB schema.
Diffstat (limited to 'vendor/displaydoc/tests')
22 files changed, 0 insertions, 759 deletions
diff --git a/vendor/displaydoc/tests/compile_tests.rs b/vendor/displaydoc/tests/compile_tests.rs deleted file mode 100644 index 29c72a86..00000000 --- a/vendor/displaydoc/tests/compile_tests.rs +++ /dev/null @@ -1,29 +0,0 @@ -#[allow(unused_attributes)] -#[rustversion::attr(not(nightly), ignore)] -#[test] -fn no_std() { - let t = trybuild::TestCases::new(); - #[cfg(not(feature = "std"))] - t.compile_fail("tests/no_std/without.rs"); - #[cfg(not(feature = "std"))] - t.compile_fail("tests/no_std/multi_line.rs"); - #[cfg(not(feature = "std"))] - t.pass("tests/no_std/multi_line_allow.rs"); - #[cfg(not(feature = "std"))] - t.compile_fail("tests/no_std/enum_prefix_missing.rs"); - #[cfg(not(feature = "std"))] - t.pass("tests/no_std/enum_prefix.rs"); - #[cfg(feature = "std")] - t.compile_fail("tests/std/without.rs"); - #[cfg(feature = "std")] - t.compile_fail("tests/std/multi_line.rs"); - #[cfg(feature = "std")] - t.pass("tests/std/multi_line_allow.rs"); - #[cfg(feature = "std")] - t.compile_fail("tests/std/enum_prefix_missing.rs"); - #[cfg(feature = "std")] - t.pass("tests/std/enum_prefix.rs"); - #[cfg(feature = "std")] - t.pass("tests/std/multiple.rs"); - t.pass("tests/no_std/with.rs"); -} diff --git a/vendor/displaydoc/tests/happy.rs b/vendor/displaydoc/tests/happy.rs deleted file mode 100644 index 85aa78f1..00000000 --- a/vendor/displaydoc/tests/happy.rs +++ /dev/null @@ -1,152 +0,0 @@ -use displaydoc::Display; - -#[cfg(feature = "std")] -use std::path::PathBuf; - -#[derive(Display)] -/// Just a basic struct {thing} -struct HappyStruct { - thing: &'static str, -} - -#[derive(Display)] -#[ignore_extra_doc_attributes] -/// Just a basic struct {thing} -/// and this line should get ignored -struct HappyStruct2 { - thing: &'static str, -} - -#[derive(Display)] -enum Happy { - /// I really like Variant1 - Variant1, - /// Variant2 is pretty swell 2 - Variant2, - /// Variant3 is okay {sometimes} - Variant3 { sometimes: &'static str }, - /** - * Variant4 wants to have a lot of lines - * - * Lets see how this works out for it - */ - Variant4, - /// Variant5 has a parameter {0} and some regular comments - // A regular comment that won't get picked - Variant5(u32), - - /// The path {0} - #[cfg(feature = "std")] - Variant6(PathBuf), - - /// These docs are ignored - #[displaydoc("Variant7 has a parameter {0} and uses #[displaydoc]")] - /// These docs are also ignored - Variant7(u32), -} - -// Used for testing indented doc comments -mod inner_mod { - use super::Display; - - #[derive(Display)] - pub enum InnerHappy { - /// I really like Variant1 - Variant1, - /// Variant2 is pretty swell 2 - Variant2, - /// Variant3 is okay {sometimes} - Variant3 { sometimes: &'static str }, - /** - * Variant4 wants to have a lot of lines - * - * Lets see how this works out for it - */ - Variant4, - /// Variant5 has a parameter {0} and some regular comments - // A regular comment that won't get picked - Variant5(u32), - - /** what happens if we - * put text on the first line? - */ - Variant6, - - /** - what happens if we don't use *? - */ - Variant7, - - /** - * - * what about extra new lines? - */ - Variant8, - } -} - -fn assert_display<T: std::fmt::Display>(input: T, expected: &'static str) { - let out = format!("{}", input); - assert_eq!(expected, out); -} - -#[test] -fn does_it_print() { - assert_display(Happy::Variant1, "I really like Variant1"); - assert_display(Happy::Variant2, "Variant2 is pretty swell 2"); - assert_display(Happy::Variant3 { sometimes: "hi" }, "Variant3 is okay hi"); - assert_display( - Happy::Variant4, - "Variant4 wants to have a lot of lines\n\nLets see how this works out for it", - ); - assert_display( - Happy::Variant5(2), - "Variant5 has a parameter 2 and some regular comments", - ); - assert_display( - Happy::Variant7(2), - "Variant7 has a parameter 2 and uses #[displaydoc]", - ); - assert_display(HappyStruct { thing: "hi" }, "Just a basic struct hi"); - - assert_display(HappyStruct2 { thing: "hi2" }, "Just a basic struct hi2"); - - assert_display(inner_mod::InnerHappy::Variant1, "I really like Variant1"); - assert_display( - inner_mod::InnerHappy::Variant2, - "Variant2 is pretty swell 2", - ); - assert_display( - inner_mod::InnerHappy::Variant3 { sometimes: "hi" }, - "Variant3 is okay hi", - ); - assert_display( - inner_mod::InnerHappy::Variant4, - "Variant4 wants to have a lot of lines\n\nLets see how this works out for it", - ); - assert_display( - inner_mod::InnerHappy::Variant5(2), - "Variant5 has a parameter 2 and some regular comments", - ); - assert_display( - inner_mod::InnerHappy::Variant6, - "what happens if we\nput text on the first line?", - ); - assert_display( - inner_mod::InnerHappy::Variant7, - "what happens if we don\'t use *?", - ); - assert_display( - inner_mod::InnerHappy::Variant8, - "what about extra new lines?", - ); -} - -#[test] -#[cfg(feature = "std")] -fn does_it_print_path() { - assert_display( - Happy::Variant6(PathBuf::from("/var/log/happy")), - "The path /var/log/happy", - ); -} diff --git a/vendor/displaydoc/tests/no_std/enum_prefix.rs b/vendor/displaydoc/tests/no_std/enum_prefix.rs deleted file mode 100644 index 5538e275..00000000 --- a/vendor/displaydoc/tests/no_std/enum_prefix.rs +++ /dev/null @@ -1,36 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -#[prefix_enum_doc_attributes] -enum TestType { - /// this variant is too - Variant1, - - /// this variant is two - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/vendor/displaydoc/tests/no_std/enum_prefix_missing.rs b/vendor/displaydoc/tests/no_std/enum_prefix_missing.rs deleted file mode 100644 index 71710726..00000000 --- a/vendor/displaydoc/tests/no_std/enum_prefix_missing.rs +++ /dev/null @@ -1,35 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -#[derive(Display)] -#[prefix_enum_doc_attributes] -enum TestType { - /// this variant is too - Variant1, - - /// this variant is two - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/vendor/displaydoc/tests/no_std/enum_prefix_missing.stderr b/vendor/displaydoc/tests/no_std/enum_prefix_missing.stderr deleted file mode 100644 index 8cf79932..00000000 --- a/vendor/displaydoc/tests/no_std/enum_prefix_missing.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: proc-macro derive panicked - --> $DIR/enum_prefix_missing.rs:22:10 - | -22 | #[derive(Display)] - | ^^^^^^^ - | - = help: message: Missing doc comment on enum with #[prefix_enum_doc_attributes]. Please remove the attribute or add a doc comment to the enum itself. - -error[E0277]: `TestType` doesn't implement `Display` - --> $DIR/enum_prefix_missing.rs:32:37 - | -32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^ `TestType` cannot be formatted with the default formatter - | - = help: the trait `Display` is not implemented for `TestType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/enum_prefix_missing.rs:32:1 - | -32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/vendor/displaydoc/tests/no_std/multi_line.rs b/vendor/displaydoc/tests/no_std/multi_line.rs deleted file mode 100644 index ca4215cd..00000000 --- a/vendor/displaydoc/tests/no_std/multi_line.rs +++ /dev/null @@ -1,37 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -enum TestType { - /// This one is okay - Variant1, - - /// Multi - /// line - /// doc. - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/vendor/displaydoc/tests/no_std/multi_line.stderr b/vendor/displaydoc/tests/no_std/multi_line.stderr deleted file mode 100644 index f3d77b9e..00000000 --- a/vendor/displaydoc/tests/no_std/multi_line.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: proc-macro derive panicked - --> $DIR/multi_line.rs:23:10 - | -23 | #[derive(Display)] - | ^^^^^^^ - | - = help: message: Multi-line comments are disabled by default by displaydoc. Please consider using block doc comments (/** */) or adding the #[ignore_extra_doc_attributes] attribute to your type next to the derive. - -error[E0277]: `TestType` doesn't implement `Display` - --> $DIR/multi_line.rs:34:37 - | -34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^ `TestType` cannot be formatted with the default formatter - | - = help: the trait `Display` is not implemented for `TestType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/multi_line.rs:34:1 - | -34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/vendor/displaydoc/tests/no_std/multi_line_allow.rs b/vendor/displaydoc/tests/no_std/multi_line_allow.rs deleted file mode 100644 index 84676817..00000000 --- a/vendor/displaydoc/tests/no_std/multi_line_allow.rs +++ /dev/null @@ -1,38 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -#[ignore_extra_doc_attributes] -enum TestType { - /// This one is okay - Variant1, - - /// Multi - /// line - /// doc. - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/vendor/displaydoc/tests/no_std/with.rs b/vendor/displaydoc/tests/no_std/with.rs deleted file mode 100644 index 67aef473..00000000 --- a/vendor/displaydoc/tests/no_std/with.rs +++ /dev/null @@ -1,32 +0,0 @@ -#![feature(lang_items, start)] -#![no_std] - -#[start] -#[cfg(not(feature = "std"))] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} - -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} - -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -#[cfg(feature = "std")] -fn main() {} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -struct FakeType; - -static_assertions::assert_impl_all!(FakeType: core::fmt::Display); diff --git a/vendor/displaydoc/tests/no_std/without.rs b/vendor/displaydoc/tests/no_std/without.rs deleted file mode 100644 index 04d4b8fa..00000000 --- a/vendor/displaydoc/tests/no_std/without.rs +++ /dev/null @@ -1,28 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -struct FakeType; - -static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/vendor/displaydoc/tests/no_std/without.stderr b/vendor/displaydoc/tests/no_std/without.stderr deleted file mode 100644 index a12edc4a..00000000 --- a/vendor/displaydoc/tests/no_std/without.stderr +++ /dev/null @@ -1,22 +0,0 @@ -warning: unused import: `displaydoc::Display` - --> $DIR/without.rs:20:5 - | -20 | use displaydoc::Display; - | ^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(unused_imports)]` on by default - -error[E0277]: `FakeType` doesn't implement `Display` - --> $DIR/without.rs:25:37 - | -25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - | ^^^^^^^^ `FakeType` cannot be formatted with the default formatter - | - = help: the trait `Display` is not implemented for `FakeType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/without.rs:25:1 - | -25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/vendor/displaydoc/tests/num_in_field.rs b/vendor/displaydoc/tests/num_in_field.rs deleted file mode 100644 index 9510f820..00000000 --- a/vendor/displaydoc/tests/num_in_field.rs +++ /dev/null @@ -1,22 +0,0 @@ -/// {foo1} {foo2} -#[derive(displaydoc::Display)] -pub struct Test { - foo1: String, - foo2: String, -} - -fn assert_display<T: std::fmt::Display>(input: T, expected: &'static str) { - let out = format!("{}", input); - assert_eq!(expected, out); -} - -#[test] -fn does_it_print() { - assert_display( - Test { - foo1: "hi".into(), - foo2: "hello".into(), - }, - "hi hello", - ); -} diff --git a/vendor/displaydoc/tests/std/enum_prefix.rs b/vendor/displaydoc/tests/std/enum_prefix.rs deleted file mode 100644 index 7e6abcce..00000000 --- a/vendor/displaydoc/tests/std/enum_prefix.rs +++ /dev/null @@ -1,36 +0,0 @@ -#![cfg_attr(not(feature = "std"), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -#[prefix_enum_doc_attributes] -enum TestType { - /// this variant is too - Variant1, - - /// this variant is two - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/vendor/displaydoc/tests/std/enum_prefix_missing.rs b/vendor/displaydoc/tests/std/enum_prefix_missing.rs deleted file mode 100644 index 45c312b7..00000000 --- a/vendor/displaydoc/tests/std/enum_prefix_missing.rs +++ /dev/null @@ -1,35 +0,0 @@ -#![cfg_attr(not(feature = "std"), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -#[derive(Display)] -#[prefix_enum_doc_attributes] -enum TestType { - /// this variant is too - Variant1, - - /// this variant is two - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/vendor/displaydoc/tests/std/enum_prefix_missing.stderr b/vendor/displaydoc/tests/std/enum_prefix_missing.stderr deleted file mode 100644 index 09e1db68..00000000 --- a/vendor/displaydoc/tests/std/enum_prefix_missing.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: proc-macro derive panicked - --> $DIR/enum_prefix_missing.rs:22:10 - | -22 | #[derive(Display)] - | ^^^^^^^ - | - = help: message: Missing doc comment on enum with #[prefix_enum_doc_attributes]. Please remove the attribute or add a doc comment to the enum itself. - -error[E0277]: `TestType` doesn't implement `std::fmt::Display` - --> $DIR/enum_prefix_missing.rs:32:37 - | -32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^ `TestType` cannot be formatted with the default formatter - | - = help: the trait `std::fmt::Display` is not implemented for `TestType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/enum_prefix_missing.rs:32:1 - | -32 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/vendor/displaydoc/tests/std/multi_line.rs b/vendor/displaydoc/tests/std/multi_line.rs deleted file mode 100644 index ca4215cd..00000000 --- a/vendor/displaydoc/tests/std/multi_line.rs +++ /dev/null @@ -1,37 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -enum TestType { - /// This one is okay - Variant1, - - /// Multi - /// line - /// doc. - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/vendor/displaydoc/tests/std/multi_line.stderr b/vendor/displaydoc/tests/std/multi_line.stderr deleted file mode 100644 index c36a75db..00000000 --- a/vendor/displaydoc/tests/std/multi_line.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: proc-macro derive panicked - --> $DIR/multi_line.rs:23:10 - | -23 | #[derive(Display)] - | ^^^^^^^ - | - = help: message: Multi-line comments are disabled by default by displaydoc. Please consider using block doc comments (/** */) or adding the #[ignore_extra_doc_attributes] attribute to your type next to the derive. - -error[E0277]: `TestType` doesn't implement `std::fmt::Display` - --> $DIR/multi_line.rs:34:37 - | -34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^ `TestType` cannot be formatted with the default formatter - | - = help: the trait `std::fmt::Display` is not implemented for `TestType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/multi_line.rs:34:1 - | -34 | static_assertions::assert_impl_all!(TestType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/vendor/displaydoc/tests/std/multi_line_allow.rs b/vendor/displaydoc/tests/std/multi_line_allow.rs deleted file mode 100644 index e09e8fcf..00000000 --- a/vendor/displaydoc/tests/std/multi_line_allow.rs +++ /dev/null @@ -1,38 +0,0 @@ -#![cfg_attr(not(feature = "std"), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -#[ignore_extra_doc_attributes] -enum TestType { - /// This one is okay - Variant1, - - /// Multi - /// line - /// doc. - Variant2, -} - -static_assertions::assert_impl_all!(TestType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/vendor/displaydoc/tests/std/multiple.rs b/vendor/displaydoc/tests/std/multiple.rs deleted file mode 100644 index 66d59b76..00000000 --- a/vendor/displaydoc/tests/std/multiple.rs +++ /dev/null @@ -1,38 +0,0 @@ -#![feature(lang_items, start)] -#![no_std] - -#[start] -#[cfg(not(feature = "std"))] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} - -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} - -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -#[cfg(feature = "std")] -fn main() {} - -use displaydoc::Display; - -/// this type is pretty swell -#[derive(Display)] -struct FakeType; - -static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - -/// this type is pretty swell2 -#[derive(Display)] -struct FakeType2; - -static_assertions::assert_impl_all!(FakeType2: core::fmt::Display); diff --git a/vendor/displaydoc/tests/std/without.rs b/vendor/displaydoc/tests/std/without.rs deleted file mode 100644 index 04d4b8fa..00000000 --- a/vendor/displaydoc/tests/std/without.rs +++ /dev/null @@ -1,28 +0,0 @@ -#![cfg_attr(not(feature = "std"), allow(internal_features), feature(lang_items, start))] -#![cfg_attr(not(feature = "std"), no_std)] - -#[cfg_attr(not(feature = "std"), start)] -fn start(_argc: isize, _argv: *const *const u8) -> isize { - 0 -} -#[lang = "eh_personality"] -#[no_mangle] -#[cfg(not(feature = "std"))] -pub extern "C" fn rust_eh_personality() {} -#[panic_handler] -#[cfg(not(feature = "std"))] -fn panic(_info: &core::panic::PanicInfo) -> ! { - unsafe { - libc::abort(); - } -} - -use displaydoc::Display; - -/// this type is pretty swell -struct FakeType; - -static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - -#[cfg(feature = "std")] -fn main() {} diff --git a/vendor/displaydoc/tests/std/without.stderr b/vendor/displaydoc/tests/std/without.stderr deleted file mode 100644 index 4f0d7131..00000000 --- a/vendor/displaydoc/tests/std/without.stderr +++ /dev/null @@ -1,22 +0,0 @@ -warning: unused import: `displaydoc::Display` - --> $DIR/without.rs:20:5 - | -20 | use displaydoc::Display; - | ^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(unused_imports)]` on by default - -error[E0277]: `FakeType` doesn't implement `std::fmt::Display` - --> $DIR/without.rs:25:37 - | -25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - | ^^^^^^^^ `FakeType` cannot be formatted with the default formatter - | - = help: the trait `std::fmt::Display` is not implemented for `FakeType` - = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead -note: required by a bound in `assert_impl_all` - --> $DIR/without.rs:25:1 - | -25 | static_assertions::assert_impl_all!(FakeType: core::fmt::Display); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all` - = note: this error originates in the macro `static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/vendor/displaydoc/tests/variantless.rs b/vendor/displaydoc/tests/variantless.rs deleted file mode 100644 index 7511bc7f..00000000 --- a/vendor/displaydoc/tests/variantless.rs +++ /dev/null @@ -1,6 +0,0 @@ -use displaydoc::Display; - -#[derive(Display)] -enum EmptyInside {} - -static_assertions::assert_impl_all!(EmptyInside: core::fmt::Display); |
