From 915740c392e0147a5afa6f6fd0e2c303c066ac34 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 26 Feb 2022 16:58:21 +0100 Subject: [PATCH] Add test for #79465 to prevent regression --- src/test/rustdoc-ui/issue-79465.rs | 3 +++ src/test/rustdoc-ui/issue-79465.stderr | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/test/rustdoc-ui/issue-79465.rs create mode 100644 src/test/rustdoc-ui/issue-79465.stderr diff --git a/src/test/rustdoc-ui/issue-79465.rs b/src/test/rustdoc-ui/issue-79465.rs new file mode 100644 index 0000000000000..f1a77982fb523 --- /dev/null +++ b/src/test/rustdoc-ui/issue-79465.rs @@ -0,0 +1,3 @@ +pub fn f1(x: T::A) {} +//~^ ERROR +//~^^ ERROR diff --git a/src/test/rustdoc-ui/issue-79465.stderr b/src/test/rustdoc-ui/issue-79465.stderr new file mode 100644 index 0000000000000..489cc14420a4c --- /dev/null +++ b/src/test/rustdoc-ui/issue-79465.stderr @@ -0,0 +1,15 @@ +error[E0220]: associated type `A` not found for `T` + --> $DIR/issue-79465.rs:1:20 + | +LL | pub fn f1(x: T::A) {} + | ^ associated type `A` not found + +error[E0220]: associated type `A` not found for `T` + --> $DIR/issue-79465.rs:1:20 + | +LL | pub fn f1(x: T::A) {} + | ^ associated type `A` not found + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0220`.