Skip to content

Commit 50baa9f

Browse files
authored
Merge pull request #547 from klensy/edition-up
2 parents efd227f + 1ac3230 commit 50baa9f

File tree

21 files changed

+40
-31
lines changed

21 files changed

+40
-31
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ readme = "README.md"
77
repository = "https://github.com/rust-lang/compiler-builtins"
88
homepage = "https://github.com/rust-lang/compiler-builtins"
99
documentation = "https://docs.rs/compiler_builtins"
10+
edition = "2018"
1011
description = """
1112
Compiler intrinsics used by the Rust compiler. Also available for other targets
1213
if necessary!

examples/intrinsics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#![allow(unused_features)]
77
#![allow(stable_features)] // bench_black_box feature is stable, leaving for backcompat
8+
#![allow(internal_features)]
89
#![cfg_attr(thumb, no_main)]
910
#![deny(dead_code)]
1011
#![feature(bench_black_box)]

src/arm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ intrinsics! {
9191
#[weak]
9292
#[cfg(not(target_os = "ios"))]
9393
pub unsafe extern "aapcs" fn __aeabi_memcpy(dest: *mut u8, src: *const u8, n: usize) {
94-
::mem::memcpy(dest, src, n);
94+
crate::mem::memcpy(dest, src, n);
9595
}
9696

9797
#[weak]
@@ -121,7 +121,7 @@ intrinsics! {
121121
#[weak]
122122
#[cfg(not(target_os = "ios"))]
123123
pub unsafe extern "aapcs" fn __aeabi_memmove(dest: *mut u8, src: *const u8, n: usize) {
124-
::mem::memmove(dest, src, n);
124+
crate::mem::memmove(dest, src, n);
125125
}
126126

127127
#[weak]
@@ -140,7 +140,7 @@ intrinsics! {
140140
#[cfg(not(target_os = "ios"))]
141141
pub unsafe extern "aapcs" fn __aeabi_memset(dest: *mut u8, n: usize, c: i32) {
142142
// Note the different argument order
143-
::mem::memset(dest, c, n);
143+
crate::mem::memset(dest, c, n);
144144
}
145145

146146
#[weak]

src/float/add.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use float::Float;
2-
use int::{CastInto, Int};
1+
use crate::float::Float;
2+
use crate::int::{CastInto, Int};
33

44
/// Returns `a + b`
55
fn add<F: Float>(a: F, b: F) -> F

src/float/cmp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![allow(unreachable_code)]
22

3-
use float::Float;
4-
use int::Int;
3+
use crate::float::Float;
4+
use crate::int::Int;
55

66
#[derive(Clone, Copy)]
77
enum Result {

src/float/div.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// `return`s makes it clear where function exit points are
33
#![allow(clippy::needless_return)]
44

5-
use float::Float;
6-
use int::{CastInto, DInt, HInt, Int};
5+
use crate::float::Float;
6+
use crate::int::{CastInto, DInt, HInt, Int};
77

88
fn div32<F: Float>(a: F, b: F) -> F
99
where

src/float/extend.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use float::Float;
2-
use int::{CastInto, Int};
1+
use crate::float::Float;
2+
use crate::int::{CastInto, Int};
33

44
/// Generic conversion from a narrower to a wider IEEE-754 floating-point type
55
fn extend<F: Float, R: Float>(a: F) -> R

src/float/mul.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use float::Float;
2-
use int::{CastInto, DInt, HInt, Int};
1+
use crate::float::Float;
2+
use crate::int::{CastInto, DInt, HInt, Int};
33

44
fn mul<F: Float>(a: F, b: F) -> F
55
where

src/float/pow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use float::Float;
2-
use int::Int;
1+
use crate::float::Float;
2+
use crate::int::Int;
33

44
/// Returns `a` raised to the power `b`
55
fn pow<F: Float>(a: F, b: i32) -> F {

src/float/sub.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use float::add::__adddf3;
2-
use float::add::__addsf3;
3-
use float::Float;
1+
use crate::float::add::__adddf3;
2+
use crate::float::add::__addsf3;
3+
use crate::float::Float;
44

55
intrinsics! {
66
#[arm_aeabi_alias = __aeabi_fsub]

0 commit comments

Comments
 (0)