From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/rustdoc-ui/doc-attr.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/rustdoc-ui/doc-attr.rs (limited to 'tests/rustdoc-ui/doc-attr.rs') diff --git a/tests/rustdoc-ui/doc-attr.rs b/tests/rustdoc-ui/doc-attr.rs new file mode 100644 index 000000000..980d1c0e2 --- /dev/null +++ b/tests/rustdoc-ui/doc-attr.rs @@ -0,0 +1,25 @@ +#![crate_type = "lib"] +#![deny(warnings)] +#![doc(as_ptr)] +//~^ ERROR unknown `doc` attribute +//~^^ WARN + +#[doc(as_ptr)] +//~^ ERROR unknown `doc` attribute +//~^^ WARN +pub fn foo() {} + +#[doc(123)] +//~^ ERROR invalid `doc` attribute +//~| WARN +#[doc("hello", "bar")] +//~^ ERROR invalid `doc` attribute +//~| WARN +//~| ERROR invalid `doc` attribute +//~| WARN +#[doc(foo::bar, crate::bar::baz = "bye")] +//~^ ERROR unknown `doc` attribute +//~| WARN +//~| ERROR unknown `doc` attribute +//~| WARN +fn bar() {} -- cgit v1.2.3