mirror of
https://github.com/rust-lang/rust.git
synced 2026-03-14 02:12:51 +00:00
Adds `#[rustc_force_inline]` which is similar to always inlining but reports an error if the inlining was not possible, and which always attempts to inline annotated items, regardless of optimisation levels. It can only be applied to free functions to guarantee that the MIR inliner will be able to resolve calls.
22 lines
822 B
Plaintext
22 lines
822 B
Plaintext
error[E0658]: #![rustc_force_inline] forces a free function to be inlined
|
|
--> $DIR/gate.rs:4:1
|
|
|
|
|
LL | #[rustc_force_inline]
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
|
|
error[E0658]: #![rustc_force_inline] forces a free function to be inlined
|
|
--> $DIR/gate.rs:9:1
|
|
|
|
|
LL | #[rustc_force_inline = "the test requires it"]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0658`.
|