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