about summary refs log tree commit diff
path: root/tests/ui/trait-bounds/trait-bound-adt-issue-145611.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/trait-bounds/trait-bound-adt-issue-145611.rs')
-rw-r--r--tests/ui/trait-bounds/trait-bound-adt-issue-145611.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/trait-bounds/trait-bound-adt-issue-145611.rs b/tests/ui/trait-bounds/trait-bound-adt-issue-145611.rs
new file mode 100644
index 00000000000..74551ce493f
--- /dev/null
+++ b/tests/ui/trait-bounds/trait-bound-adt-issue-145611.rs
@@ -0,0 +1,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() {}