{"push_id":1565045332,"size":1,"distinct_size":1,"ref":"refs/heads/shorter-mismatched-types","head":"87993af8adad9b9ae5eca94fcc3b185cfee8fc21","before":"a7852a50924ccd5b0e09805adbb0380f81559b88","commits":[{"sha":"87993af8adad9b9ae5eca94fcc3b185cfee8fc21","author":{"name":"Esteban Küber","email":"46621ee4ab20f72a4a91ab7e8db2321b72f8d737@kuber.com.ar"},"message":"Highlight and simplify mismatched types\n\nShorten mismatched types errors by replacing subtypes that are not\ndifferent with `_`, and highlighting only the subtypes that are\ndifferent.\n\nGiven a file\n\n```rust\nstruct X<T1, T2> {\n    x: T1,\n    y: T2,\n}\n\nfn foo() -> X<X<String, String>, String> {\n    X { x: X {x: \"\".to_string(), y: 2}, y: \"\".to_string()}\n}\n\nfn bar() -> Option<String> {\n    \"\".to_string()\n}\n```\n\nprovide the following output\n\n```rust\nerror[E0308]: mismatched types\n  --> file.rs:6:5\n   |\n 6 |     X { x: X {x: \"\".to_string(), y: 2}, y: \"\".to_string()}\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found {integer}\n   |\n   = note: expected type `X<X<_, std::string::String>, _>`\n                                 ^^^^^^^^^^^^^^^^^^^^  // < highlighted\n              found type `X<X<_, {integer}>, _>`\n                                 ^^^^^^^^^             // < highlighted\n\nerror[E0308]: mismatched types\n  --> file.rs:6:5\n   |\n10 |     \"\".to_string()\n   |     ^^^^^^^^^^^^^^ expected struct `std::option::Option`, found `std::string::String`\n   |\n   = note: expected type `Option<std::string::String>`\n                          ^^^^^^^                   ^  // < highlighted\n              found type `std::string::String`\n```","distinct":true,"url":"https://api.github.com/repos/estebank/rust/commits/87993af8adad9b9ae5eca94fcc3b185cfee8fc21"}]}
{"actor":{"display_login":"estebank"}}