summaryrefslogtreecommitdiffstats
path: root/src/test/ui/polymorphization/unsized_cast.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/polymorphization/unsized_cast.stderr')
-rw-r--r--src/test/ui/polymorphization/unsized_cast.stderr38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/test/ui/polymorphization/unsized_cast.stderr b/src/test/ui/polymorphization/unsized_cast.stderr
new file mode 100644
index 000000000..27f88d281
--- /dev/null
+++ b/src/test/ui/polymorphization/unsized_cast.stderr
@@ -0,0 +1,38 @@
+error: item has unused generic parameters
+ --> $DIR/unsized_cast.rs:11:18
+ |
+LL | fn foo<T: Default>() {
+ | - generic parameter `T` is unused
+LL | let _: T = Default::default();
+LL | (|| Box::new(|| {}) as Box<dyn Fn()>)();
+ | ^^
+
+error: item has unused generic parameters
+ --> $DIR/unsized_cast.rs:11:6
+ |
+LL | fn foo<T: Default>() {
+ | - generic parameter `T` is unused
+LL | let _: T = Default::default();
+LL | (|| Box::new(|| {}) as Box<dyn Fn()>)();
+ | ^^
+
+error: item has unused generic parameters
+ --> $DIR/unsized_cast.rs:22:15
+ |
+LL | fn foo2<T: Default>() {
+ | - generic parameter `T` is unused
+...
+LL | call(&|| {}, ());
+ | ^^
+
+error: item has unused generic parameters
+ --> $DIR/unsized_cast.rs:19:6
+ |
+LL | fn foo2<T: Default>() {
+ | - generic parameter `T` is unused
+LL | let _: T = Default::default();
+LL | (|| {
+ | ^^
+
+error: aborting due to 4 previous errors
+