dianne | d7d6238 | 2024-11-02 23:10:24 | [diff] [blame] | 1 | error[E0658]: use of unstable library feature `unstable` |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 2 | --> $DIR/const-unstable-intrinsic.rs:17:9 |
| 3 | | |
Ralf Jung | 10723c2 | 2024-11-01 21:19:42 | [diff] [blame] | 4 | LL | unstable_intrinsic::size_of_val(&x); |
| 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 6 | | |
| 7 | = note: see issue #42 <https://github.com/rust-lang/rust/issues/42> for more information |
| 8 | = help: add `#![feature(unstable)]` 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 | |
dianne | d7d6238 | 2024-11-02 23:10:24 | [diff] [blame] | 11 | error[E0658]: use of unstable library feature `unstable` |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 12 | --> $DIR/const-unstable-intrinsic.rs:20:9 |
| 13 | | |
Ralf Jung | 10723c2 | 2024-11-01 21:19:42 | [diff] [blame] | 14 | LL | unstable_intrinsic::min_align_of_val(&x); |
| 15 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 16 | | |
| 17 | = note: see issue #42 <https://github.com/rust-lang/rust/issues/42> for more information |
| 18 | = help: add `#![feature(unstable)]` 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 | |
Ralf Jung | e968081 | 2024-11-02 20:19:21 | [diff] [blame] | 21 | error: `size_of_val` is not yet stable as a const intrinsic |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 22 | --> $DIR/const-unstable-intrinsic.rs:17:9 |
| 23 | | |
Ralf Jung | 10723c2 | 2024-11-01 21:19:42 | [diff] [blame] | 24 | LL | unstable_intrinsic::size_of_val(&x); |
| 25 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 26 | | |
Ralf Jung | e968081 | 2024-11-02 20:19:21 | [diff] [blame] | 27 | = help: add `#![feature(unstable)]` to the crate attributes to enable |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 28 | |
| 29 | error: `min_align_of_val` is not yet stable as a const intrinsic |
| 30 | --> $DIR/const-unstable-intrinsic.rs:20:9 |
| 31 | | |
Ralf Jung | 10723c2 | 2024-11-01 21:19:42 | [diff] [blame] | 32 | LL | unstable_intrinsic::min_align_of_val(&x); |
| 33 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 34 | | |
| 35 | = help: add `#![feature(unstable)]` to the crate attributes to enable |
| 36 | |
Ralf Jung | e968081 | 2024-11-02 20:19:21 | [diff] [blame] | 37 | error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local)]` |
Ralf Jung | 10723c2 | 2024-11-01 21:19:42 | [diff] [blame] | 38 | --> $DIR/const-unstable-intrinsic.rs:24:9 |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 39 | | |
Ralf Jung | 10723c2 | 2024-11-01 21:19:42 | [diff] [blame] | 40 | LL | size_of_val(&x); |
| 41 | | ^^^^^^^^^^^^^^^ |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 42 | | |
Ralf Jung | e968081 | 2024-11-02 20:19:21 | [diff] [blame] | 43 | help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do) |
| 44 | | |
| 45 | LL + #[rustc_const_unstable(feature = "...", issue = "...")] |
| 46 | LL | const fn const_main() { |
| 47 | | |
| 48 | help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval) |
| 49 | | |
| 50 | LL + #[rustc_allow_const_fn_unstable(local)] |
| 51 | LL | const fn const_main() { |
| 52 | | |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 53 | |
Ralf Jung | 10723c2 | 2024-11-01 21:19:42 | [diff] [blame] | 54 | error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local)]` |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 55 | --> $DIR/const-unstable-intrinsic.rs:26:9 |
| 56 | | |
Ralf Jung | 10723c2 | 2024-11-01 21:19:42 | [diff] [blame] | 57 | LL | min_align_of_val(&x); |
| 58 | | ^^^^^^^^^^^^^^^^^^^^ |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 59 | | |
| 60 | help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do) |
| 61 | | |
| 62 | LL + #[rustc_const_unstable(feature = "...", issue = "...")] |
| 63 | LL | const fn const_main() { |
| 64 | | |
| 65 | help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval) |
| 66 | | |
| 67 | LL + #[rustc_allow_const_fn_unstable(local)] |
| 68 | LL | const fn const_main() { |
| 69 | | |
| 70 | |
Ralf Jung | 10723c2 | 2024-11-01 21:19:42 | [diff] [blame] | 71 | error: intrinsic `copy::copy` cannot be (indirectly) exposed to stable |
Ralf Jung | a741b33 | 2024-11-02 07:49:49 | [diff] [blame] | 72 | --> $DIR/const-unstable-intrinsic.rs:53:14 |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 73 | | |
| 74 | LL | unsafe { copy(src, dst, count) } |
| 75 | | ^^^^^^^^^^^^^^^^^^^^^ |
Ralf Jung | 10723c2 | 2024-11-01 21:19:42 | [diff] [blame] | 76 | | |
Ralf Jung | 1f0ed2b | 2024-11-01 21:53:59 | [diff] [blame] | 77 | = help: mark the caller as `#[rustc_const_unstable]`, or mark the intrinsic `#[rustc_const_stable_intrinsic]` (but this requires team approval) |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 78 | |
Ralf Jung | e968081 | 2024-11-02 20:19:21 | [diff] [blame] | 79 | error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local)]` |
Ralf Jung | a741b33 | 2024-11-02 07:49:49 | [diff] [blame] | 80 | --> $DIR/const-unstable-intrinsic.rs:61:9 |
| 81 | | |
| 82 | LL | super::size_of_val(src); |
| 83 | | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 84 | | |
Ralf Jung | e968081 | 2024-11-02 20:19:21 | [diff] [blame] | 85 | help: if the function is not (yet) meant to be exposed to stable, add `#[rustc_const_unstable]` (this is what you probably want to do) |
| 86 | | |
| 87 | LL + #[rustc_const_unstable(feature = "...", issue = "...")] |
| 88 | LL | const unsafe fn copy<T>(src: *const T, _dst: *mut T, _count: usize) { |
| 89 | | |
| 90 | help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval) |
| 91 | | |
| 92 | LL + #[rustc_allow_const_fn_unstable(local)] |
| 93 | LL | const unsafe fn copy<T>(src: *const T, _dst: *mut T, _count: usize) { |
| 94 | | |
Ralf Jung | a741b33 | 2024-11-02 07:49:49 | [diff] [blame] | 95 | |
| 96 | error: aborting due to 8 previous errors |
Ralf Jung | a0215d8 | 2024-10-06 17:59:19 | [diff] [blame] | 97 | |
| 98 | For more information about this error, try `rustc --explain E0658`. |