Skip to content

Commit a8b7dc0

Browse files
committed
---
yaml --- r: 271567 b: refs/heads/auto c: 56ebf2b h: refs/heads/master i: 271565: 5ec8423 271563: d46b018 271559: 709f6b9 271551: 21975b1
1 parent e596542 commit a8b7dc0

File tree

9 files changed

+34
-10
lines changed

9 files changed

+34
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 73b4f06b83fd7a7ab4bcc9bf2ac97844f3b27df5
11+
refs/heads/auto: 56ebf2b046fd4f0b9d05a90ff1e8a38b62be0325
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/src/libstd/num/f32.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,9 +1152,10 @@ impl f32 {
11521152
#[stable(feature = "rust1", since = "1.0.0")]
11531153
#[inline]
11541154
pub fn asinh(self) -> f32 {
1155-
match self {
1156-
NEG_INFINITY => NEG_INFINITY,
1157-
x => (x + ((x * x) + 1.0).sqrt()).ln(),
1155+
if self == NEG_INFINITY {
1156+
NEG_INFINITY
1157+
} else {
1158+
(self + ((self * self) + 1.0).sqrt()).ln()
11581159
}
11591160
}
11601161

branches/auto/src/libstd/num/f64.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,9 +1023,10 @@ impl f64 {
10231023
#[stable(feature = "rust1", since = "1.0.0")]
10241024
#[inline]
10251025
pub fn asinh(self) -> f64 {
1026-
match self {
1027-
NEG_INFINITY => NEG_INFINITY,
1028-
x => (x + ((x * x) + 1.0).sqrt()).ln(),
1026+
if self == NEG_INFINITY {
1027+
NEG_INFINITY
1028+
} else {
1029+
(self + ((self * self) + 1.0).sqrt()).ln()
10291030
}
10301031
}
10311032

branches/auto/src/test/compile-fail/issue-6804.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,17 @@ fn main() { //~ ERROR compilation successful
2424
_ => {},
2525
};
2626
//~^^^ WARNING unmatchable NaN in pattern, use the is_nan method in a guard instead
27+
//~| WARNING floating point constants cannot be used
28+
//~| WARNING this was previously accepted
29+
//~| WARNING floating point constants cannot be used
30+
//~| WARNING this was previously accepted
2731
match [x, 1.0] {
2832
[NAN, _] => {},
2933
_ => {},
3034
};
3135
//~^^^ WARNING unmatchable NaN in pattern, use the is_nan method in a guard instead
36+
//~| WARNING floating point constants cannot be used
37+
//~| WARNING this was previously accepted
38+
//~| WARNING floating point constants cannot be used
39+
//~| WARNING this was previously accepted
3240
}

branches/auto/src/test/debuginfo/constant-in-match-pattern.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,18 @@
2121

2222
const CONSTANT: u64 = 3;
2323

24+
#[derive(PartialEq, Eq)]
2425
struct Struct {
2526
a: isize,
2627
b: usize,
2728
}
2829
const STRUCT: Struct = Struct { a: 1, b: 2 };
2930

31+
#[derive(PartialEq, Eq)]
3032
struct TupleStruct(u32);
3133
const TUPLE_STRUCT: TupleStruct = TupleStruct(4);
3234

35+
#[derive(PartialEq, Eq)]
3336
enum Enum {
3437
Variant1(char),
3538
Variant2 { a: u8 },

branches/auto/src/test/run-pass/associated-const-match-patterns.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use empty_struct::XEmpty2 as XFoo;
1717

1818
struct Foo;
1919

20+
#[derive(PartialEq, Eq)]
2021
enum Bar {
2122
Var1,
2223
Var2,

branches/auto/src/test/run-pass/empty-struct-braces.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ use empty_struct::*;
1818

1919
struct Empty1 {}
2020
struct Empty2;
21+
22+
#[derive(PartialEq, Eq)]
2123
struct Empty3 {}
24+
2225
const Empty3: Empty3 = Empty3 {};
2326

2427
enum E {

branches/auto/src/test/run-pass/issue-12860.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// pretty-expanded FIXME #23616
12-
1311
#![feature(collections)]
1412

1513
extern crate collections;

branches/auto/src/test/run-pass/match-arm-statics.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,24 @@
99
// except according to those terms.
1010

1111

12+
#[derive(PartialEq, Eq)]
1213
struct NewBool(bool);
1314

15+
#[derive(PartialEq, Eq)]
1416
enum Direction {
1517
North,
1618
East,
1719
South,
1820
West
1921
}
22+
23+
#[derive(PartialEq, Eq)]
2024
struct Foo {
2125
bar: Option<Direction>,
2226
baz: NewBool
2327
}
28+
29+
#[derive(PartialEq, Eq)]
2430
enum EnumWithStructVariants {
2531
Variant1(bool),
2632
Variant2 {
@@ -37,7 +43,7 @@ const VARIANT2_NORTH: EnumWithStructVariants = EnumWithStructVariants::Variant2
3743
dir: Direction::North };
3844

3945
pub mod glfw {
40-
#[derive(Copy, Clone)]
46+
#[derive(Copy, Clone, PartialEq, Eq)]
4147
pub struct InputState(usize);
4248

4349
pub const RELEASE : InputState = InputState(0);
@@ -82,13 +88,15 @@ fn issue_14576() {
8288
_ => unreachable!()
8389
}
8490

91+
#[derive(PartialEq, Eq)]
8592
enum C { D = 3, E = 4 }
8693
const F : C = C::D;
8794

8895
assert_eq!(match C::D { F => 1, _ => 2, }, 1);
8996
}
9097

9198
fn issue_13731() {
99+
#[derive(PartialEq, Eq)]
92100
enum A { AA(()) }
93101
const B: A = A::AA(());
94102

@@ -99,6 +107,7 @@ fn issue_13731() {
99107

100108
fn issue_15393() {
101109
#![allow(dead_code)]
110+
#[derive(PartialEq, Eq)]
102111
struct Flags {
103112
bits: usize
104113
}

0 commit comments

Comments
 (0)