about summary refs log tree commit diff
path: root/tests/ui/sized-hierarchy/default-supertrait.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/sized-hierarchy/default-supertrait.stderr')
-rw-r--r--tests/ui/sized-hierarchy/default-supertrait.stderr125
1 files changed, 125 insertions, 0 deletions
diff --git a/tests/ui/sized-hierarchy/default-supertrait.stderr b/tests/ui/sized-hierarchy/default-supertrait.stderr
new file mode 100644
index 00000000000..de23936b900
--- /dev/null
+++ b/tests/ui/sized-hierarchy/default-supertrait.stderr
@@ -0,0 +1,125 @@
+error[E0658]: `?Trait` is not permitted in supertraits
+  --> $DIR/default-supertrait.rs:8:17
+   |
+LL | trait NegSized: ?Sized { }
+   |                 ^^^^^^
+   |
+   = note: traits are `?Sized` by default
+   = help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error[E0658]: `?Trait` is not permitted in supertraits
+  --> $DIR/default-supertrait.rs:13:21
+   |
+LL | trait NegMetaSized: ?MetaSized { }
+   |                     ^^^^^^^^^^
+   |
+   = note: traits are `?MetaSized` by default
+   = help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error[E0658]: `?Trait` is not permitted in supertraits
+  --> $DIR/default-supertrait.rs:19:24
+   |
+LL | trait NegPointeeSized: ?PointeeSized { }
+   |                        ^^^^^^^^^^^^^
+   |
+   = note: traits are `?PointeeSized` by default
+   = help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error[E0277]: the size for values of type `T` cannot be known
+  --> $DIR/default-supertrait.rs:52:38
+   |
+LL | fn with_bare_trait<T: PointeeSized + Bare>() {
+   |                                      ^^^^ doesn't have a known size
+   |
+note: required by a bound in `Bare`
+  --> $DIR/default-supertrait.rs:22:1
+   |
+LL | trait Bare {}
+   | ^^^^^^^^^^^^^ required by this bound in `Bare`
+help: consider further restricting type parameter `T` with unstable trait `MetaSized`
+   |
+LL | fn with_bare_trait<T: PointeeSized + Bare + std::marker::MetaSized>() {
+   |                                           ++++++++++++++++++++++++
+
+error[E0277]: the size for values of type `T` cannot be known at compilation time
+  --> $DIR/default-supertrait.rs:35:22
+   |
+LL | fn with_metasized_supertrait<T: PointeeSized + MetaSized_>() {
+   |                              - this type parameter needs to be `Sized`
+LL |     requires_sized::<T>();
+   |                      ^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `requires_sized`
+  --> $DIR/default-supertrait.rs:24:22
+   |
+LL | fn requires_sized<T: Sized>() {}
+   |                      ^^^^^ required by this bound in `requires_sized`
+
+error[E0277]: the size for values of type `T` cannot be known at compilation time
+  --> $DIR/default-supertrait.rs:43:22
+   |
+LL | fn with_pointeesized_supertrait<T: PointeeSized + PointeeSized_>() {
+   |                                 - this type parameter needs to be `Sized`
+LL |     requires_sized::<T>();
+   |                      ^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `requires_sized`
+  --> $DIR/default-supertrait.rs:24:22
+   |
+LL | fn requires_sized<T: Sized>() {}
+   |                      ^^^^^ required by this bound in `requires_sized`
+
+error[E0277]: the size for values of type `T` cannot be known
+  --> $DIR/default-supertrait.rs:45:26
+   |
+LL |     requires_metasized::<T>();
+   |                          ^ doesn't have a known size
+   |
+note: required by a bound in `requires_metasized`
+  --> $DIR/default-supertrait.rs:25:26
+   |
+LL | fn requires_metasized<T: MetaSized>() {}
+   |                          ^^^^^^^^^ required by this bound in `requires_metasized`
+help: consider further restricting type parameter `T` with unstable trait `MetaSized`
+   |
+LL | fn with_pointeesized_supertrait<T: PointeeSized + PointeeSized_ + std::marker::MetaSized>() {
+   |                                                                 ++++++++++++++++++++++++
+
+error[E0277]: the size for values of type `T` cannot be known at compilation time
+  --> $DIR/default-supertrait.rs:54:22
+   |
+LL | fn with_bare_trait<T: PointeeSized + Bare>() {
+   |                    - this type parameter needs to be `Sized`
+LL |
+LL |     requires_sized::<T>();
+   |                      ^ doesn't have a size known at compile-time
+   |
+note: required by a bound in `requires_sized`
+  --> $DIR/default-supertrait.rs:24:22
+   |
+LL | fn requires_sized<T: Sized>() {}
+   |                      ^^^^^ required by this bound in `requires_sized`
+
+error[E0277]: the size for values of type `T` cannot be known
+  --> $DIR/default-supertrait.rs:56:26
+   |
+LL |     requires_metasized::<T>();
+   |                          ^ doesn't have a known size
+   |
+note: required by a bound in `requires_metasized`
+  --> $DIR/default-supertrait.rs:25:26
+   |
+LL | fn requires_metasized<T: MetaSized>() {}
+   |                          ^^^^^^^^^ required by this bound in `requires_metasized`
+help: consider further restricting type parameter `T` with unstable trait `MetaSized`
+   |
+LL | fn with_bare_trait<T: PointeeSized + Bare + std::marker::MetaSized>() {
+   |                                           ++++++++++++++++++++++++
+
+error: aborting due to 9 previous errors
+
+Some errors have detailed explanations: E0277, E0658.
+For more information about an error, try `rustc --explain E0277`.