summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/inner_type.stderr
blob: 5ac3d04f104142d803267d33be1ef9ec72112c08 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
error[E0599]: no method named `method` found for struct `RefCell` in the current scope
  --> $DIR/inner_type.rs:17:16
   |
LL |     other_item.method();
   |                ^^^^^^ method not found in `RefCell<Struct<u32>>`
   |
note: the method `method` exists on the type `Struct<u32>`
  --> $DIR/inner_type.rs:9:5
   |
LL |     pub fn method(&self) {}
   |     ^^^^^^^^^^^^^^^^^^^^
help: use `.borrow()` to borrow the `Struct<u32>`, panicking if a mutable borrow exists
   |
LL |     other_item.borrow().method();
   |               +++++++++

error[E0599]: no method named `some_mutable_method` found for struct `RefCell` in the current scope
  --> $DIR/inner_type.rs:21:16
   |
LL |     other_item.some_mutable_method();
   |                ^^^^^^^^^^^^^^^^^^^ method not found in `RefCell<Struct<u32>>`
   |
note: the method `some_mutable_method` exists on the type `Struct<u32>`
  --> $DIR/inner_type.rs:11:5
   |
LL |     pub fn some_mutable_method(&mut self) {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: use `.borrow_mut()` to mutably borrow the `Struct<u32>`, panicking if any borrows exist
   |
LL |     other_item.borrow_mut().some_mutable_method();
   |               +++++++++++++

error[E0599]: no method named `method` found for struct `Mutex` in the current scope
  --> $DIR/inner_type.rs:27:18
   |
LL |     another_item.method();
   |                  ^^^^^^ method not found in `Mutex<Struct<u32>>`
   |
note: the method `method` exists on the type `Struct<u32>`
  --> $DIR/inner_type.rs:9:5
   |
LL |     pub fn method(&self) {}
   |     ^^^^^^^^^^^^^^^^^^^^
help: use `.lock().unwrap()` to borrow the `Struct<u32>`, blocking the current thread until it can be acquired
   |
LL |     another_item.lock().unwrap().method();
   |                 ++++++++++++++++

error[E0599]: no method named `method` found for struct `RwLock` in the current scope
  --> $DIR/inner_type.rs:33:18
   |
LL |     another_item.method();
   |                  ^^^^^^ method not found in `RwLock<Struct<u32>>`
   |
note: the method `method` exists on the type `Struct<u32>`
  --> $DIR/inner_type.rs:9:5
   |
LL |     pub fn method(&self) {}
   |     ^^^^^^^^^^^^^^^^^^^^
help: use `.read().unwrap()` to borrow the `Struct<u32>`, blocking the current thread until it can be acquired
   |
LL |     another_item.read().unwrap().method();
   |                 ++++++++++++++++

error[E0599]: no method named `some_mutable_method` found for struct `RwLock` in the current scope
  --> $DIR/inner_type.rs:37:18
   |
LL |     another_item.some_mutable_method();
   |                  ^^^^^^^^^^^^^^^^^^^ method not found in `RwLock<Struct<u32>>`
   |
note: the method `some_mutable_method` exists on the type `Struct<u32>`
  --> $DIR/inner_type.rs:11:5
   |
LL |     pub fn some_mutable_method(&mut self) {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: use `.write().unwrap()` to mutably borrow the `Struct<u32>`, blocking the current thread until it can be acquired
   |
LL |     another_item.write().unwrap().some_mutable_method();
   |                 +++++++++++++++++

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0599`.