about summary refs log tree commit diff
path: root/tests/ui/trait-bounds/trait-bound-adt-issue-145611.rs
blob: 74551ce493f94d81ba69b9358b3acdd2ce53e38b (plain)
1
2
3
4
5
6
7
8
9
10
11
// This test is for regression of issue #145611
// There should not be cycle error in effective_visibilities query.

trait LocalTrait {}
struct SomeType;
fn impls_trait<T: LocalTrait>() {}
fn foo() -> impl Sized {
    impls_trait::<SomeType>(); //~ ERROR the trait bound `SomeType: LocalTrait` is not satisfied [E0277]
}

fn main() {}