@@ -44,7 +44,7 @@ use rustc_serialize::{Decodable, Encodable};
44
44
use rustc_session:: lint:: LintBuffer ;
45
45
pub use rustc_session:: lint:: RegisteredTools ;
46
46
use rustc_span:: hygiene:: MacroKind ;
47
- use rustc_span:: symbol:: { kw , sym, Ident , Symbol } ;
47
+ use rustc_span:: symbol:: { sym, Ident , Symbol } ;
48
48
use rustc_span:: { ExpnId , ExpnKind , Span } ;
49
49
use rustc_target:: abi:: { Align , FieldIdx , Integer , IntegerType , VariantIdx } ;
50
50
pub use rustc_target:: abi:: { ReprFlags , ReprOptions } ;
@@ -338,14 +338,6 @@ pub struct CReaderCacheKey {
338
338
pub pos : usize ,
339
339
}
340
340
341
- impl ty:: EarlyBoundRegion {
342
- /// Does this early bound region have a name? Early bound regions normally
343
- /// always have names except when using anonymous lifetimes (`'_`).
344
- pub fn has_name ( & self ) -> bool {
345
- self . name != kw:: UnderscoreLifetime && self . name != kw:: Empty
346
- }
347
- }
348
-
349
341
#[ derive( Clone , Copy , PartialEq , Eq , Hash , TyEncodable , TyDecodable ) ]
350
342
#[ derive( HashStable , TypeFoldable , TypeVisitable , Lift ) ]
351
343
/// A clause is something that can appear in where bounds or be inferred
@@ -427,24 +419,6 @@ pub struct BoundConst<'tcx> {
427
419
pub ty : Ty < ' tcx > ,
428
420
}
429
421
430
- // FIXME(ecstaticmorse): Audit all occurrences of `without_const().to_predicate(tcx)` to ensure that
431
- // the constness of trait bounds is being propagated correctly.
432
- impl < ' tcx > PolyTraitRef < ' tcx > {
433
- #[ inline]
434
- pub fn with_constness ( self , constness : BoundConstness ) -> PolyTraitPredicate < ' tcx > {
435
- self . map_bound ( |trait_ref| ty:: TraitPredicate {
436
- trait_ref,
437
- constness,
438
- polarity : ty:: ImplPolarity :: Positive ,
439
- } )
440
- }
441
-
442
- #[ inline]
443
- pub fn without_const ( self ) -> PolyTraitPredicate < ' tcx > {
444
- self . with_constness ( BoundConstness :: NotConst )
445
- }
446
- }
447
-
448
422
#[ derive( Copy , Clone , Debug , HashStable , Encodable , Decodable ) ]
449
423
pub struct Destructor {
450
424
/// The `DefId` of the destructor method
0 commit comments