carllerche / tower-web

A fast, boilerplate free, web framework for Rust
MIT License
980 stars 51 forks source link

warning: suffixes on a tuple index are invalid #212

Closed emschwartz closed 5 years ago

emschwartz commented 5 years ago

I see this warning when compiling a crate that depends on tower-web:

warning: suffixes on a tuple index are invalid
   --> ...
    |
38  | / impl_web! {
...
143 | |     }
144 | | }
    | |_^ invalid suffix `usize`
    |
    = note: `usize` is *temporarily* accepted on tuple index fields as it was incorrectly accepted on stable for a few releases
    = help: on proc macros, you'll want to use `syn::Index::from` or `proc_macro::Literal::*_unsuffixed` for code that will desugar to tuple field access
    = note: for more context, see https://github.com/rust-lang/rust/issues/60210
    = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Is there a way to get rid of this warning, or is this expected (for now)? It sounds somewhat related / similar to https://github.com/carllerche/tower-web/pull/205 but I still see the warning using tower-web 0.3.7, which includes that fix.

Thanks!

lnicola commented 5 years ago

There may have been some instances left, but I don't see those warnings after #205. Just to make sure, cargo update doesn't fix this, does it?

emschwartz commented 5 years ago

Shoot, my mistake. The warnings did go away after running cargo update. Thanks!