We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents efd227f + 1ac3230 commit 50baa9fCopy full SHA for 50baa9f
Cargo.toml
@@ -7,6 +7,7 @@ readme = "README.md"
7
repository = "https://github.com/rust-lang/compiler-builtins"
8
homepage = "https://github.com/rust-lang/compiler-builtins"
9
documentation = "https://docs.rs/compiler_builtins"
10
+edition = "2018"
11
description = """
12
Compiler intrinsics used by the Rust compiler. Also available for other targets
13
if necessary!
examples/intrinsics.rs
@@ -5,6 +5,7 @@
5
6
#![allow(unused_features)]
#![allow(stable_features)] // bench_black_box feature is stable, leaving for backcompat
+#![allow(internal_features)]
#![cfg_attr(thumb, no_main)]
#![deny(dead_code)]
#![feature(bench_black_box)]
src/arm.rs
@@ -91,7 +91,7 @@ intrinsics! {
91
#[weak]
92
#[cfg(not(target_os = "ios"))]
93
pub unsafe extern "aapcs" fn __aeabi_memcpy(dest: *mut u8, src: *const u8, n: usize) {
94
- ::mem::memcpy(dest, src, n);
+ crate::mem::memcpy(dest, src, n);
95
}
96
97
@@ -121,7 +121,7 @@ intrinsics! {
121
122
123
pub unsafe extern "aapcs" fn __aeabi_memmove(dest: *mut u8, src: *const u8, n: usize) {
124
- ::mem::memmove(dest, src, n);
+ crate::mem::memmove(dest, src, n);
125
126
127
@@ -140,7 +140,7 @@ intrinsics! {
140
141
pub unsafe extern "aapcs" fn __aeabi_memset(dest: *mut u8, n: usize, c: i32) {
142
// Note the different argument order
143
- ::mem::memset(dest, c, n);
+ crate::mem::memset(dest, c, n);
144
145
146
src/float/add.rs
@@ -1,5 +1,5 @@
1
-use float::Float;
2
-use int::{CastInto, Int};
+use crate::float::Float;
+use crate::int::{CastInto, Int};
3
4
/// Returns `a + b`
fn add<F: Float>(a: F, b: F) -> F
src/float/cmp.rs
@@ -1,7 +1,7 @@
#![allow(unreachable_code)]
-use int::Int;
+use crate::int::Int;
#[derive(Clone, Copy)]
enum Result {
src/float/div.rs
@@ -2,8 +2,8 @@
// `return`s makes it clear where function exit points are
#![allow(clippy::needless_return)]
-use int::{CastInto, DInt, HInt, Int};
+use crate::int::{CastInto, DInt, HInt, Int};
fn div32<F: Float>(a: F, b: F) -> F
where
src/float/extend.rs
/// Generic conversion from a narrower to a wider IEEE-754 floating-point type
fn extend<F: Float, R: Float>(a: F) -> R
src/float/mul.rs
fn mul<F: Float>(a: F, b: F) -> F
src/float/pow.rs
/// Returns `a` raised to the power `b`
fn pow<F: Float>(a: F, b: i32) -> F {
src/float/sub.rs
@@ -1,6 +1,6 @@
-use float::add::__adddf3;
-use float::add::__addsf3;
+use crate::float::add::__adddf3;
+use crate::float::add::__addsf3;
intrinsics! {
#[arm_aeabi_alias = __aeabi_fsub]
0 commit comments