]> git.lizzy.rs Git - rust.git/blob - tests/ui/path-lookahead.fixed
Rollup merge of #107168 - Nilstrieb:if-a-tait-falls-in-the-forest,can-we-know-it...
[rust.git] / tests / ui / path-lookahead.fixed
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() {}