summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/issue-64252-self-type.rs
blob: 128d5e85c22c87329d4dfcaf18fb806c82282ca3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// This test checks that a suggestion to add a `self: ` parameter name is provided
// to functions where this is applicable.

pub fn foo(Box<Self>) { }
//~^ ERROR expected one of `:`, `@`, or `|`, found `<`

struct Bar;

impl Bar {
    fn bar(Box<Self>) { }
    //~^ ERROR expected one of `:`, `@`, or `|`, found `<`
}

fn main() { }