|
| 1 | +error[E0658]: use of unstable library feature `contracts` |
| 2 | + --> $DIR/ice-fuzzy-provenance-casts-with-inner-attr.rs:14:4 |
| 3 | + | |
| 4 | +LL | #![core::contracts::ensures(|ret| ret.is_none_or(Stars::is_valid))] |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = note: see issue #128044 <https://github.com/rust-lang/rust/issues/128044> for more information |
| 8 | + = help: add `#![feature(contracts)]` to the crate attributes to enable |
| 9 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 10 | + |
| 11 | +error[E0658]: inner macro attributes are unstable |
| 12 | + --> $DIR/ice-fuzzy-provenance-casts-with-inner-attr.rs:14:4 |
| 13 | + | |
| 14 | +LL | #![core::contracts::ensures(|ret| ret.is_none_or(Stars::is_valid))] |
| 15 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 16 | + | |
| 17 | + = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information |
| 18 | + = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable |
| 19 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 20 | + |
| 21 | +error[E0433]: too many leading `super` keywords |
| 22 | + --> $DIR/ice-fuzzy-provenance-casts-with-inner-attr.rs:9:1 |
| 23 | + | |
| 24 | +LL | / #![feature(strict_provenance_lints)] |
| 25 | +... | |
| 26 | +LL | | } |
| 27 | + | |_^ there are too many leading `super` keywords |
| 28 | + |
| 29 | +error[E0425]: cannot find type `Ts` in this scope |
| 30 | + --> $DIR/ice-fuzzy-provenance-casts-with-inner-attr.rs:9:1 |
| 31 | + | |
| 32 | +LL | / #![feature(strict_provenance_lints)] |
| 33 | +... | |
| 34 | +LL | | } |
| 35 | + | |_^ not found in this scope |
| 36 | + |
| 37 | +error[E0658]: `#[prelude_import]` is for use by rustc only |
| 38 | + --> $DIR/ice-fuzzy-provenance-casts-with-inner-attr.rs:9:1 |
| 39 | + | |
| 40 | +LL | / #![feature(strict_provenance_lints)] |
| 41 | +... | |
| 42 | +LL | | } |
| 43 | + | |_^ |
| 44 | + | |
| 45 | + = help: add `#![feature(prelude_import)]` to the crate attributes to enable |
| 46 | + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |
| 47 | + |
| 48 | +error[E0601]: `main` function not found in crate `ice_fuzzy_provenance_casts_with_inner_attr` |
| 49 | + --> $DIR/ice-fuzzy-provenance-casts-with-inner-attr.rs:23:2 |
| 50 | + | |
| 51 | +LL | } |
| 52 | + | ^ consider adding a `main` function to `$DIR/ice-fuzzy-provenance-casts-with-inner-attr.rs` |
| 53 | + |
| 54 | +error[E0433]: cannot find type `Stars` in this scope |
| 55 | + --> $DIR/ice-fuzzy-provenance-casts-with-inner-attr.rs:14:50 |
| 56 | + | |
| 57 | +LL | #![core::contracts::ensures(|ret| ret.is_none_or(Stars::is_valid))] |
| 58 | + | ^^^^^ use of undeclared type `Stars` |
| 59 | + |
| 60 | +warning: strict provenance disallows casting integer `usize` to pointer `*const u32` |
| 61 | + --> $DIR/ice-fuzzy-provenance-casts-with-inner-attr.rs:9:1 |
| 62 | + | |
| 63 | +LL | / #![feature(strict_provenance_lints)] |
| 64 | +... | |
| 65 | +LL | | } |
| 66 | + | |_^ |
| 67 | + | |
| 68 | + = help: if you can't comply with strict provenance and don't have a pointer with the correct provenance you can use `std::ptr::with_exposed_provenance()` instead |
| 69 | + = note: requested on the command line with `-W fuzzy-provenance-casts` |
| 70 | +help: use `.with_addr()` to adjust a valid pointer in the same allocation, to this address |
| 71 | + | |
| 72 | +LL - #![feature(strict_provenance_lints)] |
| 73 | +LL - |
| 74 | +LL - |
| 75 | +LL - |
| 76 | +LL - |
| 77 | +LL - #![core::contracts::ensures(|ret| ret.is_none_or(Stars::is_valid))] |
| 78 | +LL - |
| 79 | +LL - |
| 80 | +LL - |
| 81 | +LL - |
| 82 | +LL - pub(super) fn foo() -> *const Ts { |
| 83 | +LL - unsafe { |
| 84 | +LL - let p2 = 0x52 as *const u32; |
| 85 | +LL - } |
| 86 | +LL - } |
| 87 | +LL + (...).with_addr() |
| 88 | + | |
| 89 | + |
| 90 | +error: aborting due to 7 previous errors; 1 warning emitted |
| 91 | + |
| 92 | +Some errors have detailed explanations: E0425, E0433, E0601, E0658. |
| 93 | +For more information about an error, try `rustc --explain E0425`. |
0 commit comments