summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/auxiliary
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/rustdoc-ui/auxiliary
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.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.rs3
-rw-r--r--tests/rustdoc-ui/auxiliary/extern_macros.rs7
-rw-r--r--tests/rustdoc-ui/auxiliary/issue-61592.rs3
-rw-r--r--tests/rustdoc-ui/auxiliary/module_macro_doc.rs1
-rw-r--r--tests/rustdoc-ui/auxiliary/overflow.rs20
-rw-r--r--tests/rustdoc-ui/auxiliary/panic-item.rs17
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() {}