Skip to content

Commit

Permalink
add test for #24338
Browse files Browse the repository at this point in the history
  • Loading branch information
euclio committed Oct 4, 2018
1 parent 1ab1b1e commit e15e86b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/test/ui/issues/issue-24338.rs
@@ -0,0 +1,30 @@
// Copyright 2018 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.
//
// compile-pass

trait DictLike<'a> {
type ItemsIterator: Iterator<Item=u8>;
fn get(c: Self::ItemsIterator) {
c.into_iter();
}
}

trait DictLike2<'a> {
type ItemsIterator: Iterator<Item=u8>;

fn items(&self) -> Self::ItemsIterator;

fn get(&self) {
for _ in self.items() {}
}
}

fn main() {}

0 comments on commit e15e86b

Please sign in to comment.