constcat icon indicating copy to clipboard operation
constcat copied to clipboard

Can this crate work with Associated Constants ?

Open DontBreakAlex opened this issue 1 year ago • 6 comments

Currently it produces this error when attempting to use Associated Constants:

error[E0401]: can't use generic parameters from outer function
   --> src/sync.rs:284:47
    |
282 | pub fn get_updated<T: Uploadable>(db: &rusqlite::Connection) -> Result<Vec<T>> {
    |                    - type parameter from outer function
283 |     let mut stmt =
284 |         db.prepare_cached(concat!("SELECT * FROM ", T::SQLITE_TABLE_NAME, " INNER JOIN actions a on ", T::SQLITE_TABLE_NAME, ".uuid = a.u...
    |                                                     ^^^^^^^^^^^^^^^^^^^^ use of generic parameter from outer function

I'm not sure what is going on, can this be supported ?

DontBreakAlex avatar Jun 27 '23 15:06 DontBreakAlex