diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/suggestions/chain-method-call-mutation-in-place.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/ui/suggestions/chain-method-call-mutation-in-place.rs b/tests/ui/suggestions/chain-method-call-mutation-in-place.rs index cb92ab87a..7a4c74796 100644 --- a/tests/ui/suggestions/chain-method-call-mutation-in-place.rs +++ b/tests/ui/suggestions/chain-method-call-mutation-in-place.rs @@ -1,4 +1,8 @@ -fn main() {} +fn main() { + let x: Vec<i32> = vec![1, 2, 3].into_iter().collect::<Vec<i32>>().sort_by_key(|i| i); //~ ERROR mismatched types + vec![1, 2, 3].into_iter().collect::<Vec<i32>>().sort_by_key(|i| i).sort(); //~ ERROR no method named `sort` found for unit type `()` in the current scope +} + fn foo(mut s: String) -> String { s.push_str("asdf") //~ ERROR mismatched types } |