Skip to content

Commit 96fccdb

Browse files
committed
Port coherence_overlap to ui tests
1 parent 4616a4d commit 96fccdb

13 files changed

+110
-190
lines changed

tests/coherence_orphan.rs

Lines changed: 0 additions & 190 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Error: orphan_check(impl <> CoreTrait < > for (rigid (adt CoreStruct)) where [] { })
2+
3+
Caused by:
4+
failed to prove {@ IsLocal(CoreTrait((rigid (adt CoreStruct))))} given {}, got {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[
2+
crate core {
3+
trait CoreTrait<> where [] {}
4+
struct CoreStruct<> where [] {}
5+
},
6+
crate foo {
7+
impl<> CoreTrait<> for CoreStruct<> where [] {}
8+
}
9+
]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Error: orphan_check(impl <> CoreTrait < > for (alias (Unit :: Assoc) (rigid (adt FooStruct))) where [] { })
2+
3+
Caused by:
4+
failed to prove {@ IsLocal(CoreTrait((alias (Unit :: Assoc) (rigid (adt FooStruct)))))} given {}, got {}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
crate core {
3+
trait CoreTrait<> where [] {}
4+
5+
trait Unit<> where [] {
6+
type Assoc<> : [] where [];
7+
}
8+
9+
impl<ty T> Unit<> for T where [] {
10+
type Assoc<> = () where [];
11+
}
12+
},
13+
crate foo {
14+
struct FooStruct<> where [] {}
15+
impl<> CoreTrait<> for <FooStruct<> as Unit<>>::Assoc<> where [] {}
16+
}
17+
]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//@check-pass
2+
[
3+
crate core {
4+
trait CoreTrait<ty T> where [] {}
5+
struct Vec<ty T> where [] {}
6+
},
7+
crate foo {
8+
struct FooStruct<> where [] {}
9+
impl<ty T> CoreTrait<FooStruct<>> for Vec<T> where [] {}
10+
}
11+
]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Error: orphan_check(impl <> CoreTrait < > for (alias (Mirror :: Assoc) (rigid (adt CoreStruct))) where [] { })
2+
3+
Caused by:
4+
failed to prove {@ IsLocal(CoreTrait((alias (Mirror :: Assoc) (rigid (adt CoreStruct)))))} given {}, got {}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
crate core {
3+
trait CoreTrait<> where [] {}
4+
struct CoreStruct<> where [] {}
5+
6+
trait Mirror<> where [] {
7+
type Assoc<> : [] where [];
8+
}
9+
10+
impl<ty T> Mirror<> for T where [] {
11+
type Assoc<> = T where [];
12+
}
13+
},
14+
crate foo {
15+
impl<> CoreTrait<> for <CoreStruct<> as Mirror<>>::Assoc<> where [] {}
16+
}
17+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//@check-pass
2+
[
3+
crate core {
4+
trait CoreTrait<> where [] {}
5+
6+
trait Mirror<> where [] {
7+
type Assoc<> : [] where [];
8+
}
9+
10+
impl<ty T> Mirror<> for T where [] {
11+
type Assoc<> = T where [];
12+
}
13+
},
14+
crate foo {
15+
struct FooStruct<> where [] {}
16+
impl<> CoreTrait<> for <FooStruct<> as Mirror<>>::Assoc<> where [] {}
17+
}
18+
]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Error: orphan_check_neg(impl <> ! CoreTrait < > for (rigid (adt CoreStruct)) where [] {})
2+
3+
Caused by:
4+
failed to prove {@ IsLocal(CoreTrait((rigid (adt CoreStruct))))} given {}, got {}

0 commit comments

Comments
 (0)