rust/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

96 lines
2.5 KiB
Plaintext
Raw Normal View History

2020-12-14 08:09:17 +00:00
error[E0658]: attributes on expressions are experimental
2021-06-27 06:22:46 +00:00
--> $DIR/unsafe_ptr.rs:25:13
2020-12-14 08:09:17 +00:00
|
LL | let c = #[rustc_capture_analysis]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
= help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
2024-01-10 06:39:02 +00:00
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2020-12-14 08:09:17 +00:00
error[E0658]: attributes on expressions are experimental
2024-01-10 06:39:02 +00:00
--> $DIR/unsafe_ptr.rs:46:13
2020-12-14 08:09:17 +00:00
|
LL | let c = #[rustc_capture_analysis]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
= help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
2024-01-10 06:39:02 +00:00
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2020-12-14 08:09:17 +00:00
error: First Pass analysis includes:
2024-01-10 06:39:02 +00:00
--> $DIR/unsafe_ptr.rs:29:6
2020-12-14 08:09:17 +00:00
|
LL | / || unsafe {
LL | |
LL | |
LL | | println!("{:?}", (*t.0).s);
LL | |
LL | |
LL | | };
| |_____^
|
note: Capturing t[(0, 0),Deref,(0, 0)] -> ImmBorrow
2024-01-10 06:39:02 +00:00
--> $DIR/unsafe_ptr.rs:32:26
2020-12-14 08:09:17 +00:00
|
LL | println!("{:?}", (*t.0).s);
| ^^^^^^^^
error: Min Capture analysis includes:
2024-01-10 06:39:02 +00:00
--> $DIR/unsafe_ptr.rs:29:6
2020-12-14 08:09:17 +00:00
|
LL | / || unsafe {
LL | |
LL | |
LL | | println!("{:?}", (*t.0).s);
LL | |
LL | |
LL | | };
| |_____^
|
note: Min Capture t[(0, 0)] -> ImmBorrow
2024-01-10 06:39:02 +00:00
--> $DIR/unsafe_ptr.rs:32:26
2020-12-14 08:09:17 +00:00
|
LL | println!("{:?}", (*t.0).s);
| ^^^^^^^^
error: First Pass analysis includes:
2024-01-10 06:39:02 +00:00
--> $DIR/unsafe_ptr.rs:50:5
2020-12-14 08:09:17 +00:00
|
LL | / || {
LL | |
LL | |
LL | | let x = unsafe { &mut (*p).s };
... |
LL | | *x = "s".into();
LL | | };
| |_____^
|
note: Capturing p[Deref,(0, 0)] -> ImmBorrow
2024-01-10 06:39:02 +00:00
--> $DIR/unsafe_ptr.rs:53:31
2020-12-14 08:09:17 +00:00
|
LL | let x = unsafe { &mut (*p).s };
| ^^^^^^
error: Min Capture analysis includes:
2024-01-10 06:39:02 +00:00
--> $DIR/unsafe_ptr.rs:50:5
2020-12-14 08:09:17 +00:00
|
LL | / || {
LL | |
LL | |
LL | | let x = unsafe { &mut (*p).s };
... |
LL | | *x = "s".into();
LL | | };
| |_____^
|
note: Min Capture p[] -> ImmBorrow
2024-01-10 06:39:02 +00:00
--> $DIR/unsafe_ptr.rs:53:31
2020-12-14 08:09:17 +00:00
|
LL | let x = unsafe { &mut (*p).s };
| ^^^^^^
2021-06-27 06:22:46 +00:00
error: aborting due to 6 previous errors
2020-12-14 08:09:17 +00:00
For more information about this error, try `rustc --explain E0658`.