]> git.lizzy.rs Git - rust.git/blob - tests/run-pass/ice-2760.rs
Adapt run-pass tests to the tool_lints
[rust.git] / tests / run-pass / ice-2760.rs
1 #![feature(tool_lints)]
2
3 #![allow(unused_variables, clippy::blacklisted_name,
4          clippy::needless_pass_by_value, dead_code)]
5
6 // This should not compile-fail with:
7 //
8 //      error[E0277]: the trait bound `T: Foo` is not satisfied
9 //
10 // See https://github.com/rust-lang-nursery/rust-clippy/issues/2760
11
12 trait Foo {
13     type Bar;
14 }
15
16 struct Baz<T: Foo> {
17     bar: T::Bar,
18 }
19
20 fn take<T: Foo>(baz: Baz<T>) {}
21
22 fn main() {}