File tree Expand file tree Collapse file tree 4 files changed +63
-0
lines changed Expand file tree Collapse file tree 4 files changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ rustc -Cdebuginfo=1 - << 'EOF '
4
+
5
+ #![feature(adt_const_params)]
6
+
7
+ fn main() {
8
+ pub struct Color<const WHITE: (fn(),)>;
9
+
10
+ impl<const WHITE: (fn(),)> Color<WHITE> {
11
+ /// Construct a new color
12
+ pub fn new() -> Self {
13
+ Color::<WHITE>
14
+ }
15
+ }
16
+
17
+ pub const D65: (fn(),) = (|| {},);
18
+
19
+ Color::<D65>::new();
20
+ }
21
+
22
+ EOF
23
+
Original file line number Diff line number Diff line change
1
+ fn test ( ) -> impl Iterator < Item = impl Sized > {
2
+ Box :: new ( 0 ..) as Box < dyn Iterator < Item = _ > >
3
+ }
4
+
5
+ pub fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ rustc --edition=2018 -Zcrate-attr=" feature(generic_const_exprs)" - << 'EOF '
4
+
5
+ #[allow(unused)]
6
+ async fn foo<'a>() {
7
+ let _data = &mut [0u8; { 1 + 4 }];
8
+ bar().await
9
+ }
10
+
11
+ async fn bar() {}
12
+
13
+ fn main() {}
14
+
15
+ EOF
16
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ rustc " -Zcrate-attr=feature(with_negative_coherence)" - << 'EOF '
4
+
5
+ #![feature(negative_impls)]
6
+
7
+ // FIXME: this should compile
8
+
9
+ trait MyPredicate<'a> {}
10
+ impl<'a, T> !MyPredicate<'a> for &T where T: 'a {}
11
+ trait MyTrait<'a> {}
12
+ impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
13
+ impl<'a, T> MyTrait<'a> for &'a T {}
14
+ //~^ ERROR: conflicting implementations of trait `MyTrait<'_>` for type `&_`
15
+
16
+ fn main() {}
17
+
18
+ EOF
19
+
You can’t perform that action at this time.
0 commit comments