diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/rustdoc-ui/auxiliary | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-ui/auxiliary')
-rw-r--r-- | tests/rustdoc-ui/auxiliary/empty-fn.rs | 3 | ||||
-rw-r--r-- | tests/rustdoc-ui/auxiliary/extern_macros.rs | 7 | ||||
-rw-r--r-- | tests/rustdoc-ui/auxiliary/issue-61592.rs | 3 | ||||
-rw-r--r-- | tests/rustdoc-ui/auxiliary/module_macro_doc.rs | 1 | ||||
-rw-r--r-- | tests/rustdoc-ui/auxiliary/overflow.rs | 20 | ||||
-rw-r--r-- | tests/rustdoc-ui/auxiliary/panic-item.rs | 17 |
6 files changed, 51 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/auxiliary/empty-fn.rs b/tests/rustdoc-ui/auxiliary/empty-fn.rs new file mode 100644 index 000000000..877810f15 --- /dev/null +++ b/tests/rustdoc-ui/auxiliary/empty-fn.rs @@ -0,0 +1,3 @@ +// no-prefer-dynamic +#![crate_type = "lib"] +pub fn empty() {} diff --git a/tests/rustdoc-ui/auxiliary/extern_macros.rs b/tests/rustdoc-ui/auxiliary/extern_macros.rs new file mode 100644 index 000000000..ee1fec4c5 --- /dev/null +++ b/tests/rustdoc-ui/auxiliary/extern_macros.rs @@ -0,0 +1,7 @@ +#[macro_export] +macro_rules! attrs_on_struct { + ( $( #[$attr:meta] )* ) => { + $( #[$attr] )* + pub struct ExpandedStruct; + } +} diff --git a/tests/rustdoc-ui/auxiliary/issue-61592.rs b/tests/rustdoc-ui/auxiliary/issue-61592.rs new file mode 100644 index 000000000..57a365b3f --- /dev/null +++ b/tests/rustdoc-ui/auxiliary/issue-61592.rs @@ -0,0 +1,3 @@ +#![crate_name = "foo"] + +pub trait Foo {} diff --git a/tests/rustdoc-ui/auxiliary/module_macro_doc.rs b/tests/rustdoc-ui/auxiliary/module_macro_doc.rs new file mode 100644 index 000000000..9d6b52b95 --- /dev/null +++ b/tests/rustdoc-ui/auxiliary/module_macro_doc.rs @@ -0,0 +1 @@ +//! [`long_cat`] is really long diff --git a/tests/rustdoc-ui/auxiliary/overflow.rs b/tests/rustdoc-ui/auxiliary/overflow.rs new file mode 100644 index 000000000..ff65936be --- /dev/null +++ b/tests/rustdoc-ui/auxiliary/overflow.rs @@ -0,0 +1,20 @@ +pub struct B0; +pub struct B1; +use std::ops::Shl; +use std::ops::Sub; +pub type Shleft<A, B> = <A as Shl<B>>::Output; +pub type Sub1<A> = <A as Sub<B1>>::Output; +pub struct UInt<U, B> { + pub(crate) msb: U, + pub(crate) lsb: B, +} +impl<U, B, Ur, Br> Shl<UInt<Ur, Br>> for UInt<U, B> +where + UInt<Ur, Br>: Sub<B1>, + UInt<UInt<U, B>, B0>: Shl<Sub1<UInt<Ur, Br>>>, +{ + type Output = Shleft<UInt<UInt<U, B>, B0>, Sub1<UInt<Ur, Br>>>; + fn shl(self, rhs: UInt<Ur, Br>) -> Self::Output { + unimplemented!() + } +} diff --git a/tests/rustdoc-ui/auxiliary/panic-item.rs b/tests/rustdoc-ui/auxiliary/panic-item.rs new file mode 100644 index 000000000..17b26850d --- /dev/null +++ b/tests/rustdoc-ui/auxiliary/panic-item.rs @@ -0,0 +1,17 @@ +// no-prefer-dynamic +#![crate_type = "lib"] +#![no_std] +#![feature(lang_items)] + +use core::panic::PanicInfo; +use core::sync::atomic::{self, Ordering}; + +#[panic_handler] +fn panic(_info: &PanicInfo) -> ! { + loop { + atomic::compiler_fence(Ordering::SeqCst); + } +} + +#[lang = "eh_personality"] +fn foo() {} |