You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected to see it compile successfully.
Instead, it was rejected with the following error message:
error[E0308]: mismatched types
--> p0.rs:15:24
|
15 | let _: S<i32>::P = String::new();
| --------- ^^^^^^^^^^^^^ expected associated type, found struct `String`
| |
| expected due to this
|
= note: expected associated type `<i32 as O>::P`
found struct `String`
= help: consider constraining the associated type `<i32 as O>::P` to `String` or calling a method that returns `<i32 as O>::P`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
help: call `Into::into` on this expression to convert `String` into `<i32 as O>::P`
|
15 | let _: S<i32>::P = String::new().into();
| +++++++
I tried this code:
I expected to see it compile successfully.
Instead, it was rejected with the following error message:
Meta
rustc -Vv
:@rustbot label F-inherent_associated_types
@rustbot claim
The text was updated successfully, but these errors were encountered: