Skip to content

Commit 621b564

Browse files
committed
---
yaml --- r: 80774 b: refs/heads/try c: 3d469c2 h: refs/heads/master v: v3
1 parent 12b9bfb commit 621b564

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
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: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cbd1eefbd350797b783df119fed7956d7e1c74ad
5-
refs/heads/try: f853f0b2d65aef97fb88d569d5636eaeae6bb369
5+
refs/heads/try: 3d469c25e5ecf8dbacb59f714bafd9a92d676852
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/trans/base.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ use syntax::parse::token::{special_idents};
8787
use syntax::print::pprust::stmt_to_str;
8888
use syntax::{ast, ast_util, codemap, ast_map};
8989
use syntax::abi::{X86, X86_64, Arm, Mips};
90+
use syntax::visit;
9091
use syntax::visit::Visitor;
9192

9293
pub use middle::trans::context::task_llcx;
@@ -2239,6 +2240,14 @@ pub fn trans_item(ccx: @mut CrateContext, item: &ast::item) {
22392240
trans_struct_def(ccx, struct_def);
22402241
}
22412242
}
2243+
ast::item_trait(*) => {
2244+
// Inside of this trait definition, we won't be actually translating any
2245+
// functions, but the trait still needs to be walked. Otherwise default
2246+
// methods with items will not get translated and will cause ICE's when
2247+
// metadata time comes around.
2248+
let mut v = TransItemVisitor;
2249+
visit::walk_item(&mut v, item, ccx);
2250+
}
22422251
_ => {/* fall through */ }
22432252
}
22442253
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
#[crate_type = "lib"];
12+
13+
pub trait X {
14+
fn x() {
15+
fn f() { }
16+
f();
17+
}
18+
}
19+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
// xfail-fast windows doesn't like aux-build
12+
// aux-build:issue_9123.rs
13+
14+
extern mod issue_9123;
15+
16+
pub fn main() {}

0 commit comments

Comments
 (0)