blob: 8b61b0904a9c899a98e877ed003c7016eb4c37cc [file] [log] [blame]
dianned7d62382024-11-02 23:10:241error[E0658]: use of unstable library feature `unstable`
Ralf Junga0215d82024-10-06 17:59:192 --> $DIR/const-unstable-intrinsic.rs:17:9
3 |
Ralf Jung10723c22024-11-01 21:19:424LL | unstable_intrinsic::size_of_val(&x);
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ralf Junga0215d82024-10-06 17:59:196 |
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
dianned7d62382024-11-02 23:10:2411error[E0658]: use of unstable library feature `unstable`
Ralf Junga0215d82024-10-06 17:59:1912 --> $DIR/const-unstable-intrinsic.rs:20:9
13 |
Ralf Jung10723c22024-11-01 21:19:4214LL | unstable_intrinsic::min_align_of_val(&x);
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ralf Junga0215d82024-10-06 17:59:1916 |
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 Junge9680812024-11-02 20:19:2121error: `size_of_val` is not yet stable as a const intrinsic
Ralf Junga0215d82024-10-06 17:59:1922 --> $DIR/const-unstable-intrinsic.rs:17:9
23 |
Ralf Jung10723c22024-11-01 21:19:4224LL | unstable_intrinsic::size_of_val(&x);
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 |
Ralf Junge9680812024-11-02 20:19:2127 = help: add `#![feature(unstable)]` to the crate attributes to enable
Ralf Junga0215d82024-10-06 17:59:1928
29error: `min_align_of_val` is not yet stable as a const intrinsic
30 --> $DIR/const-unstable-intrinsic.rs:20:9
31 |
Ralf Jung10723c22024-11-01 21:19:4232LL | unstable_intrinsic::min_align_of_val(&x);
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ralf Junga0215d82024-10-06 17:59:1934 |
35 = help: add `#![feature(unstable)]` to the crate attributes to enable
36
Ralf Junge9680812024-11-02 20:19:2137error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local)]`
Ralf Jung10723c22024-11-01 21:19:4238 --> $DIR/const-unstable-intrinsic.rs:24:9
Ralf Junga0215d82024-10-06 17:59:1939 |
Ralf Jung10723c22024-11-01 21:19:4240LL | size_of_val(&x);
41 | ^^^^^^^^^^^^^^^
Ralf Junga0215d82024-10-06 17:59:1942 |
Ralf Junge9680812024-11-02 20:19:2143help: 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 |
45LL + #[rustc_const_unstable(feature = "...", issue = "...")]
46LL | const fn const_main() {
47 |
48help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
49 |
50LL + #[rustc_allow_const_fn_unstable(local)]
51LL | const fn const_main() {
52 |
Ralf Junga0215d82024-10-06 17:59:1953
Ralf Jung10723c22024-11-01 21:19:4254error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local)]`
Ralf Junga0215d82024-10-06 17:59:1955 --> $DIR/const-unstable-intrinsic.rs:26:9
56 |
Ralf Jung10723c22024-11-01 21:19:4257LL | min_align_of_val(&x);
58 | ^^^^^^^^^^^^^^^^^^^^
Ralf Junga0215d82024-10-06 17:59:1959 |
60help: 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 |
62LL + #[rustc_const_unstable(feature = "...", issue = "...")]
63LL | const fn const_main() {
64 |
65help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
66 |
67LL + #[rustc_allow_const_fn_unstable(local)]
68LL | const fn const_main() {
69 |
70
Ralf Jung10723c22024-11-01 21:19:4271error: intrinsic `copy::copy` cannot be (indirectly) exposed to stable
Ralf Junga741b332024-11-02 07:49:4972 --> $DIR/const-unstable-intrinsic.rs:53:14
Ralf Junga0215d82024-10-06 17:59:1973 |
74LL | unsafe { copy(src, dst, count) }
75 | ^^^^^^^^^^^^^^^^^^^^^
Ralf Jung10723c22024-11-01 21:19:4276 |
Ralf Jung1f0ed2b2024-11-01 21:53:5977 = help: mark the caller as `#[rustc_const_unstable]`, or mark the intrinsic `#[rustc_const_stable_intrinsic]` (but this requires team approval)
Ralf Junga0215d82024-10-06 17:59:1978
Ralf Junge9680812024-11-02 20:19:2179error: const function that might be (indirectly) exposed to stable cannot use `#[feature(local)]`
Ralf Junga741b332024-11-02 07:49:4980 --> $DIR/const-unstable-intrinsic.rs:61:9
81 |
82LL | super::size_of_val(src);
83 | ^^^^^^^^^^^^^^^^^^^^^^^
84 |
Ralf Junge9680812024-11-02 20:19:2185help: 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 |
87LL + #[rustc_const_unstable(feature = "...", issue = "...")]
88LL | const unsafe fn copy<T>(src: *const T, _dst: *mut T, _count: usize) {
89 |
90help: otherwise, as a last resort `#[rustc_allow_const_fn_unstable]` can be used to bypass stability checks (this requires team approval)
91 |
92LL + #[rustc_allow_const_fn_unstable(local)]
93LL | const unsafe fn copy<T>(src: *const T, _dst: *mut T, _count: usize) {
94 |
Ralf Junga741b332024-11-02 07:49:4995
96error: aborting due to 8 previous errors
Ralf Junga0215d82024-10-06 17:59:1997
98For more information about this error, try `rustc --explain E0658`.