mirror of https://github.com/rust-lang/rust.git
copied over cmp_owned fix from master
This commit is contained in:
parent
4244f2479f
commit
e1438e7010
|
@ -1,4 +1,4 @@
|
||||||
#![feature(plugin, collections)]
|
#![feature(plugin)]
|
||||||
#![plugin(clippy)]
|
#![plugin(clippy)]
|
||||||
|
|
||||||
#[deny(cmp_owned)]
|
#[deny(cmp_owned)]
|
||||||
|
@ -13,11 +13,5 @@ fn main() {
|
||||||
|
|
||||||
x != "foo".to_owned(); //~ERROR this creates an owned instance
|
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
|
x != String::from("foo"); //~ERROR this creates an owned instance
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue