Skip to content

Commit

Permalink
pacify the mercilous tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed May 24, 2018
1 parent 3b1a170 commit 8fd316f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/librustc/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,10 @@ impl<'a, 'tcx> Lift<'tcx> for &'a Goal<'a> {

impl<'a, 'tcx> Lift<'tcx> for &'a Slice<Goal<'a>> {
type Lifted = &'tcx Slice<Goal<'tcx>>;
fn lift_to_tcx<'b, 'gcx>(&self, tcx: TyCtxt<'b, 'gcx, 'tcx>) -> Option<&'tcx Slice<Goal<'tcx>>> {
fn lift_to_tcx<'b, 'gcx>(
&self,
tcx: TyCtxt<'b, 'gcx, 'tcx>,
) -> Option<&'tcx Slice<Goal<'tcx>>> {
if tcx.interners.arena.in_arena(*self as *const _) {
return Some(unsafe { mem::transmute(*self) });
}
Expand All @@ -1544,7 +1547,10 @@ impl<'a, 'tcx> Lift<'tcx> for &'a Slice<Goal<'a>> {

impl<'a, 'tcx> Lift<'tcx> for &'a Slice<Clause<'a>> {
type Lifted = &'tcx Slice<Clause<'tcx>>;
fn lift_to_tcx<'b, 'gcx>(&self, tcx: TyCtxt<'b, 'gcx, 'tcx>) -> Option<&'tcx Slice<Clause<'tcx>>> {
fn lift_to_tcx<'b, 'gcx>(
&self,
tcx: TyCtxt<'b, 'gcx, 'tcx>,
) -> Option<&'tcx Slice<Clause<'tcx>>> {
if tcx.interners.arena.in_arena(*self as *const _) {
return Some(unsafe { mem::transmute(*self) });
}
Expand Down
10 changes: 10 additions & 0 deletions src/librustc_traits/chalk_context.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use chalk_engine::fallible::Fallible as ChalkEngineFallible;
use chalk_engine::{context, hh::HhGoal, DelayedLiteral, ExClause};
use rustc::infer::canonical::{
Expand Down

0 comments on commit 8fd316f

Please sign in to comment.