Skip to content

Commit 69247ad

Browse files
committed
Assume const fn support
1 parent ccbbf7d commit 69247ad

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ name = "num-complex"
1010
repository = "https://github.com/rust-num/num-complex"
1111
version = "0.3.0-pre"
1212
readme = "README.md"
13-
build = "build.rs"
1413
exclude = ["/ci/*", "/.travis.yml", "/bors.toml"]
1514
publish = false
1615

@@ -37,6 +36,3 @@ default-features = false
3736
[features]
3837
default = ["std"]
3938
std = ["num-traits/std"]
40-
41-
[build-dependencies]
42-
autocfg = "1"

build.rs

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/lib.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,11 @@ pub type Complex32 = Complex<f32>;
9393
pub type Complex64 = Complex<f64>;
9494

9595
impl<T> Complex<T> {
96-
#[cfg(has_const_fn)]
9796
/// Create a new Complex
9897
#[inline]
9998
pub const fn new(re: T, im: T) -> Self {
10099
Complex { re: re, im: im }
101100
}
102-
103-
#[cfg(not(has_const_fn))]
104-
/// Create a new Complex
105-
#[inline]
106-
pub fn new(re: T, im: T) -> Self {
107-
Complex { re: re, im: im }
108-
}
109101
}
110102

111103
impl<T: Clone + Num> Complex<T> {
@@ -2647,7 +2639,6 @@ mod test {
26472639
assert!(c.is_one());
26482640
}
26492641

2650-
#[cfg(has_const_fn)]
26512642
#[test]
26522643
fn test_const() {
26532644
const R: f64 = 12.3;

0 commit comments

Comments
 (0)