diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2014-11-13 08:59:44 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2014-11-13 08:59:44 -0500 |
| commit | e5ef55675bd1f715a885729d0d40ebd43112a5fb (patch) | |
| tree | 943c478705105ea2c649de83f3096a579c6605f1 | |
| parent | f6c025013945cbd00ec4ac24b7ef1ac20db0b43a (diff) | |
| download | rust-e5ef55675bd1f715a885729d0d40ebd43112a5fb.tar.gz rust-e5ef55675bd1f715a885729d0d40ebd43112a5fb.zip | |
fix "warning: deprecated syntax, use `for` keyword now"
| -rw-r--r-- | src/librustc/metadata/decoder.rs | 12 | ||||
| -rw-r--r-- | src/librustc/middle/trans/base.rs | 4 | ||||
| -rw-r--r-- | src/librustc/middle/trans/glue.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/base.rs | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/librustc/metadata/decoder.rs b/src/librustc/metadata/decoder.rs index 2fd6e2b4787..f23e1a29c2f 100644 --- a/src/librustc/metadata/decoder.rs +++ b/src/librustc/metadata/decoder.rs @@ -630,12 +630,12 @@ pub fn get_item_path(cdata: Cmd, id: ast::NodeId) -> Vec<ast_map::PathElem> { item_path(lookup_item(id, cdata.data())) } -pub type DecodeInlinedItem<'a> = <'tcx> |cdata: Cmd, - tcx: &ty::ctxt<'tcx>, - path: Vec<ast_map::PathElem>, - par_doc: rbml::Doc|: 'a - -> Result<&'tcx ast::InlinedItem, - Vec<ast_map::PathElem>>; +pub type DecodeInlinedItem<'a> = for<'tcx> |cdata: Cmd, + tcx: &ty::ctxt<'tcx>, + path: Vec<ast_map::PathElem>, + par_doc: rbml::Doc|: 'a + -> Result<&'tcx ast::InlinedItem, + Vec<ast_map::PathElem>>; pub fn maybe_get_item_ast<'tcx>(cdata: Cmd, tcx: &ty::ctxt<'tcx>, id: ast::NodeId, decode_inlined_item: DecodeInlinedItem) diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs index 294b5f96f1c..d02c5dfa9e9 100644 --- a/src/librustc/middle/trans/base.rs +++ b/src/librustc/middle/trans/base.rs @@ -1787,8 +1787,8 @@ pub fn trans_closure(ccx: &CrateContext, abi: Abi, has_env: bool, is_unboxed_closure: IsUnboxedClosureFlag, - maybe_load_env: <'blk, 'tcx> |Block<'blk, 'tcx>, ScopeId| - -> Block<'blk, 'tcx>) { + maybe_load_env: for<'blk, 'tcx> |Block<'blk, 'tcx>, ScopeId| + -> Block<'blk, 'tcx>) { ccx.stats().n_closures.set(ccx.stats().n_closures.get() + 1); let _icx = push_ctxt("trans_closure"); diff --git a/src/librustc/middle/trans/glue.rs b/src/librustc/middle/trans/glue.rs index eb6e67efd49..0a44abb6780 100644 --- a/src/librustc/middle/trans/glue.rs +++ b/src/librustc/middle/trans/glue.rs @@ -528,8 +528,8 @@ fn declare_generic_glue(ccx: &CrateContext, t: ty::t, llfnty: Type, fn make_generic_glue(ccx: &CrateContext, t: ty::t, llfn: ValueRef, - helper: <'blk, 'tcx> |Block<'blk, 'tcx>, ValueRef, ty::t| - -> Block<'blk, 'tcx>, + helper: for<'blk, 'tcx> |Block<'blk, 'tcx>, ValueRef, ty::t| + -> Block<'blk, 'tcx>, name: &str) -> ValueRef { let _icx = push_ctxt("make_generic_glue"); diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 5401da8cd05..1e2d935af00 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -89,7 +89,7 @@ pub trait TTMacroExpander { } pub type MacroExpanderFn = - fn<'cx>(&'cx mut ExtCtxt, Span, &[ast::TokenTree]) -> Box<MacResult+'cx>; + for<'cx> fn(&'cx mut ExtCtxt, Span, &[ast::TokenTree]) -> Box<MacResult+'cx>; impl TTMacroExpander for MacroExpanderFn { fn expand<'cx>(&self, @@ -111,7 +111,7 @@ pub trait IdentMacroExpander { } pub type IdentMacroExpanderFn = - fn<'cx>(&'cx mut ExtCtxt, Span, ast::Ident, Vec<ast::TokenTree>) -> Box<MacResult+'cx>; + for<'cx> fn(&'cx mut ExtCtxt, Span, ast::Ident, Vec<ast::TokenTree>) -> Box<MacResult+'cx>; impl IdentMacroExpander for IdentMacroExpanderFn { fn expand<'cx>(&self, |
