Skip to content

Commit 46c67ed

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163801 b: refs/heads/master c: d3d707c h: refs/heads/master i: 163799: 8e8a71a v: v3
1 parent e43b02e commit 46c67ed

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,5 +1,5 @@
11
---
2-
refs/heads/master: 0dac05dd627612232403c07ca8bd6d3376eec64a
2+
refs/heads/master: d3d707c88397d8356f5181be600166ded3390907
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 8443b09e361b96d1f9b7f45a65ed0d31c0e86e70
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42

trunk/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 {

trunk/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)