Add revisions to const generic UI tests.
This commit is contained in:
parent
36903d79c8
commit
bec8e5fc14
6 changed files with 25 additions and 4 deletions
|
|
@ -1,4 +1,6 @@
|
|||
#![feature(const_generics)]
|
||||
#![cfg_attr(full, feature(const_generics))]
|
||||
#![cfg_attr(full, allow(incomplete_features))]
|
||||
#![cfg_attr(min, feature(min_const_generics))]
|
||||
|
||||
pub struct Struct<const N: usize>(pub [u8; N]);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
#![feature(const_generics)]
|
||||
#![cfg_attr(full, feature(const_generics))]
|
||||
#![cfg_attr(full, allow(incomplete_features))]
|
||||
#![cfg_attr(min, feature(min_const_generics))]
|
||||
|
||||
pub struct Num<const N: usize>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/const-argument-cross-crate-mismatch.rs:6:67
|
||||
--> $DIR/const-argument-cross-crate-mismatch.rs:7:67
|
||||
|
|
||||
LL | let _ = const_generic_lib::function(const_generic_lib::Struct([0u8, 1u8]));
|
||||
| ^^^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/const-argument-cross-crate-mismatch.rs:8:65
|
||||
--> $DIR/const-argument-cross-crate-mismatch.rs:9:65
|
||||
|
|
||||
LL | let _: const_generic_lib::Alias = const_generic_lib::Struct([0u8, 1u8, 2u8]);
|
||||
| ^^^^^^^^^^^^^^^ expected an array with a fixed size of 2 elements, found one with 3 elements
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
error[E0308]: mismatched types
|
||||
--> $DIR/const-argument-cross-crate-mismatch.rs:7:67
|
||||
|
|
||||
LL | let _ = const_generic_lib::function(const_generic_lib::Struct([0u8, 1u8]));
|
||||
| ^^^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/const-argument-cross-crate-mismatch.rs:9:65
|
||||
|
|
||||
LL | let _: const_generic_lib::Alias = const_generic_lib::Struct([0u8, 1u8, 2u8]);
|
||||
| ^^^^^^^^^^^^^^^ expected an array with a fixed size of 2 elements, found one with 3 elements
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
// aux-build:const_generic_lib.rs
|
||||
// revisions: full min
|
||||
|
||||
extern crate const_generic_lib;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// run-pass
|
||||
// revisions: full min
|
||||
// aux-build:const_generic_lib.rs
|
||||
|
||||
extern crate const_generic_lib;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue