rust/tests/ui/delegation/not-supported.stderr
2024-06-13 21:47:43 -04:00

200 lines
7.6 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:76:21
|
LL | pub fn opaque_arg(_: impl Trait) -> i32 { 0 }
| --------------------------------------- callee defined here
...
LL | reuse to_reuse::opaque_arg;
| ^^^^^^^^^^
warning: this function depends on never type fallback being `()`
--> $DIR/not-supported.rs:80:9
|
LL | fn opaque_ret() -> impl Trait { unimplemented!() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
= help: specify the types explicitly
note: in edition 2024, the requirement `!: opaque::Trait` will fail
--> $DIR/not-supported.rs:80:28
|
LL | fn opaque_ret() -> impl Trait { unimplemented!() }
| ^^^^^^^^^^
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:86:5: 86:24>::{synthetic#0}`
--> $DIR/not-supported.rs:87: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:87:25
|
LL | reuse to_reuse::opaque_ret;
| ^^^^^^^^^^
= note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:86:5: 86:24>::{synthetic#0}`, completing the cycle
note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:86:5: 86:24>` is well-formed
--> $DIR/not-supported.rs:86: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
warning: this function depends on never type fallback being `()`
--> $DIR/not-supported.rs:72:9
|
LL | pub fn opaque_ret() -> impl Trait { unimplemented!() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
= help: specify the types explicitly
note: in edition 2024, the requirement `!: opaque::Trait` will fail
--> $DIR/not-supported.rs:72:32
|
LL | pub fn opaque_ret() -> impl Trait { unimplemented!() }
| ^^^^^^^^^^
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:89:5: 89:25>::{synthetic#0}`
--> $DIR/not-supported.rs:90: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:90:24
|
LL | reuse ToReuse::opaque_ret;
| ^^^^^^^^^^
= note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:89:5: 89:25>::{synthetic#0}`, completing the cycle
note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:89:5: 89:25>` is well-formed
--> $DIR/not-supported.rs:89: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:103:22
|
LL | pub reuse to_reuse2::foo;
| --- callee defined here
...
LL | reuse to_reuse1::foo;
| ^^^
error: aborting due to 16 previous errors; 2 warnings emitted
Some errors have detailed explanations: E0049, E0195, E0391.
For more information about an error, try `rustc --explain E0049`.