diff options
Diffstat (limited to 'src/test/compile-fail/by-move-pattern-binding.rs')
| -rw-r--r-- | src/test/compile-fail/by-move-pattern-binding.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/compile-fail/by-move-pattern-binding.rs b/src/test/compile-fail/by-move-pattern-binding.rs index 986db86a6c1..12d9e1610a5 100644 --- a/src/test/compile-fail/by-move-pattern-binding.rs +++ b/src/test/compile-fail/by-move-pattern-binding.rs @@ -10,17 +10,17 @@ enum E { Foo, - Bar(~str) + Bar(StrBuf) } struct S { x: E } -fn f(x: ~str) {} +fn f(x: StrBuf) {} fn main() { - let s = S { x: Bar("hello".to_owned()) }; + let s = S { x: Bar("hello".to_strbuf()) }; match &s.x { &Foo => {} &Bar(identifier) => f(identifier.clone()) //~ ERROR cannot move |
