Skip to content

Commit 899736a

Browse files
committed
update docs
- src\doc\nomicon\src\ffi.md should also have its ABI list updated
1 parent ec5f6e4 commit 899736a

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

crates/ide/src/hover/tests.rs

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6945,9 +6945,8 @@ fn hover_feature() {
69456945
Various intrinsics have native MIR operations that they correspond to. Instead of requiring
69466946
backends to implement both the intrinsic and the MIR operation, the `lower_intrinsics` pass
69476947
will convert the calls to the MIR operation. Backends do not need to know about these intrinsics
6948-
at all. These intrinsics only make sense without a body, and can either be declared as a "rust-intrinsic"
6949-
or as a `#[rustc_intrinsic]`. The body is never used, as calls to the intrinsic do not exist
6950-
anymore after MIR analyses.
6948+
at all. These intrinsics only make sense without a body, and can be as a `#[rustc_intrinsic]`.
6949+
The body is never used, as calls to the intrinsic do not exist anymore after MIR analyses.
69516950
69526951
## Intrinsics without fallback logic
69536952
@@ -6960,29 +6959,6 @@ fn hover_feature() {
69606959
`#[rustc_intrinsic_must_be_overridden]` to the function to ensure that backends don't
69616960
invoke the body.
69626961
6963-
### Legacy extern ABI based intrinsics
6964-
6965-
These are imported as if they were FFI functions, with the special
6966-
`rust-intrinsic` ABI. For example, if one was in a freestanding
6967-
context, but wished to be able to `transmute` between types, and
6968-
perform efficient pointer arithmetic, one would import those functions
6969-
via a declaration like
6970-
6971-
```rust
6972-
#![feature(intrinsics)]
6973-
#![allow(internal_features)]
6974-
# fn main() {}
6975-
6976-
extern "rust-intrinsic" {
6977-
fn transmute<T, U>(x: T) -> U;
6978-
6979-
fn arith_offset<T>(dst: *const T, offset: isize) -> *const T;
6980-
}
6981-
```
6982-
6983-
As with any other FFI functions, these are by default always `unsafe` to call.
6984-
You can add `#[rustc_safe_intrinsic]` to the intrinsic to make it safe to call.
6985-
69866962
"#]],
69876963
)
69886964
}

0 commit comments

Comments
 (0)