]> git.proxmox.com Git - rustc.git/blob - src/test/ui/closures/2229_closure_analysis/unsafe_ptr.stderr
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / closures / 2229_closure_analysis / unsafe_ptr.stderr
1 error[E0658]: attributes on expressions are experimental
2 --> $DIR/unsafe_ptr.rs:26: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:46: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 warning: the feature `capture_disjoint_fields` is incomplete and may not be safe to use and/or cause compiler crashes
20 --> $DIR/unsafe_ptr.rs:4:12
21 |
22 LL | #![feature(capture_disjoint_fields)]
23 | ^^^^^^^^^^^^^^^^^^^^^^^
24 |
25 = note: `#[warn(incomplete_features)]` on by default
26 = note: see issue #53488 <https://github.com/rust-lang/rust/issues/53488> for more information
27
28 error: First Pass analysis includes:
29 --> $DIR/unsafe_ptr.rs:29:6
30 |
31 LL | / || unsafe {
32 LL | |
33 LL | |
34 LL | | println!("{:?}", (*t.0).s);
35 LL | |
36 LL | |
37 LL | | };
38 | |_____^
39 |
40 note: Capturing t[(0, 0),Deref,(0, 0)] -> ImmBorrow
41 --> $DIR/unsafe_ptr.rs:32:26
42 |
43 LL | println!("{:?}", (*t.0).s);
44 | ^^^^^^^^
45
46 error: Min Capture analysis includes:
47 --> $DIR/unsafe_ptr.rs:29:6
48 |
49 LL | / || unsafe {
50 LL | |
51 LL | |
52 LL | | println!("{:?}", (*t.0).s);
53 LL | |
54 LL | |
55 LL | | };
56 | |_____^
57 |
58 note: Min Capture t[(0, 0)] -> ImmBorrow
59 --> $DIR/unsafe_ptr.rs:32:26
60 |
61 LL | println!("{:?}", (*t.0).s);
62 | ^^^^^^^^
63
64 error: First Pass analysis includes:
65 --> $DIR/unsafe_ptr.rs:49:5
66 |
67 LL | / || {
68 LL | |
69 LL | |
70 LL | | let x = unsafe { &mut (*p).s };
71 ... |
72 LL | | *x = "s".into();
73 LL | | };
74 | |_____^
75 |
76 note: Capturing p[Deref,(0, 0)] -> ImmBorrow
77 --> $DIR/unsafe_ptr.rs:52:31
78 |
79 LL | let x = unsafe { &mut (*p).s };
80 | ^^^^^^
81
82 error: Min Capture analysis includes:
83 --> $DIR/unsafe_ptr.rs:49:5
84 |
85 LL | / || {
86 LL | |
87 LL | |
88 LL | | let x = unsafe { &mut (*p).s };
89 ... |
90 LL | | *x = "s".into();
91 LL | | };
92 | |_____^
93 |
94 note: Min Capture p[] -> ImmBorrow
95 --> $DIR/unsafe_ptr.rs:52:31
96 |
97 LL | let x = unsafe { &mut (*p).s };
98 | ^^^^^^
99
100 error: aborting due to 6 previous errors; 1 warning emitted
101
102 For more information about this error, try `rustc --explain E0658`.