rust/tests/ui/path-lookahead.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
360 B
Rust
Raw Normal View History

2020-07-02 00:32:12 -05:00
//@ run-pass
//@ run-rustfix
#![allow(dead_code)]
#![warn(unused_parens)]
// Parser test for #37765
fn with_parens<T: ToString>(arg: T) -> String {
return <T as ToString>::to_string(&arg); //~WARN unnecessary parentheses around `return` value
}
fn no_parens<T: ToString>(arg: T) -> String {
return <T as ToString>::to_string(&arg);
}
fn main() {}