This repository was archived by the owner on May 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +47
-0
lines changed Expand file tree Collapse file tree 5 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ rustc -Cincremental=foo - << 'EOF '
4
+ #[derive(PartialEq, Eq)]
5
+ pub struct StaticString {
6
+ string: &'static str,
7
+ }
8
+
9
+ const DUMMY1: StaticString = StaticString {
10
+ string: "DUMMY",
11
+ };
12
+ const DUMMY2: StaticString = StaticString {
13
+ string: "DUMMY",
14
+ };
15
+
16
+ fn main() {
17
+ let bar = DUMMY1;
18
+ let name = match bar {
19
+ DUMMY1 => "1",
20
+ DUMMY2 => "2",
21
+ _ => "Foo",
22
+ };
23
+ }
24
+ EOF
Original file line number Diff line number Diff line change
1
+ #![ crate_type = "lib" ]
2
+ #![ feature( inline_const) ]
3
+
4
+ fn foo < const V : usize > ( ) {
5
+ match 0 {
6
+ const { V } => { } ,
7
+ _ => { } ,
8
+ }
9
+ }
Original file line number Diff line number Diff line change
1
+ fn f < const N : usize > ( ) {
2
+ mut N
3
+ }
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ let Box { 1 : _ , .. } : Box < ( ) > ;
3
+ }
Original file line number Diff line number Diff line change
1
+ #![ crate_type = "lib" ]
2
+ #![ feature( const_generics_defaults) ]
3
+
4
+ #[ repr( C ) ]
5
+ pub struct Loaf < T : Sized , const N : usize = 1usize > {
6
+ head : [ T ; N ] ,
7
+ slice : [ T ] ,
8
+ }
You can’t perform that action at this time.
0 commit comments