mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
fix "warning: deprecated syntax, use for
keyword now"
This commit is contained in:
parent
f6c0250139
commit
e5ef55675b
@ -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()))
|
item_path(lookup_item(id, cdata.data()))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type DecodeInlinedItem<'a> = <'tcx> |cdata: Cmd,
|
pub type DecodeInlinedItem<'a> = for<'tcx> |cdata: Cmd,
|
||||||
tcx: &ty::ctxt<'tcx>,
|
tcx: &ty::ctxt<'tcx>,
|
||||||
path: Vec<ast_map::PathElem>,
|
path: Vec<ast_map::PathElem>,
|
||||||
par_doc: rbml::Doc|: 'a
|
par_doc: rbml::Doc|: 'a
|
||||||
-> Result<&'tcx ast::InlinedItem,
|
-> Result<&'tcx ast::InlinedItem,
|
||||||
Vec<ast_map::PathElem>>;
|
Vec<ast_map::PathElem>>;
|
||||||
|
|
||||||
pub fn maybe_get_item_ast<'tcx>(cdata: Cmd, tcx: &ty::ctxt<'tcx>, id: ast::NodeId,
|
pub fn maybe_get_item_ast<'tcx>(cdata: Cmd, tcx: &ty::ctxt<'tcx>, id: ast::NodeId,
|
||||||
decode_inlined_item: DecodeInlinedItem)
|
decode_inlined_item: DecodeInlinedItem)
|
||||||
|
@ -1787,8 +1787,8 @@ pub fn trans_closure(ccx: &CrateContext,
|
|||||||
abi: Abi,
|
abi: Abi,
|
||||||
has_env: bool,
|
has_env: bool,
|
||||||
is_unboxed_closure: IsUnboxedClosureFlag,
|
is_unboxed_closure: IsUnboxedClosureFlag,
|
||||||
maybe_load_env: <'blk, 'tcx> |Block<'blk, 'tcx>, ScopeId|
|
maybe_load_env: for<'blk, 'tcx> |Block<'blk, 'tcx>, ScopeId|
|
||||||
-> Block<'blk, 'tcx>) {
|
-> Block<'blk, 'tcx>) {
|
||||||
ccx.stats().n_closures.set(ccx.stats().n_closures.get() + 1);
|
ccx.stats().n_closures.set(ccx.stats().n_closures.get() + 1);
|
||||||
|
|
||||||
let _icx = push_ctxt("trans_closure");
|
let _icx = push_ctxt("trans_closure");
|
||||||
|
@ -528,8 +528,8 @@ fn declare_generic_glue(ccx: &CrateContext, t: ty::t, llfnty: Type,
|
|||||||
fn make_generic_glue(ccx: &CrateContext,
|
fn make_generic_glue(ccx: &CrateContext,
|
||||||
t: ty::t,
|
t: ty::t,
|
||||||
llfn: ValueRef,
|
llfn: ValueRef,
|
||||||
helper: <'blk, 'tcx> |Block<'blk, 'tcx>, ValueRef, ty::t|
|
helper: for<'blk, 'tcx> |Block<'blk, 'tcx>, ValueRef, ty::t|
|
||||||
-> Block<'blk, 'tcx>,
|
-> Block<'blk, 'tcx>,
|
||||||
name: &str)
|
name: &str)
|
||||||
-> ValueRef {
|
-> ValueRef {
|
||||||
let _icx = push_ctxt("make_generic_glue");
|
let _icx = push_ctxt("make_generic_glue");
|
||||||
|
@ -89,7 +89,7 @@ pub trait TTMacroExpander {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub type MacroExpanderFn =
|
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 {
|
impl TTMacroExpander for MacroExpanderFn {
|
||||||
fn expand<'cx>(&self,
|
fn expand<'cx>(&self,
|
||||||
@ -111,7 +111,7 @@ pub trait IdentMacroExpander {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub type IdentMacroExpanderFn =
|
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 {
|
impl IdentMacroExpander for IdentMacroExpanderFn {
|
||||||
fn expand<'cx>(&self,
|
fn expand<'cx>(&self,
|
||||||
|
Loading…
Reference in New Issue
Block a user