summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/issue-102989.stderr
blob: efe1a246774576a450cc5c0b25c610f89080c481 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
error: `self` parameter is only allowed in associated functions
  --> $DIR/issue-102989.rs:7:15
   |
LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
   |               ^^^^ not semantically valid as function parameter
   |
   = note: associated functions are those in `impl` or `trait` definitions

error[E0412]: cannot find type `Struct` in this scope
  --> $DIR/issue-102989.rs:7:22
   |
LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
   |                      ^^^^^^ not found in this scope

error[E0425]: cannot find value `x` in this scope
  --> $DIR/issue-102989.rs:11:13
   |
LL |     let x = x << 1;
   |             ^ help: a local variable with a similar name exists: `f`

error[E0152]: found duplicate lang item `sized`
  --> $DIR/issue-102989.rs:5:1
   |
LL | trait Sized { }
   | ^^^^^^^^^^^
   |
   = note: the lang item is first defined in crate `core` (which `std` depends on)
   = note: first definition in `core` loaded from SYSROOT/libcore-*.rlib
   = note: second definition in the local crate (`issue_102989`)

error[E0277]: the size for values of type `{integer}` cannot be known at compilation time
  --> $DIR/issue-102989.rs:11:15
   |
LL |     let x = x << 1;
   |               ^^ doesn't have a size known at compile-time
   |
   = help: the trait `std::marker::Sized` is not implemented for `{integer}`

error[E0308]: mismatched types
  --> $DIR/issue-102989.rs:7:42
   |
LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
   |    ----------                            ^^^^ expected `&u32`, found `()`
   |    |
   |    implicitly returns `()` as its body has no tail or `return` expression
   |
note: consider returning one of these bindings
  --> $DIR/issue-102989.rs:7:30
   |
LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
   |                              ^
...
LL |     let x = x << 1;
   |         ^

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0152, E0277, E0308, E0412, E0425.
For more information about an error, try `rustc --explain E0152`.