Set groundwork for proper const normalization
This commit is contained in:
parent
53e3907bcb
commit
238d113b07
18 changed files with 366 additions and 225 deletions
|
|
@ -39,14 +39,6 @@ error: unconstrained generic constant
|
|||
LL | let _ = const_evaluatable_lib::test1::<T>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: required by a bound in `test1`
|
||||
--> $DIR/auxiliary/const_evaluatable_lib.rs:5:10
|
||||
|
|
||||
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
|
||||
| ----- required by a bound in this function
|
||||
LL | where
|
||||
LL | [u8; std::mem::size_of::<T>() - 1]: Sized,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
|
||||
help: try adding a `where` bound
|
||||
|
|
||||
LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
|
||||
|
|
@ -59,10 +51,13 @@ LL | let _ = const_evaluatable_lib::test1::<T>();
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: required by a bound in `test1`
|
||||
--> $DIR/auxiliary/const_evaluatable_lib.rs:3:27
|
||||
--> $DIR/auxiliary/const_evaluatable_lib.rs:5:10
|
||||
|
|
||||
LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
|
||||
| ----- required by a bound in this function
|
||||
LL | where
|
||||
LL | [u8; std::mem::size_of::<T>() - 1]: Sized,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
|
||||
help: try adding a `where` bound
|
||||
|
|
||||
LL | fn user<T>() where [(); std::mem::size_of::<T>() - 1]: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue