Skip to content

Commit ad0eaf6

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163317 b: refs/heads/snap-stage3 c: d3d707c h: refs/heads/master i: 163315: 2391c60 v: v3
1 parent ede43a1 commit ad0eaf6

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
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: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 0dac05dd627612232403c07ca8bd6d3376eec64a
4+
refs/heads/snap-stage3: d3d707c88397d8356f5181be600166ded3390907
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4916,7 +4916,9 @@ pub fn has_dtor(cx: &ctxt, struct_id: DefId) -> bool {
49164916
cx.destructor_for_type.borrow().contains_key(&struct_id)
49174917
}
49184918

4919-
pub fn with_path<T>(cx: &ctxt, id: ast::DefId, f: |ast_map::PathElems| -> T) -> T {
4919+
pub fn with_path<T, F>(cx: &ctxt, id: ast::DefId, f: F) -> T where
4920+
F: FnOnce(ast_map::PathElems) -> T,
4921+
{
49204922
if id.krate == ast::LOCAL_CRATE {
49214923
cx.map.with_path(id.node, f)
49224924
} else {

branches/snap-stage3/src/librustc/session/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ pub fn build_session_(sopts: config::Options,
288288
}
289289

290290
// Seems out of place, but it uses session, so I'm putting it here
291-
pub fn expect<T>(sess: &Session, opt: Option<T>, msg: || -> String) -> T {
291+
pub fn expect<T, M>(sess: &Session, opt: Option<T>, msg: M) -> T where
292+
M: FnOnce() -> String,
293+
{
292294
diagnostic::expect(sess.diagnostic(), opt, msg)
293295
}
294296

0 commit comments

Comments
 (0)