Skip to content

Commit b52a7d5

Browse files
committed
---
yaml --- r: 168715 b: refs/heads/snap-stage3 c: ecd9c10 h: refs/heads/master i: 168713: ad09137 168711: 7f26472 v: v3
1 parent bab807e commit b52a7d5

File tree

5 files changed

+386
-340
lines changed

5 files changed

+386
-340
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 5e21e17d9638d14af41e27e5ca9a21c8a1bc0170
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 7474be066022d2cd0b0695a466651570c00f3700
4+
refs/heads/snap-stage3: ecd9c10e1aa88f2ec3251c33903d9c2622b0bf37
55
refs/heads/try: 5204084bd2e46af7cc6e0147430e44dd0d657bbb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/librustc/middle/def.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ impl TraitItemKind {
126126
}
127127

128128
impl Def {
129+
pub fn local_node_id(&self) -> ast::NodeId {
130+
let def_id = self.def_id();
131+
assert_eq!(def_id.krate, ast::LOCAL_CRATE);
132+
def_id.node
133+
}
134+
129135
pub fn def_id(&self) -> ast::DefId {
130136
match *self {
131137
DefFn(id, _) | DefStaticMethod(id, _) | DefMod(id) |

branches/snap-stage3/src/librustc_typeck/check/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ pub mod regionmanip;
130130
pub mod regionck;
131131
pub mod demand;
132132
pub mod method;
133+
mod upvar;
133134
pub mod wf;
134135
mod closure;
135136
mod callee;
@@ -482,6 +483,7 @@ fn check_bare_fn<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
482483
decl, id, body, &inh);
483484

484485
vtable::select_all_fcx_obligations_or_error(&fcx);
486+
upvar::closure_analyze_fn(&fcx, id, decl, body);
485487
regionck::regionck_fn(&fcx, id, decl, body);
486488
writeback::resolve_type_vars_in_fn(&fcx, decl, body);
487489
}

0 commit comments

Comments
 (0)