copied over cmp_owned fix from master

This commit is contained in:
llogiq 2015-08-16 16:13:44 +02:00
parent 4244f2479f
commit e1438e7010
1 changed files with 1 additions and 7 deletions

View File

@ -1,4 +1,4 @@
#![feature(plugin, collections)]
#![feature(plugin)]
#![plugin(clippy)]
#[deny(cmp_owned)]
@ -13,11 +13,5 @@ fn main() {
x != "foo".to_owned(); //~ERROR this creates an owned instance
#[allow(deprecated)] // for from_str
fn old_timey(x : &str) {
x != String::from_str("foo"); //~ERROR this creates an owned instance
}
old_timey(x);
x != String::from("foo"); //~ERROR this creates an owned instance
}