File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change 1
1
use super :: * ;
2
2
3
- /// The current implementation of RustIrDatabase::is_object_safe only checks for
4
- /// the #[object_safe] flag. This test will start failing once it performs a
5
- /// proper test because Foo should be object safe.
6
- #[ test]
7
- fn by_default_not_object_safe ( ) {
8
- test ! {
9
- program {
10
- trait Foo { }
11
- }
12
-
13
- goal { ObjectSafe ( Foo ) } yields { "No possible solution" }
14
- goal { not { ObjectSafe ( Foo ) } } yields { "Unique" }
15
- }
16
- }
17
-
18
3
#[ test]
19
4
fn object_safe_flag ( ) {
20
5
test ! {
21
6
program {
22
7
#[ object_safe]
23
8
trait Foo { }
9
+ trait Bar { }
24
10
}
25
11
26
12
goal { ObjectSafe ( Foo ) } yields { "Unique" }
27
- goal { not { ObjectSafe ( Foo ) } } yields { "No possible solution " }
13
+ goal { not { ObjectSafe ( Bar ) } } yields { "Unique " }
28
14
}
29
15
}
You can’t perform that action at this time.
0 commit comments