File tree 2 files changed +32
-0
lines changed
src/test/ui/const-generics/issues
2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ feature( const_generics) ]
2
+ #![ allow( incomplete_features) ]
3
+
4
+ trait Bar < O > { }
5
+ impl < O > Bar < O > for [ u8 ; O ] { }
6
+ //~^ ERROR expected value, found type parameter `O`
7
+
8
+ struct Foo < const O : usize > { }
9
+ impl < const O : usize > Foo < O >
10
+ where
11
+ [ u8 ; O ] : Bar < [ ( ) ; O ] > ,
12
+ {
13
+ fn foo ( ) { }
14
+ }
15
+
16
+ fn main ( ) {
17
+ Foo :: foo ( ) ;
18
+ }
Original file line number Diff line number Diff line change
1
+ error[E0423]: expected value, found type parameter `O`
2
+ --> $DIR/issue-69654.rs:5:25
3
+ |
4
+ LL | impl<O> Bar<O> for [u8; O] {}
5
+ | ^ help: a tuple variant with a similar name exists: `Ok`
6
+ |
7
+ ::: $SRC_DIR/libcore/result.rs:LL:COL
8
+ |
9
+ LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
10
+ | --------------------------------------------------- similarly named tuple variant `Ok` defined here
11
+
12
+ error: aborting due to previous error
13
+
14
+ For more information about this error, try `rustc --explain E0423`.
You can’t perform that action at this time.
0 commit comments