]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr
Move /src/test to /tests
[rust.git] / tests / ui / closures / 2229_closure_analysis / unsafe_ptr.stderr
1 error[E0658]: attributes on expressions are experimental
2   --> $DIR/unsafe_ptr.rs:25:13
3    |
4 LL |     let c = #[rustc_capture_analysis]
5    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
8    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
9
10 error[E0658]: attributes on expressions are experimental
11   --> $DIR/unsafe_ptr.rs:45:13
12    |
13 LL |     let c = #[rustc_capture_analysis]
14    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
15    |
16    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
17    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
18
19 error: First Pass analysis includes:
20   --> $DIR/unsafe_ptr.rs:28:6
21    |
22 LL | /      || unsafe {
23 LL | |
24 LL | |
25 LL | |         println!("{:?}", (*t.0).s);
26 LL | |
27 LL | |
28 LL | |     };
29    | |_____^
30    |
31 note: Capturing t[(0, 0),Deref,(0, 0)] -> ImmBorrow
32   --> $DIR/unsafe_ptr.rs:31:26
33    |
34 LL |         println!("{:?}", (*t.0).s);
35    |                          ^^^^^^^^
36
37 error: Min Capture analysis includes:
38   --> $DIR/unsafe_ptr.rs:28:6
39    |
40 LL | /      || unsafe {
41 LL | |
42 LL | |
43 LL | |         println!("{:?}", (*t.0).s);
44 LL | |
45 LL | |
46 LL | |     };
47    | |_____^
48    |
49 note: Min Capture t[(0, 0)] -> ImmBorrow
50   --> $DIR/unsafe_ptr.rs:31:26
51    |
52 LL |         println!("{:?}", (*t.0).s);
53    |                          ^^^^^^^^
54
55 error: First Pass analysis includes:
56   --> $DIR/unsafe_ptr.rs:48:5
57    |
58 LL | /     || {
59 LL | |
60 LL | |
61 LL | |         let x = unsafe { &mut (*p).s };
62 ...  |
63 LL | |         *x = "s".into();
64 LL | |     };
65    | |_____^
66    |
67 note: Capturing p[Deref,(0, 0)] -> ImmBorrow
68   --> $DIR/unsafe_ptr.rs:51:31
69    |
70 LL |         let x = unsafe { &mut (*p).s };
71    |                               ^^^^^^
72
73 error: Min Capture analysis includes:
74   --> $DIR/unsafe_ptr.rs:48:5
75    |
76 LL | /     || {
77 LL | |
78 LL | |
79 LL | |         let x = unsafe { &mut (*p).s };
80 ...  |
81 LL | |         *x = "s".into();
82 LL | |     };
83    | |_____^
84    |
85 note: Min Capture p[] -> ImmBorrow
86   --> $DIR/unsafe_ptr.rs:51:31
87    |
88 LL |         let x = unsafe { &mut (*p).s };
89    |                               ^^^^^^
90
91 error: aborting due to 6 previous errors
92
93 For more information about this error, try `rustc --explain E0658`.