mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
Rollup merge of #114638 - compiler-errors:rpitit-test-revisions, r=spastorino
Remove old RPITIT tests (revisions were removed) These tests were not cleaned up after #112988. r? `@spastorino`
This commit is contained in:
commit
e1cae5fd69
@ -1,17 +0,0 @@
|
||||
error[E0053]: method `foo` has an incompatible type for trait
|
||||
--> $DIR/async-example-desugared-boxed-in-trait.rs:17:28
|
||||
|
|
||||
LL | async fn foo(&self) -> i32 {
|
||||
| ^^^ expected `Pin<Box<dyn Future<Output = i32>>>`, found future
|
||||
|
|
||||
note: type in trait
|
||||
--> $DIR/async-example-desugared-boxed-in-trait.rs:13:22
|
||||
|
|
||||
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: expected signature `fn(&i32) -> Pin<Box<dyn Future<Output = i32>>>`
|
||||
found signature `fn(&i32) -> impl Future<Output = i32>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0053`.
|
@ -1,17 +0,0 @@
|
||||
error[E0053]: method `foo` has an incompatible type for trait
|
||||
--> $DIR/async-example-desugared-boxed-in-trait.rs:17:28
|
||||
|
|
||||
LL | async fn foo(&self) -> i32 {
|
||||
| ^^^ expected `Pin<Box<dyn Future<Output = i32>>>`, found future
|
||||
|
|
||||
note: type in trait
|
||||
--> $DIR/async-example-desugared-boxed-in-trait.rs:13:22
|
||||
|
|
||||
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: expected signature `fn(&i32) -> Pin<Box<dyn Future<Output = i32>>>`
|
||||
found signature `fn(&i32) -> impl Future<Output = i32>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0053`.
|
@ -1,11 +0,0 @@
|
||||
error: method `foo` should be async because the method from the trait is async
|
||||
--> $DIR/async-example-desugared-boxed.rs:17:5
|
||||
|
|
||||
LL | async fn foo(&self) -> i32;
|
||||
| --------------------------- required because the trait method is async
|
||||
...
|
||||
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -1,11 +0,0 @@
|
||||
error: method `foo` should be async because the method from the trait is async
|
||||
--> $DIR/async-example-desugared-boxed.rs:17:5
|
||||
|
|
||||
LL | async fn foo(&self) -> i32;
|
||||
| --------------------------- required because the trait method is async
|
||||
...
|
||||
LL | fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -1,11 +0,0 @@
|
||||
error: method `foo` should be async because the method from the trait is async
|
||||
--> $DIR/async-example-desugared-manual.rs:25:5
|
||||
|
|
||||
LL | async fn foo(&self) -> i32;
|
||||
| --------------------------- required because the trait method is async
|
||||
...
|
||||
LL | fn foo(&self) -> MyFuture {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -1,11 +0,0 @@
|
||||
error: method `foo` should be async because the method from the trait is async
|
||||
--> $DIR/async-example-desugared-manual.rs:25:5
|
||||
|
|
||||
LL | async fn foo(&self) -> i32;
|
||||
| --------------------------- required because the trait method is async
|
||||
...
|
||||
LL | fn foo(&self) -> MyFuture {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -1,37 +0,0 @@
|
||||
error[E0311]: the parameter type `U` may not live long enough
|
||||
--> $DIR/async-generics-and-bounds.rs:14:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^^^
|
||||
|
|
||||
note: the parameter type `U` must be valid for the anonymous lifetime defined here...
|
||||
--> $DIR/async-generics-and-bounds.rs:14:18
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^
|
||||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
--> $DIR/async-generics-and-bounds.rs:14:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0311]: the parameter type `T` may not live long enough
|
||||
--> $DIR/async-generics-and-bounds.rs:14:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^^^
|
||||
|
|
||||
note: the parameter type `T` must be valid for the anonymous lifetime defined here...
|
||||
--> $DIR/async-generics-and-bounds.rs:14:18
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^
|
||||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
--> $DIR/async-generics-and-bounds.rs:14:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0311`.
|
@ -1,37 +0,0 @@
|
||||
error[E0311]: the parameter type `U` may not live long enough
|
||||
--> $DIR/async-generics-and-bounds.rs:14:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^^^
|
||||
|
|
||||
note: the parameter type `U` must be valid for the anonymous lifetime defined here...
|
||||
--> $DIR/async-generics-and-bounds.rs:14:18
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^
|
||||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
--> $DIR/async-generics-and-bounds.rs:14:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0311]: the parameter type `T` may not live long enough
|
||||
--> $DIR/async-generics-and-bounds.rs:14:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^^^
|
||||
|
|
||||
note: the parameter type `T` must be valid for the anonymous lifetime defined here...
|
||||
--> $DIR/async-generics-and-bounds.rs:14:18
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^
|
||||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
--> $DIR/async-generics-and-bounds.rs:14:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
|
||||
| ^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0311`.
|
@ -1,37 +0,0 @@
|
||||
error[E0311]: the parameter type `U` may not live long enough
|
||||
--> $DIR/async-generics.rs:11:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^^^
|
||||
|
|
||||
note: the parameter type `U` must be valid for the anonymous lifetime defined here...
|
||||
--> $DIR/async-generics.rs:11:18
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^
|
||||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
--> $DIR/async-generics.rs:11:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0311]: the parameter type `T` may not live long enough
|
||||
--> $DIR/async-generics.rs:11:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^^^
|
||||
|
|
||||
note: the parameter type `T` must be valid for the anonymous lifetime defined here...
|
||||
--> $DIR/async-generics.rs:11:18
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^
|
||||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
--> $DIR/async-generics.rs:11:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0311`.
|
@ -1,37 +0,0 @@
|
||||
error[E0311]: the parameter type `U` may not live long enough
|
||||
--> $DIR/async-generics.rs:11:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^^^
|
||||
|
|
||||
note: the parameter type `U` must be valid for the anonymous lifetime defined here...
|
||||
--> $DIR/async-generics.rs:11:18
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^
|
||||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
--> $DIR/async-generics.rs:11:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0311]: the parameter type `T` may not live long enough
|
||||
--> $DIR/async-generics.rs:11:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^^^
|
||||
|
|
||||
note: the parameter type `T` must be valid for the anonymous lifetime defined here...
|
||||
--> $DIR/async-generics.rs:11:18
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^
|
||||
note: ...so that the reference type `&(T, U)` does not outlive the data it points at
|
||||
--> $DIR/async-generics.rs:11:28
|
||||
|
|
||||
LL | async fn foo(&self) -> &(T, U);
|
||||
| ^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0311`.
|
@ -1,12 +0,0 @@
|
||||
error[E0733]: recursion in an `async fn` requires boxing
|
||||
--> $DIR/async-recursive-generic.rs:13:48
|
||||
|
|
||||
LL | async fn foo_recursive(&self, n: usize) -> T {
|
||||
| ^ recursive `async fn`
|
||||
|
|
||||
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
|
||||
= note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0733`.
|
@ -1,12 +0,0 @@
|
||||
error[E0733]: recursion in an `async fn` requires boxing
|
||||
--> $DIR/async-recursive-generic.rs:13:48
|
||||
|
|
||||
LL | async fn foo_recursive(&self, n: usize) -> T {
|
||||
| ^ recursive `async fn`
|
||||
|
|
||||
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
|
||||
= note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0733`.
|
@ -1,12 +0,0 @@
|
||||
error[E0733]: recursion in an `async fn` requires boxing
|
||||
--> $DIR/async-recursive.rs:13:48
|
||||
|
|
||||
LL | async fn foo_recursive(&self, n: usize) -> i32 {
|
||||
| ^^^ recursive `async fn`
|
||||
|
|
||||
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
|
||||
= note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0733`.
|
@ -1,12 +0,0 @@
|
||||
error[E0733]: recursion in an `async fn` requires boxing
|
||||
--> $DIR/async-recursive.rs:13:48
|
||||
|
|
||||
LL | async fn foo_recursive(&self, n: usize) -> i32 {
|
||||
| ^^^ recursive `async fn`
|
||||
|
|
||||
= note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
|
||||
= note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0733`.
|
@ -1,17 +0,0 @@
|
||||
error: expected identifier, found keyword `self`
|
||||
--> $DIR/bad-signatures.rs:8:23
|
||||
|
|
||||
LL | async fn bar(&abc self);
|
||||
| ^^^^ expected identifier, found keyword
|
||||
|
||||
error: expected one of `:`, `@`, or `|`, found keyword `self`
|
||||
--> $DIR/bad-signatures.rs:8:23
|
||||
|
|
||||
LL | async fn bar(&abc self);
|
||||
| -----^^^^
|
||||
| | |
|
||||
| | expected one of `:`, `@`, or `|`
|
||||
| help: declare the type after the parameter binding: `<identifier>: <type>`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
@ -1,17 +0,0 @@
|
||||
error: expected identifier, found keyword `self`
|
||||
--> $DIR/bad-signatures.rs:8:23
|
||||
|
|
||||
LL | async fn bar(&abc self);
|
||||
| ^^^^ expected identifier, found keyword
|
||||
|
||||
error: expected one of `:`, `@`, or `|`, found keyword `self`
|
||||
--> $DIR/bad-signatures.rs:8:23
|
||||
|
|
||||
LL | async fn bar(&abc self);
|
||||
| -----^^^^
|
||||
| | |
|
||||
| | expected one of `:`, `@`, or `|`
|
||||
| help: declare the type after the parameter binding: `<identifier>: <type>`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
@ -1,10 +0,0 @@
|
||||
error: async associated function in trait cannot be specialized
|
||||
--> $DIR/dont-project-to-specializable-projection.rs:16:5
|
||||
|
|
||||
LL | default async fn foo(_: T) -> &'static str {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -1,25 +0,0 @@
|
||||
error[E0053]: method `foo` has an incompatible type for trait
|
||||
--> $DIR/dont-project-to-specializable-projection.rs:16:35
|
||||
|
|
||||
LL | default async fn foo(_: T) -> &'static str {
|
||||
| ^^^^^^^^^^^^ expected associated type, found future
|
||||
|
|
||||
note: type in trait
|
||||
--> $DIR/dont-project-to-specializable-projection.rs:12:27
|
||||
|
|
||||
LL | async fn foo(_: T) -> &'static str;
|
||||
| ^^^^^^^^^^^^
|
||||
= note: expected signature `fn(_) -> impl Future<Output = &'static str>`
|
||||
found signature `fn(_) -> impl Future<Output = &'static str>`
|
||||
|
||||
error: async associated function in trait cannot be specialized
|
||||
--> $DIR/dont-project-to-specializable-projection.rs:16:5
|
||||
|
|
||||
LL | default async fn foo(_: T) -> &'static str {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0053`.
|
@ -1,12 +0,0 @@
|
||||
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `impl` method return types
|
||||
--> $DIR/fn-not-async-err2.rs:15:22
|
||||
|
|
||||
LL | fn foo(&self) -> impl Future<Output = i32> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
|
||||
= help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0562`.
|
@ -1,12 +0,0 @@
|
||||
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `impl` method return types
|
||||
--> $DIR/fn-not-async-err2.rs:15:22
|
||||
|
|
||||
LL | fn foo(&self) -> impl Future<Output = i32> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
|
||||
= help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0562`.
|
@ -1,16 +0,0 @@
|
||||
error[E0053]: method `foo` has an incompatible generic parameter for trait `Foo`
|
||||
--> $DIR/generics-mismatch.rs:13:18
|
||||
|
|
||||
LL | trait Foo {
|
||||
| ---
|
||||
LL | async fn foo<T>();
|
||||
| - expected type parameter
|
||||
...
|
||||
LL | impl Foo for () {
|
||||
| ---------------
|
||||
LL | async fn foo<const N: usize>() {}
|
||||
| ^^^^^^^^^^^^^^ found const parameter of type `usize`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0053`.
|
@ -1,16 +0,0 @@
|
||||
error[E0053]: method `foo` has an incompatible generic parameter for trait `Foo`
|
||||
--> $DIR/generics-mismatch.rs:13:18
|
||||
|
|
||||
LL | trait Foo {
|
||||
| ---
|
||||
LL | async fn foo<T>();
|
||||
| - expected type parameter
|
||||
...
|
||||
LL | impl Foo for () {
|
||||
| ---------------
|
||||
LL | async fn foo<const N: usize>() {}
|
||||
| ^^^^^^^^^^^^^^ found const parameter of type `usize`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0053`.
|
@ -1,12 +0,0 @@
|
||||
error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration
|
||||
--> $DIR/lifetime-mismatch.rs:13:17
|
||||
|
|
||||
LL | async fn foo<'a>(&self);
|
||||
| ---- lifetimes in impl do not match this method in trait
|
||||
...
|
||||
LL | async fn foo(&self) {}
|
||||
| ^ lifetimes do not match method in trait
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0195`.
|
@ -1,12 +0,0 @@
|
||||
error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration
|
||||
--> $DIR/lifetime-mismatch.rs:13:17
|
||||
|
|
||||
LL | async fn foo<'a>(&self);
|
||||
| ---- lifetimes in impl do not match this method in trait
|
||||
...
|
||||
LL | async fn foo(&self) {}
|
||||
| ^ lifetimes do not match method in trait
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0195`.
|
@ -1,30 +0,0 @@
|
||||
error[E0046]: not all trait items implemented, missing: `foo`
|
||||
--> $DIR/missing-feature-flag.rs:14:1
|
||||
|
|
||||
LL | async fn foo(_: T) -> &'static str;
|
||||
| ----------------------------------- `foo` from trait
|
||||
...
|
||||
LL | impl<T> MyTrait<T> for MyStruct {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
|
||||
|
||||
error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
|
||||
--> $DIR/missing-feature-flag.rs:18:5
|
||||
|
|
||||
LL | impl<T> MyTrait<T> for MyStruct {}
|
||||
| ------------------------------- parent `impl` is here
|
||||
...
|
||||
LL | async fn foo(_: i32) -> &'static str {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
|
||||
|
|
||||
= note: to specialize, `foo` in the parent `impl` must be marked `default`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/missing-feature-flag.rs:18:42
|
||||
|
|
||||
LL | async fn foo(_: i32) -> &'static str {}
|
||||
| ^^ expected `&str`, found `()`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0046, E0308, E0520.
|
||||
For more information about an error, try `rustc --explain E0046`.
|
@ -1,30 +0,0 @@
|
||||
error[E0046]: not all trait items implemented, missing: `foo`
|
||||
--> $DIR/missing-feature-flag.rs:14:1
|
||||
|
|
||||
LL | async fn foo(_: T) -> &'static str;
|
||||
| ----------------------------------- `foo` from trait
|
||||
...
|
||||
LL | impl<T> MyTrait<T> for MyStruct {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
|
||||
|
||||
error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
|
||||
--> $DIR/missing-feature-flag.rs:18:5
|
||||
|
|
||||
LL | impl<T> MyTrait<T> for MyStruct {}
|
||||
| ------------------------------- parent `impl` is here
|
||||
...
|
||||
LL | async fn foo(_: i32) -> &'static str {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
|
||||
|
|
||||
= note: to specialize, `foo` in the parent `impl` must be marked `default`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/missing-feature-flag.rs:18:42
|
||||
|
|
||||
LL | async fn foo(_: i32) -> &'static str {}
|
||||
| ^^ expected `&str`, found `()`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0046, E0308, E0520.
|
||||
For more information about an error, try `rustc --explain E0046`.
|
@ -1,20 +0,0 @@
|
||||
error: future cannot be sent between threads safely
|
||||
--> $DIR/missing-send-bound.rs:16:20
|
||||
|
|
||||
LL | assert_is_send(test::<T>());
|
||||
| ^^^^^^^^^^^ future returned by `test` is not `Send`
|
||||
|
|
||||
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
|
||||
note: future is not `Send` as it awaits another future which is not `Send`
|
||||
--> $DIR/missing-send-bound.rs:12:5
|
||||
|
|
||||
LL | T::bar().await;
|
||||
| ^^^^^^^^ await occurs here on type `impl Future<Output = ()>`, which is not `Send`
|
||||
note: required by a bound in `assert_is_send`
|
||||
--> $DIR/missing-send-bound.rs:20:27
|
||||
|
|
||||
LL | fn assert_is_send(_: impl Send) {}
|
||||
| ^^^^ required by this bound in `assert_is_send`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -1,20 +0,0 @@
|
||||
error: future cannot be sent between threads safely
|
||||
--> $DIR/missing-send-bound.rs:16:20
|
||||
|
|
||||
LL | assert_is_send(test::<T>());
|
||||
| ^^^^^^^^^^^ future returned by `test` is not `Send`
|
||||
|
|
||||
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
|
||||
note: future is not `Send` as it awaits another future which is not `Send`
|
||||
--> $DIR/missing-send-bound.rs:12:5
|
||||
|
|
||||
LL | T::bar().await;
|
||||
| ^^^^^^^^ await occurs here on type `impl Future<Output = ()>`, which is not `Send`
|
||||
note: required by a bound in `assert_is_send`
|
||||
--> $DIR/missing-send-bound.rs:20:27
|
||||
|
|
||||
LL | fn assert_is_send(_: impl Send) {}
|
||||
| ^^^^ required by this bound in `assert_is_send`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -1,18 +0,0 @@
|
||||
error[E0038]: the trait `Foo` cannot be made into an object
|
||||
--> $DIR/object-safety.rs:12:12
|
||||
|
|
||||
LL | let x: &dyn Foo = todo!();
|
||||
| ^^^^^^^^ `Foo` cannot be made into an object
|
||||
|
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/object-safety.rs:8:14
|
||||
|
|
||||
LL | trait Foo {
|
||||
| --- this trait cannot be made into an object...
|
||||
LL | async fn foo(&self);
|
||||
| ^^^ ...because method `foo` is `async`
|
||||
= help: consider moving `foo` to another trait
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0038`.
|
@ -1,18 +0,0 @@
|
||||
error[E0038]: the trait `Foo` cannot be made into an object
|
||||
--> $DIR/object-safety.rs:12:12
|
||||
|
|
||||
LL | let x: &dyn Foo = todo!();
|
||||
| ^^^^^^^^ `Foo` cannot be made into an object
|
||||
|
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/object-safety.rs:8:14
|
||||
|
|
||||
LL | trait Foo {
|
||||
| --- this trait cannot be made into an object...
|
||||
LL | async fn foo(&self);
|
||||
| ^^^ ...because method `foo` is `async`
|
||||
= help: consider moving `foo` to another trait
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0038`.
|
@ -1,39 +0,0 @@
|
||||
error[E0726]: implicit elided lifetime not allowed here
|
||||
--> $DIR/return-not-existing-pair.rs:12:20
|
||||
|
|
||||
LL | impl<'a, 'b, T, U> MyTrait<T> for U {
|
||||
| ^^^^^^^^^^ expected lifetime parameters
|
||||
|
|
||||
help: indicate the anonymous lifetimes
|
||||
|
|
||||
LL | impl<'a, 'b, T, U> MyTrait<'_, '_, T> for U {
|
||||
| +++++++
|
||||
|
||||
error[E0412]: cannot find type `ConnImpl` in this scope
|
||||
--> $DIR/return-not-existing-pair.rs:8:48
|
||||
|
|
||||
LL | async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T);
|
||||
| ^^^^^^^^ not found in this scope
|
||||
|
||||
error[E0186]: method `foo` has a `&self` declaration in the trait, but not in the impl
|
||||
--> $DIR/return-not-existing-pair.rs:14:5
|
||||
|
|
||||
LL | async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T);
|
||||
| ------------------------------------------------------------ `&self` used in trait
|
||||
...
|
||||
LL | async fn foo(_: T) -> (&'a U, &'b T) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&self` in impl
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/return-not-existing-pair.rs:14:42
|
||||
|
|
||||
LL | async fn foo(_: T) -> (&'a U, &'b T) {}
|
||||
| ^^ expected `(&U, &T)`, found `()`
|
||||
|
|
||||
= note: expected tuple `(&'a U, &'b T)`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0186, E0308, E0412, E0726.
|
||||
For more information about an error, try `rustc --explain E0186`.
|
@ -1,39 +0,0 @@
|
||||
error[E0726]: implicit elided lifetime not allowed here
|
||||
--> $DIR/return-not-existing-pair.rs:12:20
|
||||
|
|
||||
LL | impl<'a, 'b, T, U> MyTrait<T> for U {
|
||||
| ^^^^^^^^^^ expected lifetime parameters
|
||||
|
|
||||
help: indicate the anonymous lifetimes
|
||||
|
|
||||
LL | impl<'a, 'b, T, U> MyTrait<'_, '_, T> for U {
|
||||
| +++++++
|
||||
|
||||
error[E0412]: cannot find type `ConnImpl` in this scope
|
||||
--> $DIR/return-not-existing-pair.rs:8:48
|
||||
|
|
||||
LL | async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T);
|
||||
| ^^^^^^^^ not found in this scope
|
||||
|
||||
error[E0186]: method `foo` has a `&self` declaration in the trait, but not in the impl
|
||||
--> $DIR/return-not-existing-pair.rs:14:5
|
||||
|
|
||||
LL | async fn foo(&'a self, key: &'b T) -> (&'a ConnImpl, &'b T);
|
||||
| ------------------------------------------------------------ `&self` used in trait
|
||||
...
|
||||
LL | async fn foo(_: T) -> (&'a U, &'b T) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&self` in impl
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/return-not-existing-pair.rs:14:42
|
||||
|
|
||||
LL | async fn foo(_: T) -> (&'a U, &'b T) {}
|
||||
| ^^ expected `(&U, &T)`, found `()`
|
||||
|
|
||||
= note: expected tuple `(&'a U, &'b T)`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0186, E0308, E0412, E0726.
|
||||
For more information about an error, try `rustc --explain E0186`.
|
@ -1,9 +0,0 @@
|
||||
error[E0412]: cannot find type `Missing` in this scope
|
||||
--> $DIR/return-not-existing-type-wrapping-rpitit.rs:10:25
|
||||
|
|
||||
LL | fn bar() -> Wrapper<Missing<impl Sized>>;
|
||||
| ^^^^^^^ not found in this scope
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0412`.
|
@ -1,9 +0,0 @@
|
||||
error[E0412]: cannot find type `Missing` in this scope
|
||||
--> $DIR/return-not-existing-type-wrapping-rpitit.rs:10:25
|
||||
|
|
||||
LL | fn bar() -> Wrapper<Missing<impl Sized>>;
|
||||
| ^^^^^^^ not found in this scope
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0412`.
|
@ -1,14 +0,0 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/return-type-suggestion.rs:9:9
|
||||
|
|
||||
LL | Ok(())
|
||||
| ^^^^^^- help: consider using a semicolon here: `;`
|
||||
| |
|
||||
| expected `()`, found `Result<(), _>`
|
||||
|
|
||||
= note: expected unit type `()`
|
||||
found enum `Result<(), _>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
@ -1,14 +0,0 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/return-type-suggestion.rs:9:9
|
||||
|
|
||||
LL | Ok(())
|
||||
| ^^^^^^- help: consider using a semicolon here: `;`
|
||||
| |
|
||||
| expected `()`, found `Result<(), _>`
|
||||
|
|
||||
= note: expected unit type `()`
|
||||
found enum `Result<(), _>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
@ -1,15 +0,0 @@
|
||||
error[E0053]: method `bar` has an incompatible return type for trait
|
||||
--> $DIR/deep-match.rs:14:17
|
||||
|
|
||||
LL | fn bar() -> i32 {
|
||||
| ^^^
|
||||
| |
|
||||
| expected `Wrapper<_>`, found `i32`
|
||||
| return type in trait
|
||||
|
|
||||
= note: expected struct `Wrapper<_>`
|
||||
found type `i32`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0053`.
|
@ -1,15 +0,0 @@
|
||||
error[E0053]: method `bar` has an incompatible return type for trait
|
||||
--> $DIR/deep-match.rs:14:17
|
||||
|
|
||||
LL | fn bar() -> i32 {
|
||||
| ^^^
|
||||
| |
|
||||
| expected `Wrapper<_>`, found `i32`
|
||||
| return type in trait
|
||||
|
|
||||
= note: expected struct `Wrapper<_>`
|
||||
found type `i32`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0053`.
|
@ -1,11 +0,0 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/default-body-type-err-2.rs:10:9
|
||||
|
|
||||
LL | 42
|
||||
| ^^- help: try using a conversion method: `.to_string()`
|
||||
| |
|
||||
| expected `String`, found integer
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
@ -1,11 +0,0 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/default-body-type-err-2.rs:10:9
|
||||
|
|
||||
LL | 42
|
||||
| ^^- help: try using a conversion method: `.to_string()`
|
||||
| |
|
||||
| expected `String`, found integer
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
@ -1,12 +0,0 @@
|
||||
error[E0271]: type mismatch resolving `<&i32 as Deref>::Target == String`
|
||||
--> $DIR/default-body-type-err.rs:10:22
|
||||
|
|
||||
LL | fn lol(&self) -> impl Deref<Target = String> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `String`
|
||||
LL |
|
||||
LL | &1i32
|
||||
| ----- return type was inferred to be `&i32` here
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0271`.
|
@ -1,12 +0,0 @@
|
||||
error[E0271]: type mismatch resolving `<&i32 as Deref>::Target == String`
|
||||
--> $DIR/default-body-type-err.rs:10:22
|
||||
|
|
||||
LL | fn lol(&self) -> impl Deref<Target = String> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `String`
|
||||
LL |
|
||||
LL | &1i32
|
||||
| ----- return type was inferred to be `&i32` here
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0271`.
|
@ -1,24 +0,0 @@
|
||||
error: concrete type differs from previous defining opaque type use
|
||||
--> $DIR/default-body-with-rpit.rs:13:9
|
||||
|
|
||||
LL | ""
|
||||
| ^^ expected `impl Debug`, got `&'static str`
|
||||
|
|
||||
note: previous use here
|
||||
--> $DIR/default-body-with-rpit.rs:12:39
|
||||
|
|
||||
LL | async fn baz(&self) -> impl Debug {
|
||||
| _______________________________________^
|
||||
LL | | ""
|
||||
LL | | }
|
||||
| |_____^
|
||||
|
||||
error[E0720]: cannot resolve opaque type
|
||||
--> $DIR/default-body-with-rpit.rs:12:28
|
||||
|
|
||||
LL | async fn baz(&self) -> impl Debug {
|
||||
| ^^^^^^^^^^ cannot resolve opaque type
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0720`.
|
@ -1,24 +0,0 @@
|
||||
error: concrete type differs from previous defining opaque type use
|
||||
--> $DIR/default-body-with-rpit.rs:13:9
|
||||
|
|
||||
LL | ""
|
||||
| ^^ expected `impl Debug`, got `&'static str`
|
||||
|
|
||||
note: previous use here
|
||||
--> $DIR/default-body-with-rpit.rs:12:39
|
||||
|
|
||||
LL | async fn baz(&self) -> impl Debug {
|
||||
| _______________________________________^
|
||||
LL | | ""
|
||||
LL | | }
|
||||
| |_____^
|
||||
|
||||
error[E0720]: cannot resolve opaque type
|
||||
--> $DIR/default-body-with-rpit.rs:12:28
|
||||
|
|
||||
LL | async fn baz(&self) -> impl Debug {
|
||||
| ^^^^^^^^^^ cannot resolve opaque type
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0720`.
|
@ -1,17 +0,0 @@
|
||||
error[E0277]: `()` doesn't implement `std::fmt::Display`
|
||||
--> $DIR/doesnt-satisfy.rs:12:17
|
||||
|
|
||||
LL | fn bar() -> () {}
|
||||
| ^^ `()` cannot be formatted with the default formatter
|
||||
|
|
||||
= help: the trait `std::fmt::Display` is not implemented for `()`
|
||||
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
||||
note: required by a bound in `Foo::bar::{opaque#0}`
|
||||
--> $DIR/doesnt-satisfy.rs:8:22
|
||||
|
|
||||
LL | fn bar() -> impl std::fmt::Display;
|
||||
| ^^^^^^^^^^^^^^^^^ required by this bound in `Foo::bar::{opaque#0}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
@ -1,17 +0,0 @@
|
||||
error[E0277]: `()` doesn't implement `std::fmt::Display`
|
||||
--> $DIR/doesnt-satisfy.rs:12:17
|
||||
|
|
||||
LL | fn bar() -> () {}
|
||||
| ^^ `()` cannot be formatted with the default formatter
|
||||
|
|
||||
= help: the trait `std::fmt::Display` is not implemented for `()`
|
||||
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
||||
note: required by a bound in `Foo::{opaque#0}`
|
||||
--> $DIR/doesnt-satisfy.rs:8:22
|
||||
|
|
||||
LL | fn bar() -> impl std::fmt::Display;
|
||||
| ^^^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
@ -1,12 +0,0 @@
|
||||
error[E0046]: not all trait items implemented, missing: `foo`
|
||||
--> $DIR/dont-project-to-rpitit-with-no-value.rs:11:1
|
||||
|
|
||||
LL | fn foo(&self) -> impl Sized;
|
||||
| ---------------------------- `foo` from trait
|
||||
...
|
||||
LL | impl MyTrait for i32 {
|
||||
| ^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0046`.
|
@ -1,12 +0,0 @@
|
||||
error[E0046]: not all trait items implemented, missing: `foo`
|
||||
--> $DIR/dont-project-to-rpitit-with-no-value.rs:11:1
|
||||
|
|
||||
LL | fn foo(&self) -> impl Sized;
|
||||
| ---------------------------- `foo` from trait
|
||||
...
|
||||
LL | impl MyTrait for i32 {
|
||||
| ^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0046`.
|
@ -1,12 +0,0 @@
|
||||
error[E0049]: method `bar` has 1 type parameter but its trait declaration has 0 type parameters
|
||||
--> $DIR/generics-mismatch.rs:14:12
|
||||
|
|
||||
LL | fn bar(&self) -> impl Sized;
|
||||
| - expected 0 type parameters
|
||||
...
|
||||
LL | fn bar<T>(&self) {}
|
||||
| ^ found 1 type parameter
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0049`.
|
@ -1,12 +0,0 @@
|
||||
error[E0049]: method `bar` has 1 type parameter but its trait declaration has 0 type parameters
|
||||
--> $DIR/generics-mismatch.rs:14:12
|
||||
|
|
||||
LL | fn bar(&self) -> impl Sized;
|
||||
| - expected 0 type parameters
|
||||
...
|
||||
LL | fn bar<T>(&self) {}
|
||||
| ^ found 1 type parameter
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0049`.
|
@ -1,33 +0,0 @@
|
||||
error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
|
||||
--> $DIR/issue-102140.rs:26:22
|
||||
|
|
||||
LL | MyTrait::foo(&self)
|
||||
| ------------ ^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
help: consider removing the leading `&`-reference
|
||||
|
|
||||
LL - MyTrait::foo(&self)
|
||||
LL + MyTrait::foo(self)
|
||||
|
|
||||
|
||||
error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
|
||||
--> $DIR/issue-102140.rs:26:9
|
||||
|
|
||||
LL | MyTrait::foo(&self)
|
||||
| ^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
|
||||
|
|
||||
= help: the trait `MyTrait` is implemented for `Outer`
|
||||
|
||||
error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
|
||||
--> $DIR/issue-102140.rs:26:9
|
||||
|
|
||||
LL | MyTrait::foo(&self)
|
||||
| ^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
|
||||
|
|
||||
= help: the trait `MyTrait` is implemented for `Outer`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
@ -1,29 +0,0 @@
|
||||
error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
|
||||
--> $DIR/issue-102140.rs:26:22
|
||||
|
|
||||
LL | MyTrait::foo(&self)
|
||||
| ------------ ^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the trait `MyTrait` is implemented for `Outer`
|
||||
|
||||
error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
|
||||
--> $DIR/issue-102140.rs:26:9
|
||||
|
|
||||
LL | MyTrait::foo(&self)
|
||||
| ^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
|
||||
|
|
||||
= help: the trait `MyTrait` is implemented for `Outer`
|
||||
|
||||
error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
|
||||
--> $DIR/issue-102140.rs:26:9
|
||||
|
|
||||
LL | MyTrait::foo(&self)
|
||||
| ^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
|
||||
|
|
||||
= help: the trait `MyTrait` is implemented for `Outer`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
@ -1,14 +0,0 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-102571.rs:23:9
|
||||
|
|
||||
LL | let () = t.bar();
|
||||
| ^^ ------- this expression has type `impl Deref<Target = impl std::fmt::Display + ?Sized>`
|
||||
| |
|
||||
| expected associated type, found `()`
|
||||
|
|
||||
= note: expected associated type `impl Deref<Target = impl std::fmt::Display + ?Sized>`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
@ -1,14 +0,0 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-102571.rs:23:9
|
||||
|
|
||||
LL | let () = t.bar();
|
||||
| ^^ ------- this expression has type `impl Deref<Target = impl std::fmt::Display + ?Sized>`
|
||||
| |
|
||||
| expected associated type, found `()`
|
||||
|
|
||||
= note: expected associated type `impl Deref<Target = impl std::fmt::Display + ?Sized>`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
@ -1,49 +0,0 @@
|
||||
error[E0038]: the trait `Foo` cannot be made into an object
|
||||
--> $DIR/object-safety.rs:20:33
|
||||
|
|
||||
LL | let i = Box::new(42_u32) as Box<dyn Foo>;
|
||||
| ^^^^^^^^^^^^ `Foo` cannot be made into an object
|
||||
|
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/object-safety.rs:10:22
|
||||
|
|
||||
LL | trait Foo {
|
||||
| --- this trait cannot be made into an object...
|
||||
LL | fn baz(&self) -> impl Debug;
|
||||
| ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
|
||||
= help: consider moving `baz` to another trait
|
||||
|
||||
error[E0038]: the trait `Foo` cannot be made into an object
|
||||
--> $DIR/object-safety.rs:23:13
|
||||
|
|
||||
LL | let s = i.baz();
|
||||
| ^^^^^^^ `Foo` cannot be made into an object
|
||||
|
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/object-safety.rs:10:22
|
||||
|
|
||||
LL | trait Foo {
|
||||
| --- this trait cannot be made into an object...
|
||||
LL | fn baz(&self) -> impl Debug;
|
||||
| ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
|
||||
= help: consider moving `baz` to another trait
|
||||
|
||||
error[E0038]: the trait `Foo` cannot be made into an object
|
||||
--> $DIR/object-safety.rs:20:13
|
||||
|
|
||||
LL | let i = Box::new(42_u32) as Box<dyn Foo>;
|
||||
| ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
|
||||
|
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/object-safety.rs:10:22
|
||||
|
|
||||
LL | trait Foo {
|
||||
| --- this trait cannot be made into an object...
|
||||
LL | fn baz(&self) -> impl Debug;
|
||||
| ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
|
||||
= help: consider moving `baz` to another trait
|
||||
= note: required for the cast from `Box<u32>` to `Box<dyn Foo>`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0038`.
|
@ -1,49 +0,0 @@
|
||||
error[E0038]: the trait `Foo` cannot be made into an object
|
||||
--> $DIR/object-safety.rs:20:33
|
||||
|
|
||||
LL | let i = Box::new(42_u32) as Box<dyn Foo>;
|
||||
| ^^^^^^^^^^^^ `Foo` cannot be made into an object
|
||||
|
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/object-safety.rs:10:22
|
||||
|
|
||||
LL | trait Foo {
|
||||
| --- this trait cannot be made into an object...
|
||||
LL | fn baz(&self) -> impl Debug;
|
||||
| ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
|
||||
= help: consider moving `baz` to another trait
|
||||
|
||||
error[E0038]: the trait `Foo` cannot be made into an object
|
||||
--> $DIR/object-safety.rs:23:13
|
||||
|
|
||||
LL | let s = i.baz();
|
||||
| ^^^^^^^ `Foo` cannot be made into an object
|
||||
|
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/object-safety.rs:10:22
|
||||
|
|
||||
LL | trait Foo {
|
||||
| --- this trait cannot be made into an object...
|
||||
LL | fn baz(&self) -> impl Debug;
|
||||
| ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
|
||||
= help: consider moving `baz` to another trait
|
||||
|
||||
error[E0038]: the trait `Foo` cannot be made into an object
|
||||
--> $DIR/object-safety.rs:20:13
|
||||
|
|
||||
LL | let i = Box::new(42_u32) as Box<dyn Foo>;
|
||||
| ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
|
||||
|
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/object-safety.rs:10:22
|
||||
|
|
||||
LL | trait Foo {
|
||||
| --- this trait cannot be made into an object...
|
||||
LL | fn baz(&self) -> impl Debug;
|
||||
| ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
|
||||
= help: consider moving `baz` to another trait
|
||||
= note: required for the cast from `Box<u32>` to `Box<dyn Foo>`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0038`.
|
@ -1,17 +0,0 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/opaque-in-impl-is-opaque.rs:20:19
|
||||
|
|
||||
LL | fn bar(&self) -> impl Display {
|
||||
| ------------ the found opaque type
|
||||
...
|
||||
LL | let x: &str = ().bar();
|
||||
| ---- ^^^^^^^^ expected `&str`, found opaque type
|
||||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected reference `&str`
|
||||
found opaque type `impl std::fmt::Display`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
@ -1,17 +0,0 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/opaque-in-impl-is-opaque.rs:20:19
|
||||
|
|
||||
LL | fn bar(&self) -> impl Display {
|
||||
| ------------ the found opaque type
|
||||
...
|
||||
LL | let x: &str = ().bar();
|
||||
| ---- ^^^^^^^^ expected `&str`, found opaque type
|
||||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected reference `&str`
|
||||
found opaque type `impl std::fmt::Display`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
@ -1,16 +0,0 @@
|
||||
error[E0277]: the trait bound `impl Foo<u8>: Foo<char>` is not satisfied
|
||||
--> $DIR/return-dont-satisfy-bounds.rs:13:34
|
||||
|
|
||||
LL | fn foo<F2: Foo<u8>>(self) -> impl Foo<u8> {
|
||||
| ^^^^^^^^^^^^ the trait `Foo<char>` is not implemented for `impl Foo<u8>`
|
||||
|
|
||||
= help: the trait `Foo<char>` is implemented for `Bar`
|
||||
note: required by a bound in `Foo::foo::{opaque#0}`
|
||||
--> $DIR/return-dont-satisfy-bounds.rs:7:30
|
||||
|
|
||||
LL | fn foo<F2>(self) -> impl Foo<T>;
|
||||
| ^^^^^^ required by this bound in `Foo::foo::{opaque#0}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
@ -1,16 +0,0 @@
|
||||
error[E0277]: the trait bound `impl Foo<u8>: Foo<char>` is not satisfied
|
||||
--> $DIR/return-dont-satisfy-bounds.rs:13:34
|
||||
|
|
||||
LL | fn foo<F2: Foo<u8>>(self) -> impl Foo<u8> {
|
||||
| ^^^^^^^^^^^^ the trait `Foo<char>` is not implemented for `impl Foo<u8>`
|
||||
|
|
||||
= help: the trait `Foo<char>` is implemented for `Bar`
|
||||
note: required by a bound in `Foo::{opaque#0}`
|
||||
--> $DIR/return-dont-satisfy-bounds.rs:7:30
|
||||
|
|
||||
LL | fn foo<F2>(self) -> impl Foo<T>;
|
||||
| ^^^^^^ required by this bound in `Foo::{opaque#0}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
@ -1,61 +0,0 @@
|
||||
error: return type captures more lifetimes than trait definition
|
||||
--> $DIR/signature-mismatch.rs:36:47
|
||||
|
|
||||
LL | fn async_fn<'a>(&self, buff: &'a [u8]) -> impl Future<Output = Vec<u8>> + 'a {
|
||||
| -- this lifetime was captured ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: hidden type must only reference lifetimes captured by this impl trait
|
||||
--> $DIR/signature-mismatch.rs:17:40
|
||||
|
|
||||
LL | fn async_fn(&self, buff: &[u8]) -> impl Future<Output = Vec<u8>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: hidden type inferred to be `impl Future<Output = Vec<u8>> + 'a`
|
||||
|
||||
error: return type captures more lifetimes than trait definition
|
||||
--> $DIR/signature-mismatch.rs:41:57
|
||||
|
|
||||
LL | fn async_fn_early<'a: 'a>(&self, buff: &'a [u8]) -> impl Future<Output = Vec<u8>> + 'a {
|
||||
| -- this lifetime was captured ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: hidden type must only reference lifetimes captured by this impl trait
|
||||
--> $DIR/signature-mismatch.rs:18:57
|
||||
|
|
||||
LL | fn async_fn_early<'a: 'a>(&self, buff: &'a [u8]) -> impl Future<Output = Vec<u8>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: hidden type inferred to be `impl Future<Output = Vec<u8>> + 'a`
|
||||
|
||||
error: return type captures more lifetimes than trait definition
|
||||
--> $DIR/signature-mismatch.rs:49:10
|
||||
|
|
||||
LL | fn async_fn_multiple<'a, 'b>(
|
||||
| -- this lifetime was captured
|
||||
...
|
||||
LL | ) -> impl Future<Output = Vec<u8>> + Captures2<'a, 'b> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: hidden type must only reference lifetimes captured by this impl trait
|
||||
--> $DIR/signature-mismatch.rs:20:12
|
||||
|
|
||||
LL | -> impl Future<Output = Vec<u8>> + Captures<'a>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: hidden type inferred to be `impl Future<Output = Vec<u8>> + Captures2<'a, 'b>`
|
||||
|
||||
error[E0309]: the parameter type `T` may not live long enough
|
||||
--> $DIR/signature-mismatch.rs:58:10
|
||||
|
|
||||
LL | ) -> impl Future<Output = Vec<u8>> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `impl Future<Output = Vec<u8>>` will meet its required lifetime bounds...
|
||||
|
|
||||
note: ...that is required by this bound
|
||||
--> $DIR/signature-mismatch.rs:25:42
|
||||
|
|
||||
LL | ) -> impl Future<Output = Vec<u8>> + 'a;
|
||||
| ^^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | fn async_fn_reduce_outlive<'a, 'b, T: 'a>(
|
||||
| ++++
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0309`.
|
@ -1,61 +0,0 @@
|
||||
error: return type captures more lifetimes than trait definition
|
||||
--> $DIR/signature-mismatch.rs:36:47
|
||||
|
|
||||
LL | fn async_fn<'a>(&self, buff: &'a [u8]) -> impl Future<Output = Vec<u8>> + 'a {
|
||||
| -- this lifetime was captured ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: hidden type must only reference lifetimes captured by this impl trait
|
||||
--> $DIR/signature-mismatch.rs:17:40
|
||||
|
|
||||
LL | fn async_fn(&self, buff: &[u8]) -> impl Future<Output = Vec<u8>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: hidden type inferred to be `impl Future<Output = Vec<u8>> + 'a`
|
||||
|
||||
error: return type captures more lifetimes than trait definition
|
||||
--> $DIR/signature-mismatch.rs:41:57
|
||||
|
|
||||
LL | fn async_fn_early<'a: 'a>(&self, buff: &'a [u8]) -> impl Future<Output = Vec<u8>> + 'a {
|
||||
| -- this lifetime was captured ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: hidden type must only reference lifetimes captured by this impl trait
|
||||
--> $DIR/signature-mismatch.rs:18:57
|
||||
|
|
||||
LL | fn async_fn_early<'a: 'a>(&self, buff: &'a [u8]) -> impl Future<Output = Vec<u8>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: hidden type inferred to be `impl Future<Output = Vec<u8>> + 'a`
|
||||
|
||||
error: return type captures more lifetimes than trait definition
|
||||
--> $DIR/signature-mismatch.rs:49:10
|
||||
|
|
||||
LL | fn async_fn_multiple<'a, 'b>(
|
||||
| -- this lifetime was captured
|
||||
...
|
||||
LL | ) -> impl Future<Output = Vec<u8>> + Captures2<'a, 'b> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: hidden type must only reference lifetimes captured by this impl trait
|
||||
--> $DIR/signature-mismatch.rs:20:12
|
||||
|
|
||||
LL | -> impl Future<Output = Vec<u8>> + Captures<'a>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: hidden type inferred to be `impl Future<Output = Vec<u8>> + Captures2<'a, 'b>`
|
||||
|
||||
error[E0309]: the parameter type `T` may not live long enough
|
||||
--> $DIR/signature-mismatch.rs:58:10
|
||||
|
|
||||
LL | ) -> impl Future<Output = Vec<u8>> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `impl Future<Output = Vec<u8>>` will meet its required lifetime bounds...
|
||||
|
|
||||
note: ...that is required by this bound
|
||||
--> $DIR/signature-mismatch.rs:25:42
|
||||
|
|
||||
LL | ) -> impl Future<Output = Vec<u8>> + 'a;
|
||||
| ^^
|
||||
help: consider adding an explicit lifetime bound...
|
||||
|
|
||||
LL | fn async_fn_reduce_outlive<'a, 'b, T: 'a>(
|
||||
| ++++
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0309`.
|
@ -1,31 +0,0 @@
|
||||
error[E0053]: method `bar` has an incompatible type for trait
|
||||
--> $DIR/specialization-broken.rs:19:22
|
||||
|
|
||||
LL | default impl<U> Foo for U
|
||||
| - this type parameter
|
||||
...
|
||||
LL | fn bar(&self) -> U {
|
||||
| ^
|
||||
| |
|
||||
| expected associated type, found type parameter `U`
|
||||
| help: change the output type to match the trait: `impl Sized`
|
||||
|
|
||||
note: type in trait
|
||||
--> $DIR/specialization-broken.rs:12:22
|
||||
|
|
||||
LL | fn bar(&self) -> impl Sized;
|
||||
| ^^^^^^^^^^
|
||||
= note: expected signature `fn(&U) -> impl Sized`
|
||||
found signature `fn(&U) -> U`
|
||||
|
||||
error: method with return-position `impl Trait` in trait cannot be specialized
|
||||
--> $DIR/specialization-broken.rs:19:5
|
||||
|
|
||||
LL | fn bar(&self) -> U {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: specialization behaves in inconsistent and surprising ways with `#![feature(return_position_impl_trait_in_trait)]`, and for now is disallowed
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0053`.
|
@ -1,31 +0,0 @@
|
||||
error[E0053]: method `bar` has an incompatible type for trait
|
||||
--> $DIR/specialization-broken.rs:19:22
|
||||
|
|
||||
LL | default impl<U> Foo for U
|
||||
| - this type parameter
|
||||
...
|
||||
LL | fn bar(&self) -> U {
|
||||
| ^
|
||||
| |
|
||||
| expected associated type, found type parameter `U`
|
||||
| help: change the output type to match the trait: `impl Sized`
|
||||
|
|
||||
note: type in trait
|
||||
--> $DIR/specialization-broken.rs:12:22
|
||||
|
|
||||
LL | fn bar(&self) -> impl Sized;
|
||||
| ^^^^^^^^^^
|
||||
= note: expected signature `fn(&U) -> impl Sized`
|
||||
found signature `fn(&U) -> U`
|
||||
|
||||
error: method with return-position `impl Trait` in trait cannot be specialized
|
||||
--> $DIR/specialization-broken.rs:19:5
|
||||
|
|
||||
LL | fn bar(&self) -> U {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: specialization behaves in inconsistent and surprising ways with `#![feature(return_position_impl_trait_in_trait)]`, and for now is disallowed
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0053`.
|
@ -1,12 +0,0 @@
|
||||
error[E0049]: method `bar` has 0 type parameters but its trait declaration has 1 type parameter
|
||||
--> $DIR/trait-more-generics-than-impl.rs:14:11
|
||||
|
|
||||
LL | fn bar<T>() -> impl Sized;
|
||||
| - expected 1 type parameter
|
||||
...
|
||||
LL | fn bar() -> impl Sized {}
|
||||
| ^ found 0 type parameters
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0049`.
|
@ -1,12 +0,0 @@
|
||||
error[E0049]: method `bar` has 0 type parameters but its trait declaration has 1 type parameter
|
||||
--> $DIR/trait-more-generics-than-impl.rs:14:11
|
||||
|
|
||||
LL | fn bar<T>() -> impl Sized;
|
||||
| - expected 1 type parameter
|
||||
...
|
||||
LL | fn bar() -> impl Sized {}
|
||||
| ^ found 0 type parameters
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0049`.
|
@ -1,9 +0,0 @@
|
||||
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
|
||||
--> $DIR/unconstrained-lt.rs:10:6
|
||||
|
|
||||
LL | impl<'a, T> Foo for T {
|
||||
| ^^ unconstrained lifetime parameter
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0207`.
|
@ -1,9 +0,0 @@
|
||||
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
|
||||
--> $DIR/unconstrained-lt.rs:10:6
|
||||
|
|
||||
LL | impl<'a, T> Foo for T {
|
||||
| ^^ unconstrained lifetime parameter
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0207`.
|
@ -1,57 +0,0 @@
|
||||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
|
||||
--> $DIR/wf-bounds.rs:17:22
|
||||
|
|
||||
LL | fn nya() -> impl Wf<Vec<[u8]>>;
|
||||
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `[u8]`
|
||||
note: required by a bound in `Vec`
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
|
||||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
|
||||
--> $DIR/wf-bounds.rs:20:23
|
||||
|
|
||||
LL | fn nya2() -> impl Wf<[u8]>;
|
||||
| ^^^^^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `[u8]`
|
||||
note: required by a bound in `Wf`
|
||||
--> $DIR/wf-bounds.rs:10:10
|
||||
|
|
||||
LL | trait Wf<T> {
|
||||
| ^ required by this bound in `Wf`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | trait Wf<T: ?Sized> {
|
||||
| ++++++++
|
||||
|
||||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
|
||||
--> $DIR/wf-bounds.rs:23:44
|
||||
|
|
||||
LL | fn nya3() -> impl Wf<(), Output = impl Wf<Vec<[u8]>>>;
|
||||
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `[u8]`
|
||||
note: required by a bound in `Vec`
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
|
||||
error[E0277]: `T` doesn't implement `std::fmt::Display`
|
||||
--> $DIR/wf-bounds.rs:26:26
|
||||
|
|
||||
LL | fn nya4<T>() -> impl Wf<NeedsDisplay<T>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^ `T` cannot be formatted with the default formatter
|
||||
|
|
||||
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
||||
note: required by a bound in `NeedsDisplay`
|
||||
--> $DIR/wf-bounds.rs:14:24
|
||||
|
|
||||
LL | struct NeedsDisplay<T: Display>(T);
|
||||
| ^^^^^^^ required by this bound in `NeedsDisplay`
|
||||
help: consider restricting type parameter `T`
|
||||
|
|
||||
LL | fn nya4<T: std::fmt::Display>() -> impl Wf<NeedsDisplay<T>>;
|
||||
| +++++++++++++++++++
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
@ -1,57 +0,0 @@
|
||||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
|
||||
--> $DIR/wf-bounds.rs:17:22
|
||||
|
|
||||
LL | fn nya() -> impl Wf<Vec<[u8]>>;
|
||||
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `[u8]`
|
||||
note: required by a bound in `Vec`
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
|
||||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
|
||||
--> $DIR/wf-bounds.rs:20:23
|
||||
|
|
||||
LL | fn nya2() -> impl Wf<[u8]>;
|
||||
| ^^^^^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `[u8]`
|
||||
note: required by a bound in `Wf`
|
||||
--> $DIR/wf-bounds.rs:10:10
|
||||
|
|
||||
LL | trait Wf<T> {
|
||||
| ^ required by this bound in `Wf`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | trait Wf<T: ?Sized> {
|
||||
| ++++++++
|
||||
|
||||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
|
||||
--> $DIR/wf-bounds.rs:23:44
|
||||
|
|
||||
LL | fn nya3() -> impl Wf<(), Output = impl Wf<Vec<[u8]>>>;
|
||||
| ^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `[u8]`
|
||||
note: required by a bound in `Vec`
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
|
||||
error[E0277]: `T` doesn't implement `std::fmt::Display`
|
||||
--> $DIR/wf-bounds.rs:26:26
|
||||
|
|
||||
LL | fn nya4<T>() -> impl Wf<NeedsDisplay<T>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^ `T` cannot be formatted with the default formatter
|
||||
|
|
||||
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
||||
note: required by a bound in `NeedsDisplay`
|
||||
--> $DIR/wf-bounds.rs:14:24
|
||||
|
|
||||
LL | struct NeedsDisplay<T: Display>(T);
|
||||
| ^^^^^^^ required by this bound in `NeedsDisplay`
|
||||
help: consider restricting type parameter `T`
|
||||
|
|
||||
LL | fn nya4<T: std::fmt::Display>() -> impl Wf<NeedsDisplay<T>>;
|
||||
| +++++++++++++++++++
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
Loading…
Reference in New Issue
Block a user