summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/issues
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /tests/rustdoc-ui/issues
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-ui/issues')
-rw-r--r--tests/rustdoc-ui/issues/auxiliary/empty-fn.rs3
-rw-r--r--tests/rustdoc-ui/issues/auxiliary/issue-61592.rs3
-rw-r--r--tests/rustdoc-ui/issues/auxiliary/panic-handler.rs9
-rw-r--r--tests/rustdoc-ui/issues/issue-101076.rs14
-rw-r--r--tests/rustdoc-ui/issues/issue-102986.rs4
-rw-r--r--tests/rustdoc-ui/issues/issue-102986.stderr14
-rw-r--r--tests/rustdoc-ui/issues/issue-103997.rs6
-rw-r--r--tests/rustdoc-ui/issues/issue-103997.stderr10
-rw-r--r--tests/rustdoc-ui/issues/issue-105334.rs2
-rw-r--r--tests/rustdoc-ui/issues/issue-105334.stderr9
-rw-r--r--tests/rustdoc-ui/issues/issue-105737.rs4
-rw-r--r--tests/rustdoc-ui/issues/issue-105737.stderr12
-rw-r--r--tests/rustdoc-ui/issues/issue-105742.rs58
-rw-r--r--tests/rustdoc-ui/issues/issue-105742.stderr482
-rw-r--r--tests/rustdoc-ui/issues/issue-106213.rs7
-rw-r--r--tests/rustdoc-ui/issues/issue-106213.stderr9
-rw-r--r--tests/rustdoc-ui/issues/issue-106226.rs3
-rw-r--r--tests/rustdoc-ui/issues/issue-106226.stderr9
-rw-r--r--tests/rustdoc-ui/issues/issue-107918.rs12
-rw-r--r--tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs14
-rw-r--r--tests/rustdoc-ui/issues/issue-110900.rs28
-rw-r--r--tests/rustdoc-ui/issues/issue-58473-2.rs12
-rw-r--r--tests/rustdoc-ui/issues/issue-58473.rs10
-rw-r--r--tests/rustdoc-ui/issues/issue-61592-2.rs10
-rw-r--r--tests/rustdoc-ui/issues/issue-61592-2.stderr12
-rw-r--r--tests/rustdoc-ui/issues/issue-61592.rs8
-rw-r--r--tests/rustdoc-ui/issues/issue-61592.stderr11
-rw-r--r--tests/rustdoc-ui/issues/issue-61732.rs4
-rw-r--r--tests/rustdoc-ui/issues/issue-61732.stderr11
-rw-r--r--tests/rustdoc-ui/issues/issue-74134.private.stderr11
-rw-r--r--tests/rustdoc-ui/issues/issue-74134.public.stderr11
-rw-r--r--tests/rustdoc-ui/issues/issue-74134.rs41
-rw-r--r--tests/rustdoc-ui/issues/issue-79465.rs2
-rw-r--r--tests/rustdoc-ui/issues/issue-79465.stderr9
-rw-r--r--tests/rustdoc-ui/issues/issue-79467.rs8
-rw-r--r--tests/rustdoc-ui/issues/issue-79467.stderr9
-rw-r--r--tests/rustdoc-ui/issues/issue-79494.rs5
-rw-r--r--tests/rustdoc-ui/issues/issue-79494.stderr12
-rw-r--r--tests/rustdoc-ui/issues/issue-80992.rs11
-rw-r--r--tests/rustdoc-ui/issues/issue-80992.stdout6
-rw-r--r--tests/rustdoc-ui/issues/issue-81662-shortness.rs12
-rw-r--r--tests/rustdoc-ui/issues/issue-81662-shortness.stdout16
-rw-r--r--tests/rustdoc-ui/issues/issue-83883-describe-lints.rs10
-rw-r--r--tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout24
-rw-r--r--tests/rustdoc-ui/issues/issue-91134.rs14
-rw-r--r--tests/rustdoc-ui/issues/issue-91134.stdout6
-rw-r--r--tests/rustdoc-ui/issues/issue-91713.rs3
-rw-r--r--tests/rustdoc-ui/issues/issue-91713.stderr5
-rw-r--r--tests/rustdoc-ui/issues/issue-91713.stdout25
-rw-r--r--tests/rustdoc-ui/issues/issue-96287.rs16
-rw-r--r--tests/rustdoc-ui/issues/issue-96287.stderr9
-rw-r--r--tests/rustdoc-ui/issues/issue-98690.rs10
-rw-r--r--tests/rustdoc-ui/issues/issue-98690.stderr1
53 files changed, 1066 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/issues/auxiliary/empty-fn.rs b/tests/rustdoc-ui/issues/auxiliary/empty-fn.rs
new file mode 100644
index 000000000..877810f15
--- /dev/null
+++ b/tests/rustdoc-ui/issues/auxiliary/empty-fn.rs
@@ -0,0 +1,3 @@
+// no-prefer-dynamic
+#![crate_type = "lib"]
+pub fn empty() {}
diff --git a/tests/rustdoc-ui/issues/auxiliary/issue-61592.rs b/tests/rustdoc-ui/issues/auxiliary/issue-61592.rs
new file mode 100644
index 000000000..57a365b3f
--- /dev/null
+++ b/tests/rustdoc-ui/issues/auxiliary/issue-61592.rs
@@ -0,0 +1,3 @@
+#![crate_name = "foo"]
+
+pub trait Foo {}
diff --git a/tests/rustdoc-ui/issues/auxiliary/panic-handler.rs b/tests/rustdoc-ui/issues/auxiliary/panic-handler.rs
new file mode 100644
index 000000000..0aaaeee10
--- /dev/null
+++ b/tests/rustdoc-ui/issues/auxiliary/panic-handler.rs
@@ -0,0 +1,9 @@
+// compile-flags: -C panic=abort
+
+#![no_std]
+#![no_main]
+
+#[panic_handler]
+fn panic(_: &core::panic::PanicInfo) -> ! {
+ loop {}
+}
diff --git a/tests/rustdoc-ui/issues/issue-101076.rs b/tests/rustdoc-ui/issues/issue-101076.rs
new file mode 100644
index 000000000..648f99029
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-101076.rs
@@ -0,0 +1,14 @@
+// check-pass
+
+const _: () = {
+ #[macro_export]
+ macro_rules! first_macro {
+ () => {}
+ }
+ mod foo {
+ #[macro_export]
+ macro_rules! second_macro {
+ () => {}
+ }
+ }
+};
diff --git a/tests/rustdoc-ui/issues/issue-102986.rs b/tests/rustdoc-ui/issues/issue-102986.rs
new file mode 100644
index 000000000..001784ac2
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-102986.rs
@@ -0,0 +1,4 @@
+struct Struct {
+ y: (typeof("hey"),),
+ //~^ `typeof` is a reserved keyword but unimplemented
+}
diff --git a/tests/rustdoc-ui/issues/issue-102986.stderr b/tests/rustdoc-ui/issues/issue-102986.stderr
new file mode 100644
index 000000000..3a573726c
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-102986.stderr
@@ -0,0 +1,14 @@
+error[E0516]: `typeof` is a reserved keyword but unimplemented
+ --> $DIR/issue-102986.rs:2:9
+ |
+LL | y: (typeof("hey"),),
+ | ^^^^^^^^^^^^^ reserved keyword
+ |
+help: consider replacing `typeof(...)` with an actual type
+ |
+LL | y: (&'static str,),
+ | ~~~~~~~~~~~~
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0516`.
diff --git a/tests/rustdoc-ui/issues/issue-103997.rs b/tests/rustdoc-ui/issues/issue-103997.rs
new file mode 100644
index 000000000..36f42fb15
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-103997.rs
@@ -0,0 +1,6 @@
+// check-pass
+
+pub fn foo() {}
+
+/// [`foo`](Self::foo) //~ WARNING unresolved link to `Self::foo`
+pub use foo as bar;
diff --git a/tests/rustdoc-ui/issues/issue-103997.stderr b/tests/rustdoc-ui/issues/issue-103997.stderr
new file mode 100644
index 000000000..c06db9149
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-103997.stderr
@@ -0,0 +1,10 @@
+warning: unresolved link to `Self::foo`
+ --> $DIR/issue-103997.rs:5:13
+ |
+LL | /// [`foo`](Self::foo)
+ | ^^^^^^^^^ no item named `Self` in scope
+ |
+ = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/rustdoc-ui/issues/issue-105334.rs b/tests/rustdoc-ui/issues/issue-105334.rs
new file mode 100644
index 000000000..ee1adc6a0
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-105334.rs
@@ -0,0 +1,2 @@
+impl Vec< br##"*.."## > {}
+//~^ ERROR
diff --git a/tests/rustdoc-ui/issues/issue-105334.stderr b/tests/rustdoc-ui/issues/issue-105334.stderr
new file mode 100644
index 000000000..e163bb4db
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-105334.stderr
@@ -0,0 +1,9 @@
+error[E0747]: constant provided when a type was expected
+ --> $DIR/issue-105334.rs:1:11
+ |
+LL | impl Vec< br##"*.."## > {}
+ | ^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/rustdoc-ui/issues/issue-105737.rs b/tests/rustdoc-ui/issues/issue-105737.rs
new file mode 100644
index 000000000..154f069d8
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-105737.rs
@@ -0,0 +1,4 @@
+impl Vec<lol> {}
+//~^ ERROR
+
+pub fn lol() {}
diff --git a/tests/rustdoc-ui/issues/issue-105737.stderr b/tests/rustdoc-ui/issues/issue-105737.stderr
new file mode 100644
index 000000000..2dd9beb17
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-105737.stderr
@@ -0,0 +1,12 @@
+error[E0747]: constant provided when a type was expected
+ --> $DIR/issue-105737.rs:1:10
+ |
+LL | impl Vec<lol> {}
+ | ^^^
+ |
+ = help: `lol` is a function item, not a type
+ = help: function item types cannot be named directly
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/rustdoc-ui/issues/issue-105742.rs b/tests/rustdoc-ui/issues/issue-105742.rs
new file mode 100644
index 000000000..1fbb70c78
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-105742.rs
@@ -0,0 +1,58 @@
+// compile-flags: -Znormalize-docs
+use std::ops::Index;
+
+pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
+ //~^ expected 1 lifetime argument
+ //~| expected 1 generic argument
+ //~| the trait `SVec` cannot be made into an object
+ //~| `SVec` cannot be made into an object
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ let _ = s;
+}
+
+pub trait SVec: Index<
+ <Self as SVec>::Item,
+ //~^ expected 1 lifetime argument
+ //~| expected 1 generic argument
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ Output = <Index<<Self as SVec>::Item,
+ //~^ expected 1 lifetime argument
+ //~| expected 1 generic argument
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ Output = <Self as SVec>::Item> as SVec>::Item,
+ //~^ expected 1 lifetime argument
+ //~| expected 1 generic argument
+ //~| expected 1 lifetime argument
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| expected 1 generic argument
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+ //~| missing generics for associated type `SVec::Item`
+> {
+ type Item<'a, T>;
+
+ fn len(&self) -> <Self as SVec>::Item;
+ //~^ expected 1 lifetime argument
+ //~| missing generics for associated type `SVec::Item`
+ //~| expected 1 generic argument
+ //~| missing generics for associated type `SVec::Item`
+}
diff --git a/tests/rustdoc-ui/issues/issue-105742.stderr b/tests/rustdoc-ui/issues/issue-105742.stderr
new file mode 100644
index 000000000..b63176c91
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-105742.stderr
@@ -0,0 +1,482 @@
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:15:21
+ |
+LL | <Self as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | <Self as SVec>::Item<'a>,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:15:21
+ |
+LL | <Self as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | <Self as SVec>::Item<T>,
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:24:37
+ |
+LL | Output = <Index<<Self as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | Output = <Index<<Self as SVec>::Item<'a>,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:24:37
+ |
+LL | Output = <Index<<Self as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | Output = <Index<<Self as SVec>::Item<T>,
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:30
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | Output = <Self as SVec>::Item<'a>> as SVec>::Item,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:30
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | Output = <Self as SVec>::Item<T>> as SVec>::Item,
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:46
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item<'a>,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:46
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item<T>,
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:4:40
+ |
+LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item<'_> = T, Output = T>) {
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:4:40
+ |
+LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item<T> = T, Output = T>) {
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:15:21
+ |
+LL | <Self as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | <Self as SVec>::Item<'a>,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:15:21
+ |
+LL | <Self as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | <Self as SVec>::Item<T>,
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:24:37
+ |
+LL | Output = <Index<<Self as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | Output = <Index<<Self as SVec>::Item<'a>,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:24:37
+ |
+LL | Output = <Index<<Self as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | Output = <Index<<Self as SVec>::Item<T>,
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:30
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | Output = <Self as SVec>::Item<'a>> as SVec>::Item,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:30
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | Output = <Self as SVec>::Item<T>> as SVec>::Item,
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:46
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item<'a>,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:46
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item<T>,
+ | +++
+
+error[E0038]: the trait `SVec` cannot be made into an object
+ --> $DIR/issue-105742.rs:4:31
+ |
+LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SVec` cannot be made into an object
+ |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+ --> $DIR/issue-105742.rs:14:17
+ |
+LL | pub trait SVec: Index<
+ | ____________----__^
+ | | |
+ | | this trait cannot be made into an object...
+LL | | <Self as SVec>::Item,
+LL | |
+LL | |
+... |
+LL | |/ Output = <Index<<Self as SVec>::Item,
+LL | ||
+LL | ||
+LL | ||
+... ||
+LL | ||
+LL | || Output = <Self as SVec>::Item> as SVec>::Item,
+ | ||_________________________________________________^ ...because it uses `Self` as a type parameter
+... |
+LL | |
+LL | | > {
+ | |__^ ...because it uses `Self` as a type parameter
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:15:21
+ |
+LL | <Self as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | <Self as SVec>::Item<'a>,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:15:21
+ |
+LL | <Self as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | <Self as SVec>::Item<T>,
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:24:37
+ |
+LL | Output = <Index<<Self as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | Output = <Index<<Self as SVec>::Item<'a>,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:24:37
+ |
+LL | Output = <Index<<Self as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | Output = <Index<<Self as SVec>::Item<T>,
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:30
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | Output = <Self as SVec>::Item<'a>> as SVec>::Item,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:30
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | Output = <Self as SVec>::Item<T>> as SVec>::Item,
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:46
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item<'a>,
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:33:46
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item,
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | Output = <Self as SVec>::Item> as SVec>::Item<T>,
+ | +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:53:38
+ |
+LL | fn len(&self) -> <Self as SVec>::Item;
+ | ^^^^ expected 1 lifetime argument
+ |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ --
+help: add missing lifetime argument
+ |
+LL | fn len(&self) -> <Self as SVec>::Item<'_>;
+ | ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+ --> $DIR/issue-105742.rs:53:38
+ |
+LL | fn len(&self) -> <Self as SVec>::Item;
+ | ^^^^ expected 1 generic argument
+ |
+note: associated type defined here, with 1 generic parameter: `T`
+ --> $DIR/issue-105742.rs:51:10
+ |
+LL | type Item<'a, T>;
+ | ^^^^ -
+help: add missing generic argument
+ |
+LL | fn len(&self) -> <Self as SVec>::Item<T>;
+ | +++
+
+error: aborting due to 29 previous errors
+
+Some errors have detailed explanations: E0038, E0107.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/rustdoc-ui/issues/issue-106213.rs b/tests/rustdoc-ui/issues/issue-106213.rs
new file mode 100644
index 000000000..6d51846b7
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-106213.rs
@@ -0,0 +1,7 @@
+// compile-flags: --document-private-items
+// edition:2021
+
+fn use_avx() -> dyn {
+ //~^ ERROR at least one trait is required for an object type
+ !( ident_error )
+}
diff --git a/tests/rustdoc-ui/issues/issue-106213.stderr b/tests/rustdoc-ui/issues/issue-106213.stderr
new file mode 100644
index 000000000..0a4ff69ba
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-106213.stderr
@@ -0,0 +1,9 @@
+error[E0224]: at least one trait is required for an object type
+ --> $DIR/issue-106213.rs:4:17
+ |
+LL | fn use_avx() -> dyn {
+ | ^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0224`.
diff --git a/tests/rustdoc-ui/issues/issue-106226.rs b/tests/rustdoc-ui/issues/issue-106226.rs
new file mode 100644
index 000000000..71b497a9a
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-106226.rs
@@ -0,0 +1,3 @@
+// This is a regression test for <https://github.com/rust-lang/rust/issues/106226>.
+type F = [_; ()];
+//~^ ERROR
diff --git a/tests/rustdoc-ui/issues/issue-106226.stderr b/tests/rustdoc-ui/issues/issue-106226.stderr
new file mode 100644
index 000000000..1c973dab6
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-106226.stderr
@@ -0,0 +1,9 @@
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
+ --> $DIR/issue-106226.rs:2:11
+ |
+LL | type F = [_; ()];
+ | ^ not allowed in type signatures
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/rustdoc-ui/issues/issue-107918.rs b/tests/rustdoc-ui/issues/issue-107918.rs
new file mode 100644
index 000000000..13788df0f
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-107918.rs
@@ -0,0 +1,12 @@
+// aux-build:panic-handler.rs
+// compile-flags: --document-private-items
+// build-pass
+// ignore-windows
+
+#![no_std]
+#![no_main]
+
+#[panic_handler]
+fn panic(_: &core::panic::PanicInfo) -> ! {
+ loop {}
+}
diff --git a/tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs b/tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs
new file mode 100644
index 000000000..0ec852322
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs
@@ -0,0 +1,14 @@
+// Regression test for <https://github.com/rust-lang/rust/issues/109282>.
+// Import for `ValueEnum` is inlined and doc comments on the import and `ValueEnum` itself are
+// merged. After the merge they still have correct parent scopes to resolve both `[ValueEnum]`.
+
+// check-pass
+
+mod m {
+ pub enum ValueEnum {}
+}
+mod m2 {
+ /// [`ValueEnum`]
+ pub use crate::m::ValueEnum;
+}
+pub use m2::ValueEnum;
diff --git a/tests/rustdoc-ui/issues/issue-110900.rs b/tests/rustdoc-ui/issues/issue-110900.rs
new file mode 100644
index 000000000..e3154baf8
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-110900.rs
@@ -0,0 +1,28 @@
+// check-pass
+
+#![crate_type="lib"]
+#![feature(associated_type_bounds)]
+
+trait A<'a> {}
+trait B<'b> {}
+
+trait C<'c>: for<'a> A<'a> + for<'b> B<'b> {
+ type As;
+}
+
+trait E<'e> {
+ type As;
+}
+trait F<'f>: for<'a> A<'a> + for<'e> E<'e> {}
+struct G<T>
+where
+ T: for<'l, 'i> H<'l, 'i, As: for<'a> A<'a> + 'i>
+{
+ t: std::marker::PhantomData<T>,
+}
+
+trait I<'a, 'b, 'c> {
+ type As;
+}
+
+trait H<'d, 'e>: for<'f> I<'d, 'f, 'e> + 'd {}
diff --git a/tests/rustdoc-ui/issues/issue-58473-2.rs b/tests/rustdoc-ui/issues/issue-58473-2.rs
new file mode 100644
index 000000000..000b6a329
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-58473-2.rs
@@ -0,0 +1,12 @@
+// check-pass
+
+#![deny(rustdoc::private_doc_tests)]
+
+mod foo {
+ /**
+ Does nothing, returns `()`
+
+ yadda-yadda-yadda
+ */
+ fn foo() {}
+}
diff --git a/tests/rustdoc-ui/issues/issue-58473.rs b/tests/rustdoc-ui/issues/issue-58473.rs
new file mode 100644
index 000000000..44e1f58d0
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-58473.rs
@@ -0,0 +1,10 @@
+// check-pass
+
+pub trait Foo {
+ /**
+ Does nothing, returns `()`
+
+ yadda-yadda-yadda
+ */
+ fn foo() {}
+}
diff --git a/tests/rustdoc-ui/issues/issue-61592-2.rs b/tests/rustdoc-ui/issues/issue-61592-2.rs
new file mode 100644
index 000000000..5b4fc5ee7
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-61592-2.rs
@@ -0,0 +1,10 @@
+// aux-build:issue-61592.rs
+
+extern crate foo;
+
+#[doc = "bar"]
+#[doc(inline)] //~ ERROR
+#[doc = "baz"]
+pub use foo::Foo as _;
+
+fn main() {}
diff --git a/tests/rustdoc-ui/issues/issue-61592-2.stderr b/tests/rustdoc-ui/issues/issue-61592-2.stderr
new file mode 100644
index 000000000..1b7f8bb55
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-61592-2.stderr
@@ -0,0 +1,12 @@
+error[E0780]: anonymous imports cannot be inlined
+ --> $DIR/issue-61592-2.rs:6:7
+ |
+LL | #[doc(inline)]
+ | ^^^^^^
+LL | #[doc = "baz"]
+LL | pub use foo::Foo as _;
+ | ---------------------- anonymous import
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0780`.
diff --git a/tests/rustdoc-ui/issues/issue-61592.rs b/tests/rustdoc-ui/issues/issue-61592.rs
new file mode 100644
index 000000000..66772557f
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-61592.rs
@@ -0,0 +1,8 @@
+// aux-build:issue-61592.rs
+
+extern crate foo;
+
+#[doc(inline)] //~ ERROR
+pub use foo::Foo as _;
+
+fn main() {}
diff --git a/tests/rustdoc-ui/issues/issue-61592.stderr b/tests/rustdoc-ui/issues/issue-61592.stderr
new file mode 100644
index 000000000..9c9c9106f
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-61592.stderr
@@ -0,0 +1,11 @@
+error[E0780]: anonymous imports cannot be inlined
+ --> $DIR/issue-61592.rs:5:7
+ |
+LL | #[doc(inline)]
+ | ^^^^^^
+LL | pub use foo::Foo as _;
+ | ---------------------- anonymous import
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0780`.
diff --git a/tests/rustdoc-ui/issues/issue-61732.rs b/tests/rustdoc-ui/issues/issue-61732.rs
new file mode 100644
index 000000000..4bd8efeaa
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-61732.rs
@@ -0,0 +1,4 @@
+// This previously triggered an ICE.
+
+pub(in crate::r#mod) fn main() {}
+//~^ ERROR failed to resolve: maybe a missing crate `r#mod`
diff --git a/tests/rustdoc-ui/issues/issue-61732.stderr b/tests/rustdoc-ui/issues/issue-61732.stderr
new file mode 100644
index 000000000..d16ec6a85
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-61732.stderr
@@ -0,0 +1,11 @@
+error[E0433]: failed to resolve: maybe a missing crate `r#mod`?
+ --> $DIR/issue-61732.rs:3:15
+ |
+LL | pub(in crate::r#mod) fn main() {}
+ | ^^^^^ maybe a missing crate `r#mod`?
+ |
+ = help: consider adding `extern crate r#mod` to use the `r#mod` crate
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/rustdoc-ui/issues/issue-74134.private.stderr b/tests/rustdoc-ui/issues/issue-74134.private.stderr
new file mode 100644
index 000000000..44c88b618
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-74134.private.stderr
@@ -0,0 +1,11 @@
+warning: public documentation for `public_item` links to private item `PrivateType`
+ --> $DIR/issue-74134.rs:19:11
+ |
+LL | /// [`PrivateType`]
+ | ^^^^^^^^^^^ this item is private
+ |
+ = note: this link resolves only because you passed `--document-private-items`, but will break without
+ = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/rustdoc-ui/issues/issue-74134.public.stderr b/tests/rustdoc-ui/issues/issue-74134.public.stderr
new file mode 100644
index 000000000..5b1887b83
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-74134.public.stderr
@@ -0,0 +1,11 @@
+warning: public documentation for `public_item` links to private item `PrivateType`
+ --> $DIR/issue-74134.rs:19:11
+ |
+LL | /// [`PrivateType`]
+ | ^^^^^^^^^^^ this item is private
+ |
+ = note: this link will resolve properly if you pass `--document-private-items`
+ = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/rustdoc-ui/issues/issue-74134.rs b/tests/rustdoc-ui/issues/issue-74134.rs
new file mode 100644
index 000000000..b1be9123a
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-74134.rs
@@ -0,0 +1,41 @@
+// revisions: public private
+// [private]compile-flags: --document-private-items
+// check-pass
+
+// There are 4 cases here:
+// 1. public item -> public type: no warning
+// 2. public item -> private type: warning
+// 3. private item -> public type: no warning
+// 4. private item -> private type: no warning
+// All 4 cases are tested with and without --document-private-items.
+//
+// Case 4 without --document-private-items is the one described in issue #74134.
+
+struct PrivateType;
+pub struct PublicType;
+
+pub struct Public {
+ /// [`PublicType`]
+ /// [`PrivateType`]
+ //~^ WARNING public documentation for `public_item` links to private item `PrivateType`
+ pub public_item: u32,
+
+ /// [`PublicType`]
+ /// [`PrivateType`]
+ private_item: u32,
+}
+
+// The following cases are identical to the ones above, except that they are in a private
+// module. Thus they all fall into cases 3 and 4 and should not produce a warning.
+
+mod private {
+ pub struct Public {
+ /// [`super::PublicType`]
+ /// [`super::PrivateType`]
+ pub public_item: u32,
+
+ /// [`super::PublicType`]
+ /// [`super::PrivateType`]
+ private_item: u32,
+ }
+}
diff --git a/tests/rustdoc-ui/issues/issue-79465.rs b/tests/rustdoc-ui/issues/issue-79465.rs
new file mode 100644
index 000000000..e50f3995b
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-79465.rs
@@ -0,0 +1,2 @@
+pub fn f1<T>(x: T::A) {}
+//~^ ERROR
diff --git a/tests/rustdoc-ui/issues/issue-79465.stderr b/tests/rustdoc-ui/issues/issue-79465.stderr
new file mode 100644
index 000000000..d187a2e66
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-79465.stderr
@@ -0,0 +1,9 @@
+error[E0220]: associated type `A` not found for `T`
+ --> $DIR/issue-79465.rs:1:20
+ |
+LL | pub fn f1<T>(x: T::A) {}
+ | ^ associated type `A` not found
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/rustdoc-ui/issues/issue-79467.rs b/tests/rustdoc-ui/issues/issue-79467.rs
new file mode 100644
index 000000000..eb0b9b380
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-79467.rs
@@ -0,0 +1,8 @@
+fn g()
+where
+ 'static: 'static,
+ dyn 'static: 'static + Copy, //~ ERROR at least one trait is required for an object type
+{
+}
+
+fn main() {}
diff --git a/tests/rustdoc-ui/issues/issue-79467.stderr b/tests/rustdoc-ui/issues/issue-79467.stderr
new file mode 100644
index 000000000..561513a43
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-79467.stderr
@@ -0,0 +1,9 @@
+error[E0224]: at least one trait is required for an object type
+ --> $DIR/issue-79467.rs:4:5
+ |
+LL | dyn 'static: 'static + Copy,
+ | ^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0224`.
diff --git a/tests/rustdoc-ui/issues/issue-79494.rs b/tests/rustdoc-ui/issues/issue-79494.rs
new file mode 100644
index 000000000..fc39424b7
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-79494.rs
@@ -0,0 +1,5 @@
+// only-x86_64-unknown-linux-gnu
+
+#![feature(const_transmute)]
+
+const ZST: &[u8] = unsafe { std::mem::transmute(1usize) }; //~ ERROR cannot transmute between types of different sizes, or dependently-sized types
diff --git a/tests/rustdoc-ui/issues/issue-79494.stderr b/tests/rustdoc-ui/issues/issue-79494.stderr
new file mode 100644
index 000000000..7ed5ed382
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-79494.stderr
@@ -0,0 +1,12 @@
+error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
+ --> $DIR/issue-79494.rs:5:29
+ |
+LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
+ | ^^^^^^^^^^^^^^^^^^^
+ |
+ = note: source type: `usize` (64 bits)
+ = note: target type: `&[u8]` (128 bits)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0512`.
diff --git a/tests/rustdoc-ui/issues/issue-80992.rs b/tests/rustdoc-ui/issues/issue-80992.rs
new file mode 100644
index 000000000..f5ae16981
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-80992.rs
@@ -0,0 +1,11 @@
+// check-pass
+// compile-flags:--test
+// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
+// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
+
+pub fn test() -> Result<(), ()> {
+ //! ```compile_fail
+ //! fn test() -> Result< {}
+ //! ```
+ Ok(())
+}
diff --git a/tests/rustdoc-ui/issues/issue-80992.stdout b/tests/rustdoc-ui/issues/issue-80992.stdout
new file mode 100644
index 000000000..d2b1cd1d5
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-80992.stdout
@@ -0,0 +1,6 @@
+
+running 1 test
+test $DIR/issue-80992.rs - test (line 7) - compile fail ... ok
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
+
diff --git a/tests/rustdoc-ui/issues/issue-81662-shortness.rs b/tests/rustdoc-ui/issues/issue-81662-shortness.rs
new file mode 100644
index 000000000..0240d217b
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-81662-shortness.rs
@@ -0,0 +1,12 @@
+// compile-flags:--test --error-format=short
+// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
+// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
+// failure-status: 101
+
+/// ```rust
+/// foo();
+/// ```
+//~^^ ERROR cannot find function `foo` in this scope
+fn foo() {
+ println!("Hello, world!");
+}
diff --git a/tests/rustdoc-ui/issues/issue-81662-shortness.stdout b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
new file mode 100644
index 000000000..748113be3
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
@@ -0,0 +1,16 @@
+
+running 1 test
+test $DIR/issue-81662-shortness.rs - foo (line 6) ... FAILED
+
+failures:
+
+---- $DIR/issue-81662-shortness.rs - foo (line 6) stdout ----
+$DIR/issue-81662-shortness.rs:7:1: error[E0425]: cannot find function `foo` in this scope
+error: aborting due to previous error
+Couldn't compile the test.
+
+failures:
+ $DIR/issue-81662-shortness.rs - foo (line 6)
+
+test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
+
diff --git a/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs b/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs
new file mode 100644
index 000000000..0474d6c14
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs
@@ -0,0 +1,10 @@
+// compile-flags: -W help
+// check-pass
+// check-stdout
+// error-pattern:Lint checks provided
+// error-pattern:rustdoc::broken-intra-doc-links
+//
+// ignore-tidy-linelength
+//
+// normalize-stdout-test: "( +name default meaning\n +---- ------- -------\n)?( *[[:word:]:-]+ (allow |warn |deny |forbid ) [^\n]+\n)+" -> " $$NAMES $$LEVELS $$MEANINGS"
+// normalize-stdout-test: " +name sub-lints\n +---- ---------\n( *[[:word:]:-]+ [^\n]+\n)+" -> " $$NAMES $$SUB_LINTS"
diff --git a/tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout b/tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout
new file mode 100644
index 000000000..bbf66a315
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout
@@ -0,0 +1,24 @@
+
+Available lint options:
+ -W <foo> Warn about <foo>
+ -A <foo> Allow <foo>
+ -D <foo> Deny <foo>
+ -F <foo> Forbid <foo> (deny <foo> and all attempts to override)
+
+
+Lint checks provided by rustc:
+
+ $NAMES $LEVELS $MEANINGS
+
+Lint groups provided by rustc:
+
+ $NAMES $SUB_LINTS
+
+Lint checks provided by plugins loaded by this crate:
+
+ $NAMES $LEVELS $MEANINGS
+
+Lint groups provided by plugins loaded by this crate:
+
+ $NAMES $SUB_LINTS
+
diff --git a/tests/rustdoc-ui/issues/issue-91134.rs b/tests/rustdoc-ui/issues/issue-91134.rs
new file mode 100644
index 000000000..85362f186
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-91134.rs
@@ -0,0 +1,14 @@
+// compile-flags: --test --crate-name=empty_fn --extern=empty_fn --test-args=--test-threads=1
+// aux-build:empty-fn.rs
+// check-pass
+// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
+// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
+// edition:2021
+
+/// <https://github.com/rust-lang/rust/issues/91134>
+///
+/// ```
+/// extern crate empty_fn;
+/// empty_fn::empty();
+/// ```
+pub struct Something;
diff --git a/tests/rustdoc-ui/issues/issue-91134.stdout b/tests/rustdoc-ui/issues/issue-91134.stdout
new file mode 100644
index 000000000..084062743
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-91134.stdout
@@ -0,0 +1,6 @@
+
+running 1 test
+test $DIR/issue-91134.rs - Something (line 10) ... ok
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
+
diff --git a/tests/rustdoc-ui/issues/issue-91713.rs b/tests/rustdoc-ui/issues/issue-91713.rs
new file mode 100644
index 000000000..610bbf11d
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-91713.rs
@@ -0,0 +1,3 @@
+// check-pass
+// compile-flags: --passes list
+// error-pattern: the `passes` flag no longer functions
diff --git a/tests/rustdoc-ui/issues/issue-91713.stderr b/tests/rustdoc-ui/issues/issue-91713.stderr
new file mode 100644
index 000000000..44ead7a1d
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-91713.stderr
@@ -0,0 +1,5 @@
+warning: the `passes` flag no longer functions
+ |
+ = note: see issue #44136 <https://github.com/rust-lang/rust/issues/44136> for more information
+ = help: you may want to use --document-private-items
+
diff --git a/tests/rustdoc-ui/issues/issue-91713.stdout b/tests/rustdoc-ui/issues/issue-91713.stdout
new file mode 100644
index 000000000..167835243
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-91713.stdout
@@ -0,0 +1,25 @@
+Available passes for running rustdoc:
+check_doc_test_visibility - run various visibility-related lints on doctests
+ strip-hidden - strips all `#[doc(hidden)]` items from the output
+ strip-private - strips all private items from a crate which cannot be seen externally, implies strip-priv-imports
+ strip-priv-imports - strips all private import statements (`use`, `extern crate`) from a crate
+ propagate-doc-cfg - propagates `#[doc(cfg(...))]` to child items
+collect-intra-doc-links - resolves intra-doc links
+ collect-trait-impls - retrieves trait impls for items in the crate
+calculate-doc-coverage - counts the number of items with and without documentation
+ run-lints - runs some of rustdoc's lints
+
+Default passes for rustdoc:
+ collect-trait-impls
+check_doc_test_visibility
+ strip-hidden (when not --document-hidden-items)
+ strip-private (when not --document-private-items)
+ strip-priv-imports (when --document-private-items)
+collect-intra-doc-links
+ propagate-doc-cfg
+ run-lints
+
+Passes run with `--show-coverage`:
+ strip-hidden (when not --document-hidden-items)
+ strip-private (when not --document-private-items)
+calculate-doc-coverage
diff --git a/tests/rustdoc-ui/issues/issue-96287.rs b/tests/rustdoc-ui/issues/issue-96287.rs
new file mode 100644
index 000000000..08cc7ef4c
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-96287.rs
@@ -0,0 +1,16 @@
+#![feature(type_alias_impl_trait)]
+
+pub trait TraitWithAssoc {
+ type Assoc;
+}
+
+pub type Foo<V> = impl Trait<V::Assoc>;
+//~^ ERROR
+
+pub trait Trait<U> {}
+
+impl<W> Trait<W> for () {}
+
+pub fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T> {
+ ()
+}
diff --git a/tests/rustdoc-ui/issues/issue-96287.stderr b/tests/rustdoc-ui/issues/issue-96287.stderr
new file mode 100644
index 000000000..7722eb960
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-96287.stderr
@@ -0,0 +1,9 @@
+error[E0220]: associated type `Assoc` not found for `V`
+ --> $DIR/issue-96287.rs:7:33
+ |
+LL | pub type Foo<V> = impl Trait<V::Assoc>;
+ | ^^^^^ there is a similarly named associated type `Assoc` in the trait `TraitWithAssoc`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/rustdoc-ui/issues/issue-98690.rs b/tests/rustdoc-ui/issues/issue-98690.rs
new file mode 100644
index 000000000..fe9bd87ab
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-98690.rs
@@ -0,0 +1,10 @@
+// compile-flags: --test --persist-doctests /../../ -Z unstable-options
+// failure-status: 101
+// only-linux
+
+#![crate_name = "foo"]
+
+//! ```rust
+//! use foo::dummy;
+//! dummy();
+//! ```
diff --git a/tests/rustdoc-ui/issues/issue-98690.stderr b/tests/rustdoc-ui/issues/issue-98690.stderr
new file mode 100644
index 000000000..47d94f99a
--- /dev/null
+++ b/tests/rustdoc-ui/issues/issue-98690.stderr
@@ -0,0 +1 @@
+Couldn't create directory for doctest executables: Permission denied (os error 13)