summaryrefslogtreecommitdiffstats
path: root/tests/ui/path-lookahead.fixed
blob: 928955630e9ffbcb41a1818a2763a67917dfeed2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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() {}