about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-05-23 12:54:27 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-05-25 12:05:18 -0700
commit976541884f674127c33e08aaaf15c99b735701f7 (patch)
treeacfe20160fcdaf2ec06d02af7c77f8b67993c537 /src/test/ui/thinlto
parent02f5786a324c40b2d8b2d0df98456e48fb45d30c (diff)
downloadrust-976541884f674127c33e08aaaf15c99b735701f7.tar.gz
rust-976541884f674127c33e08aaaf15c99b735701f7.zip
Tweak `self` arg not as first argument of a method diagnostic
Mention that `self` is only valid on "associated functions"
```
error: unexpected `self` argument in function
  --> $DIR/self-in-function-arg.rs:1:15
   |
LL | fn foo(x:i32, self: i32) -> i32 { self }
   |               ^^^^ not valid as function argument
   |
   = note: `self` is only valid as the first argument of an associated function
```

When it is a method, mention it must be first
```
error: unexpected `self` argument in function
  --> $DIR/trait-fn.rs:4:20
   |
LL |     fn c(foo: u32, self) {}
   |                    ^^^^ must be the first associated function argument
```
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions