rust/tests/ui/delegation/not-supported.stderr

169 lines
6.1 KiB
Plaintext

error: delegation with early bound generics is not supported yet
--> $DIR/not-supported.rs:16:29
|
LL | fn bar(&self, x: T) -> T { x }
| ------------------------ callee defined here
...
LL | reuse GenericTrait::bar;
| ^^^
error: delegation with early bound generics is not supported yet
--> $DIR/not-supported.rs:18:29
|
LL | fn bar1() {}
| --------- callee defined here
...
LL | reuse GenericTrait::bar1;
| ^^^^
error: delegation with early bound generics is not supported yet
--> $DIR/not-supported.rs:29:39
|
LL | fn bar(&self, x: T) -> T { x }
| ------------------------ callee defined here
...
LL | reuse <F as GenericTrait<T>>::bar { &self.0 }
| ^^^
error: delegation with early bound generics is not supported yet
--> $DIR/not-supported.rs:31:34
|
LL | fn bar1() {}
| --------- callee defined here
...
LL | reuse GenericTrait::<T>::bar1;
| ^^^^
error: delegation with early bound generics is not supported yet
--> $DIR/not-supported.rs:36:29
|
LL | fn bar(&self, x: T) -> T { x }
| ------------------------ callee defined here
...
LL | reuse GenericTrait::bar { &F }
| ^^^
error: delegation with early bound generics is not supported yet
--> $DIR/not-supported.rs:38:29
|
LL | fn bar1() {}
| --------- callee defined here
...
LL | reuse GenericTrait::bar1;
| ^^^^
error: delegation with early bound generics is not supported yet
--> $DIR/not-supported.rs:43:22
|
LL | fn foo(&self, x: i32) -> i32 { x }
| ---------------------------- callee defined here
...
LL | reuse Trait::foo;
| ^^^
error[E0049]: method `foo2` has 0 type parameters but its trait declaration has 1 type parameter
--> $DIR/not-supported.rs:49:22
|
LL | fn foo2<T>(&self, x: T) -> T { x }
| - expected 1 type parameter
...
LL | reuse Trait::foo2 { &self.0 }
| ^^^^ found 0 type parameters
error: delegation with early bound generics is not supported yet
--> $DIR/not-supported.rs:52:29
|
LL | fn foo3<'a: 'a>(_: &'a u32) {}
| --------------------------- callee defined here
...
LL | reuse <F as Trait>::foo3;
| ^^^^
error[E0195]: lifetime parameters or bounds on method `foo3` do not match the trait declaration
--> $DIR/not-supported.rs:52:29
|
LL | fn foo3<'a: 'a>(_: &'a u32) {}
| -------- lifetimes in impl do not match this method in trait
...
LL | reuse <F as Trait>::foo3;
| ^^^^ lifetimes do not match method in trait
error: delegation with early bound generics is not supported yet
--> $DIR/not-supported.rs:59:22
|
LL | fn foo(&self, x: i32) -> i32 { x }
| ---------------------------- callee defined here
...
LL | reuse Trait::foo { &self.0 }
| ^^^
error: delegation with early bound generics is not supported yet
--> $DIR/not-supported.rs:49:22
|
LL | fn foo2<T>(&self, x: T) -> T { x }
| ---------------------------- callee defined here
...
LL | reuse Trait::foo2 { &self.0 }
| ^^^^
error: delegation with early bound generics is not supported yet
--> $DIR/not-supported.rs:74:21
|
LL | pub fn opaque_arg(_: impl Trait) -> i32 { 0 }
| --------------------------------------- callee defined here
...
LL | reuse to_reuse::opaque_arg;
| ^^^^^^^^^^
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:82:5: 82:24>::{synthetic#0}`
--> $DIR/not-supported.rs:83:25
|
LL | reuse to_reuse::opaque_ret;
| ^^^^^^^^^^
|
note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process...
--> $DIR/not-supported.rs:83:25
|
LL | reuse to_reuse::opaque_ret;
| ^^^^^^^^^^
= note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:82:5: 82:24>::{synthetic#0}`, completing the cycle
note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:82:5: 82:24>` is well-formed
--> $DIR/not-supported.rs:82:5
|
LL | impl ToReuse for u8 {
| ^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:85:5: 85:25>::{synthetic#0}`
--> $DIR/not-supported.rs:86:24
|
LL | reuse ToReuse::opaque_ret;
| ^^^^^^^^^^
|
note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process...
--> $DIR/not-supported.rs:86:24
|
LL | reuse ToReuse::opaque_ret;
| ^^^^^^^^^^
= note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:85:5: 85:25>::{synthetic#0}`, completing the cycle
note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:85:5: 85:25>` is well-formed
--> $DIR/not-supported.rs:85:5
|
LL | impl ToReuse for u16 {
| ^^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
error: recursive delegation is not supported yet
--> $DIR/not-supported.rs:99:22
|
LL | pub reuse to_reuse2::foo;
| --- callee defined here
...
LL | reuse to_reuse1::foo;
| ^^^
error: aborting due to 16 previous errors
Some errors have detailed explanations: E0049, E0195, E0391.
For more information about an error, try `rustc --explain E0049`.