]> git.lizzy.rs Git - rust.git/blob - tests/ui/path-lookahead.rs
Rollup merge of #107091 - clubby789:infer-ftl-missing-dollar, r=compiler-errors
[rust.git] / tests / ui / path-lookahead.rs
1 // run-pass
2 // run-rustfix
3
4 #![allow(dead_code)]
5 #![warn(unused_parens)]
6
7 // Parser test for #37765
8
9 fn with_parens<T: ToString>(arg: T) -> String {
10     return (<T as ToString>::to_string(&arg)); //~WARN unnecessary parentheses around `return` value
11 }
12
13 fn no_parens<T: ToString>(arg: T) -> String {
14     return <T as ToString>::to_string(&arg);
15 }
16
17 fn main() {}