@@ -85,7 +85,7 @@ use std::collections::{HashMap, HashSet};
85
85
use syntax:: abi;
86
86
use syntax:: ast:: { CrateNum , DefId , ItemImpl , ItemTrait , LOCAL_CRATE } ;
87
87
use syntax:: ast:: { MutImmutable , MutMutable , Name , NamedField , NodeId } ;
88
- use syntax:: ast:: { StmtExpr , StmtSemi , StructField , UnnamedField , Visibility } ;
88
+ use syntax:: ast:: { StructField , UnnamedField , Visibility } ;
89
89
use syntax:: ast_util:: { self , is_local, local_def} ;
90
90
use syntax:: attr:: { self , AttrMetaMethods , SignedInt , UnsignedInt } ;
91
91
use syntax:: codemap:: Span ;
@@ -1840,13 +1840,6 @@ pub enum BuiltinBound {
1840
1840
Sync ,
1841
1841
}
1842
1842
1843
- /// An existential bound that does not implement any traits.
1844
- pub fn region_existential_bound < ' tcx > ( r : ty:: Region ) -> ExistentialBounds < ' tcx > {
1845
- ty:: ExistentialBounds { region_bound : r,
1846
- builtin_bounds : BuiltinBounds :: empty ( ) ,
1847
- projection_bounds : Vec :: new ( ) }
1848
- }
1849
-
1850
1843
impl CLike for BuiltinBound {
1851
1844
fn to_usize ( & self ) -> usize {
1852
1845
* self as usize
@@ -5004,15 +4997,6 @@ pub fn expr_is_lval(tcx: &ctxt, expr: &ast::Expr) -> bool {
5004
4997
}
5005
4998
}
5006
4999
5007
- pub fn stmt_node_id ( s : & ast:: Stmt ) -> ast:: NodeId {
5008
- match s. node {
5009
- ast:: StmtDecl ( _, id) | StmtExpr ( _, id) | StmtSemi ( _, id) => {
5010
- return id;
5011
- }
5012
- ast:: StmtMac ( ..) => panic ! ( "unexpanded macro in trans" )
5013
- }
5014
- }
5015
-
5016
5000
pub fn field_idx_strict ( tcx : & ctxt , name : ast:: Name , fields : & [ field ] )
5017
5001
-> usize {
5018
5002
let mut i = 0 ;
@@ -5025,11 +5009,6 @@ pub fn field_idx_strict(tcx: &ctxt, name: ast::Name, fields: &[field])
5025
5009
. collect:: <Vec <String >>( ) ) ) ;
5026
5010
}
5027
5011
5028
- pub fn impl_or_trait_item_idx ( id : ast:: Name , trait_items : & [ ImplOrTraitItem ] )
5029
- -> Option < usize > {
5030
- trait_items. iter ( ) . position ( |m| m. name ( ) == id)
5031
- }
5032
-
5033
5012
pub fn ty_sort_string ( cx : & ctxt , ty : Ty ) -> String {
5034
5013
match ty. sty {
5035
5014
TyBool | TyChar | TyInt ( _) |
0 commit comments