Fix FP useless_conversion

Fix #5833.
This commit is contained in:
Takayuki Nakata 2020-07-25 23:58:22 +09:00
parent 79f948ec0a
commit c81bbd05b9
4 changed files with 34 additions and 9 deletions

View file

@ -32,11 +32,20 @@ fn test_issue_3913() -> Result<(), std::io::Error> {
Ok(())
}
fn test_issue_5833() -> Result<(), ()> {
let text = "foo\r\nbar\n\nbaz\n";
let lines = text.lines();
if Some("ok") == lines.into_iter().next() {}
Ok(())
}
fn main() {
test_generic(10i32);
test_generic2::<i32, i32>(10i32);
test_questionmark().unwrap();
test_issue_3913().unwrap();
test_issue_5833().unwrap();
let _: String = "foo".into();
let _: String = From::from("foo");