Accurately refer to assoc fn without receiver as assoc fn instead of methods. Add `AssocItem::descr` method to centralize where we call methods and associated functions.
205 lines
7.9 KiB
Plaintext
205 lines
7.9 KiB
Plaintext
error: using `#![feature(effects)]` without enabling next trait solver globally
|
|
|
|
|
= note: the next trait solver must be enabled globally for the effects feature to work correctly
|
|
= help: use `-Znext-solver` to enable
|
|
|
|
error: early bound generics are not supported for associated delegation items
|
|
--> $DIR/not-supported.rs:18:29
|
|
|
|
|
LL | fn bar(&self, x: T) -> T { x }
|
|
| ------------------------ callee defined here
|
|
...
|
|
LL | reuse GenericTrait::bar;
|
|
| ^^^
|
|
|
|
error: early bound generics are not supported for associated delegation items
|
|
--> $DIR/not-supported.rs:20:29
|
|
|
|
|
LL | fn bar1() {}
|
|
| --------- callee defined here
|
|
...
|
|
LL | reuse GenericTrait::bar1;
|
|
| ^^^^
|
|
|
|
error: early bound generics are not supported for associated delegation items
|
|
--> $DIR/not-supported.rs:31:39
|
|
|
|
|
LL | fn bar(&self, x: T) -> T { x }
|
|
| ------------------------ callee defined here
|
|
...
|
|
LL | reuse <F as GenericTrait<T>>::bar { &self.0 }
|
|
| ^^^
|
|
|
|
error: early bound generics are not supported for associated delegation items
|
|
--> $DIR/not-supported.rs:33:34
|
|
|
|
|
LL | fn bar1() {}
|
|
| --------- callee defined here
|
|
...
|
|
LL | reuse GenericTrait::<T>::bar1;
|
|
| ^^^^
|
|
|
|
error: early bound generics are not supported for associated delegation items
|
|
--> $DIR/not-supported.rs:38:29
|
|
|
|
|
LL | fn bar(&self, x: T) -> T { x }
|
|
| ------------------------ callee defined here
|
|
...
|
|
LL | reuse GenericTrait::bar { &F }
|
|
| ^^^
|
|
|
|
error: early bound generics are not supported for associated delegation items
|
|
--> $DIR/not-supported.rs:40:29
|
|
|
|
|
LL | fn bar1() {}
|
|
| --------- callee defined here
|
|
...
|
|
LL | reuse GenericTrait::bar1;
|
|
| ^^^^
|
|
|
|
error: early bound generics are not supported for associated delegation items
|
|
--> $DIR/not-supported.rs:45: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:51: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: early bound generics are not supported for associated delegation items
|
|
--> $DIR/not-supported.rs:54:29
|
|
|
|
|
LL | fn foo3<'a: 'a>(_: &'a u32) {}
|
|
| --------------------------- callee defined here
|
|
...
|
|
LL | reuse <F as Trait>::foo3;
|
|
| ^^^^
|
|
|
|
error[E0195]: lifetime parameters or bounds on associated function `foo3` do not match the trait declaration
|
|
--> $DIR/not-supported.rs:54:29
|
|
|
|
|
LL | fn foo3<'a: 'a>(_: &'a u32) {}
|
|
| -------- lifetimes in impl do not match this associated function in trait
|
|
...
|
|
LL | reuse <F as Trait>::foo3;
|
|
| ^^^^ lifetimes do not match associated function in trait
|
|
|
|
error: delegation to a function with effect parameter is not supported yet
|
|
--> $DIR/not-supported.rs:112:18
|
|
|
|
|
LL | fn foo();
|
|
| --------- callee defined here
|
|
...
|
|
LL | reuse Trait::foo;
|
|
| ^^^
|
|
|
|
error: early bound generics are not supported for associated delegation items
|
|
--> $DIR/not-supported.rs:61:22
|
|
|
|
|
LL | fn foo(&self, x: i32) -> i32 { x }
|
|
| ---------------------------- callee defined here
|
|
...
|
|
LL | reuse Trait::foo { &self.0 }
|
|
| ^^^
|
|
|
|
error: early bound generics are not supported for associated delegation items
|
|
--> $DIR/not-supported.rs:51:22
|
|
|
|
|
LL | fn foo2<T>(&self, x: T) -> T { x }
|
|
| ---------------------------- callee defined here
|
|
...
|
|
LL | reuse Trait::foo2 { &self.0 }
|
|
| ^^^^
|
|
|
|
warning: this function depends on never type fallback being `()`
|
|
--> $DIR/not-supported.rs:79: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:79: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:85:5: 85:24>::{synthetic#0}`
|
|
--> $DIR/not-supported.rs:86: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:86:25
|
|
|
|
|
LL | reuse to_reuse::opaque_ret;
|
|
| ^^^^^^^^^^
|
|
= note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:85:5: 85:24>::{synthetic#0}`, completing the cycle
|
|
note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:85:5: 85:24>` is well-formed
|
|
--> $DIR/not-supported.rs:85: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:73: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:73:32
|
|
|
|
|
LL | pub fn opaque_ret() -> impl Trait { unimplemented!() }
|
|
| ^^^^^^^^^^
|
|
|
|
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/not-supported.rs:88:5: 88:25>::{synthetic#0}`
|
|
--> $DIR/not-supported.rs:89: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:89:24
|
|
|
|
|
LL | reuse ToReuse::opaque_ret;
|
|
| ^^^^^^^^^^
|
|
= note: ...which again requires computing type of `opaque::<impl at $DIR/not-supported.rs:88:5: 88:25>::{synthetic#0}`, completing the cycle
|
|
note: cycle used when checking that `opaque::<impl at $DIR/not-supported.rs:88:5: 88:25>` is well-formed
|
|
--> $DIR/not-supported.rs:88: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:102:22
|
|
|
|
|
LL | pub reuse to_reuse2::foo;
|
|
| --- callee defined here
|
|
...
|
|
LL | reuse to_reuse1::foo;
|
|
| ^^^
|
|
|
|
error: aborting due to 17 previous errors; 2 warnings emitted
|
|
|
|
Some errors have detailed explanations: E0049, E0195, E0391.
|
|
For more information about an error, try `rustc --explain E0049`.
|