about summary refs log tree commit diff
path: root/tests/ui/typeck/typeck-default-trait-impl-assoc-type.fixed
blob: b754f64350f7aae96fd09b0d82705801d29e8cb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ run-rustfix
// Test that we do not consider associated types to be sendable without
// some applicable trait bound (and we don't ICE).
#![allow(dead_code)]

trait Trait {
    type AssocType;
    fn dummy(&self) { }
}
fn bar<T:Trait+Send>() where <T as Trait>::AssocType: Send {
    is_send::<T::AssocType>(); //~ ERROR E0277
}

fn is_send<T:Send>() {
}

fn main() { }