Skip to content

Commit

Permalink
Regression test for #17740
Browse files Browse the repository at this point in the history
Closes #17740.
  • Loading branch information
tamird committed Dec 28, 2014
1 parent 2d10021 commit 252423f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/test/compile-fail/issue-17740.rs
@@ -0,0 +1,22 @@
// 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.

struct Foo<'a> {
data: &'a[u8],
}

impl <'a> Foo<'a>{
fn bar(self: &mut Foo) {
//~^ mismatched types: expected `Foo<'a>`, found `Foo<'_>` (lifetime mismatch)
//~| mismatched types: expected `Foo<'a>`, found `Foo<'_>` (lifetime mismatch)
}
}

fn main() {}

5 comments on commit 252423f

@bors
Copy link
Contributor

@bors bors commented on 252423f Dec 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at tamird@252423f

@bors
Copy link
Contributor

@bors bors commented on 252423f Dec 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging tamird/rust/needstest-tests = 252423f into auto

@bors
Copy link
Contributor

@bors bors commented on 252423f Dec 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

status: {"merge_sha": "1dca51b7b989e126c40c083be62e678e7c65d990"}

@bors
Copy link
Contributor

@bors bors commented on 252423f Dec 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tamird/rust/needstest-tests = 252423f merged ok, testing candidate = 1dca51b7

Please sign in to comment.