Skip to content

Commit b8a7d24

Browse files
committed
---
yaml --- r: 47097 b: refs/heads/try c: 24603af h: refs/heads/master i: 47095: a70e797 v: v3
1 parent d45ed25 commit b8a7d24

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3bbcac322669cff3abde5be937cc4ec3860f3985
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
5-
refs/heads/try: dc30cc356b2f6a75a3313be564927d2a74718f07
5+
refs/heads/try: 24603afc937e3135ff10ca17c6f20dff9957eb4a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libcore/os.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ pub fn self_exe_path() -> Option<Path> {
374374
let mib = ~[CTL_KERN as c_int,
375375
KERN_PROC as c_int,
376376
KERN_PROC_PATHNAME as c_int, -1 as c_int];
377-
let mut sz = sz;
378377
sysctl(vec::raw::to_ptr(mib), vec::len(mib) as c_uint,
379378
buf as *mut c_void, &mut sz, ptr::null(),
380379
0u as size_t) == (0 as c_int)

branches/try/src/librustc/middle/typeck/check/_match.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ pub fn check_pat(pcx: pat_ctxt, pat: @ast::pat, expected: ty::t) {
362362
ast::pat_ident(*) if pat_is_const(tcx.def_map, pat) => {
363363
let const_did = ast_util::def_id_of_def(tcx.def_map.get(&pat.id));
364364
let const_tpt = ty::lookup_item_type(tcx, const_did);
365+
demand::suptype(fcx, pat.span, expected, const_tpt.ty);
365366
fcx.write_ty(pat.id, const_tpt.ty);
366367
}
367368
ast::pat_ident(bm, name, sub) if pat_is_binding(tcx.def_map, pat) => {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// Regression test for issue #4968
12+
13+
const A: (int,int) = (4,2);
14+
fn main() {
15+
match 42 { A => () } //~ ERROR mismatched types: expected `<VI0>` but found `(int,int)` (expected integral variable but found tuple)
16+
}
17+

0 commit comments

Comments
 (0)