Skip to content

Commit 420e176

Browse files
committed
---
yaml --- r: 67285 b: refs/heads/master c: ce1db94 h: refs/heads/master i: 67283: 79f8d16 v: v3
1 parent afad18c commit 420e176

File tree

4 files changed

+2
-46
lines changed

4 files changed

+2
-46
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: fdd71bece23b3d6776ca86336749e50560617a56
2+
refs/heads/master: ce1db94647fc82e0625a74fbf9670a7517aba996
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/librustc/middle/check_match.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
use middle::const_eval::{compare_const_vals, lookup_const_by_id};
13-
use middle::const_eval::{eval_const_expr, const_val, const_bool, const_float};
13+
use middle::const_eval::{eval_const_expr, const_val, const_bool};
1414
use middle::pat_util::*;
1515
use middle::ty::*;
1616
use middle::ty;
@@ -102,27 +102,6 @@ pub fn check_arms(cx: &MatchCheckCtxt, arms: &[arm]) {
102102
let mut seen = ~[];
103103
for arms.iter().advance |arm| {
104104
for arm.pats.iter().advance |pat| {
105-
106-
// Check that we do not match against a static NaN (#6804)
107-
let pat_matches_nan: &fn(@pat) -> bool = |p| {
108-
match cx.tcx.def_map.find(&p.id) {
109-
Some(&def_static(did, false)) => {
110-
let const_expr = lookup_const_by_id(cx.tcx, did).get();
111-
match eval_const_expr(cx.tcx, const_expr) {
112-
const_float(f) if f.is_NaN() => true,
113-
_ => false
114-
}
115-
}
116-
_ => false
117-
}
118-
};
119-
for walk_pat(*pat) |p| {
120-
if pat_matches_nan(p) {
121-
cx.tcx.sess.span_warn(p.span, "unmatchable NaN in pattern, \
122-
use is_NaN() in a guard instead");
123-
}
124-
}
125-
126105
let v = ~[*pat];
127106
match is_useful(cx, &seen, v) {
128107
not_useful => {

trunk/src/rt/rust_task.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ cleanup_task(cleanup_args *args) {
152152
#endif
153153
}
154154

155-
extern "C" CDECL void upcall_exchange_free(void *ptr);
156-
157155
// This runs on the Rust stack
158156
void task_start_wrapper(spawn_args *a)
159157
{

trunk/src/test/compile-fail/issue-6804.rs

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

0 commit comments

Comments
 (0)