Skip to content

Commit

Permalink
fix fallout
Browse files Browse the repository at this point in the history
looks like some mix of #18653 and `projection_must_outlive`, but
that needs to be investigated further (crater run?)
  • Loading branch information
Ariel Ben-Yehuda committed Sep 29, 2015
1 parent 7e993aa commit 1c3645e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/librustc/middle/ty/structural_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ impl<'tcx, A: Lift<'tcx>, B: Lift<'tcx>> Lift<'tcx> for (A, B) {
impl<'tcx, T: Lift<'tcx>> Lift<'tcx> for [T] {
type Lifted = Vec<T::Lifted>;
fn lift_to_tcx(&self, tcx: &ty::ctxt<'tcx>) -> Option<Self::Lifted> {
let mut result = Vec::with_capacity(self.len());
// type annotation needed to inform `projection_must_outlive`
let mut result : Vec<<T as Lift<'tcx>>::Lifted>
= Vec::with_capacity(self.len());
for x in self {
if let Some(value) = tcx.lift(x) {
result.push(value);
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ impl Builder {
let my_thread = Thread::new(name);
let their_thread = my_thread.clone();

let my_packet = Arc::new(UnsafeCell::new(None));
let my_packet : Arc<UnsafeCell<Option<Result<T>>>>
= Arc::new(UnsafeCell::new(None));
let their_packet = my_packet.clone();

let main = move || {
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-18959.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ fn foo(b: &Bar) {
b.foo(&0)
//~^ ERROR the trait `Foo` is not implemented for the type `Bar`
//~| ERROR E0038
//~| WARNING E0038
}

fn main() {
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/object-safety-issue-22040.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct SExpr<'x> {
impl<'x> PartialEq for SExpr<'x> {
fn eq(&self, other:&SExpr<'x>) -> bool {
println!("L1: {} L2: {}", self.elements.len(), other.elements.len());

let result = self.elements.len() == other.elements.len();

println!("Got compare {}", result);
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/trait-test-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ fn main() {
//~^ ERROR E0038
//~| ERROR E0038
//~| ERROR E0277
//~| WARNING E0038
}

0 comments on commit 1c3645e

Please sign in to comment.