Skip to content

Commit 649eab7

Browse files
committed
WIP -- Pacify the mercilous tidy.
1 parent 00f6f0c commit 649eab7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/librustc/middle/traits/fulfill.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,6 @@ fn process_predicate<'a,'tcx>(selcx: &mut SelectionContext<'a,'tcx>,
361361
// regions. If there are, we will call this obligation an
362362
// error. Eventually we should be able to support some
363363
// cases here, I imagine (e.g., `for<'a> &'a int : 'a`).
364-
//
365-
// TODO This is overly conservative, but good enough for
366-
// now.
367364
if ty::count_late_bound_regions(selcx.tcx(), binder) != 0 {
368365
errors.push(
369366
FulfillmentError::new(

src/librustc/middle/ty.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ pub enum sty<'tcx> {
13081308
#[deriving(Clone, PartialEq, Eq, Hash, Show)]
13091309
pub struct TyTrait<'tcx> {
13101310
// Principal trait reference.
1311-
pub principal: PolyTraitRef<'tcx>, // would use Rc<TraitRef>, but it runs afoul of some static rules
1311+
pub principal: PolyTraitRef<'tcx>,
13121312
pub bounds: ExistentialBounds
13131313
}
13141314

@@ -1317,7 +1317,9 @@ impl<'tcx> TyTrait<'tcx> {
13171317
/// we convert the principal trait-ref into a normal trait-ref,
13181318
/// you must give *some* self-type. A common choice is `mk_err()`
13191319
/// or some skolemized type.
1320-
pub fn principal_trait_ref_with_self_ty(&self, self_ty: Ty<'tcx>) -> Rc<ty::PolyTraitRef<'tcx>> {
1320+
pub fn principal_trait_ref_with_self_ty(&self, self_ty: Ty<'tcx>)
1321+
-> Rc<ty::PolyTraitRef<'tcx>>
1322+
{
13211323
Rc::new(ty::Binder(ty::TraitRef {
13221324
def_id: self.principal.def_id(),
13231325
substs: self.principal.substs().with_self_ty(self_ty),

src/librustc_typeck/astconv.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,8 @@ pub fn instantiate_poly_trait_ref<'tcx,AC,RS>(
524524
-> Rc<ty::PolyTraitRef<'tcx>>
525525
where AC: AstConv<'tcx>, RS: RegionScope
526526
{
527-
let trait_ref = instantiate_trait_ref(this, rscope, &ast_trait_ref.trait_ref, self_ty, allow_eq);
527+
let trait_ref =
528+
instantiate_trait_ref(this, rscope, &ast_trait_ref.trait_ref, self_ty, allow_eq);
528529
let trait_ref = (*trait_ref).clone();
529530
Rc::new(ty::Binder(trait_ref)) // Ugh.
530531
}

0 commit comments

Comments
 (0)