]> git.lizzy.rs Git - rust.git/commitdiff
Add regression test for #105737
authorGuillaume Gomez <guillaume.gomez@huawei.com>
Mon, 2 Jan 2023 13:29:22 +0000 (14:29 +0100)
committerGuillaume Gomez <guillaume.gomez@huawei.com>
Mon, 2 Jan 2023 13:29:22 +0000 (14:29 +0100)
src/test/rustdoc-ui/issue-105737.rs [new file with mode: 0644]
src/test/rustdoc-ui/issue-105737.stderr [new file with mode: 0644]

diff --git a/src/test/rustdoc-ui/issue-105737.rs b/src/test/rustdoc-ui/issue-105737.rs
new file mode 100644 (file)
index 0000000..154f069
--- /dev/null
@@ -0,0 +1,4 @@
+impl Vec<lol> {}
+//~^ ERROR
+
+pub fn lol() {}
diff --git a/src/test/rustdoc-ui/issue-105737.stderr b/src/test/rustdoc-ui/issue-105737.stderr
new file mode 100644 (file)
index 0000000..2dd9beb
--- /dev/null
@@ -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`.