Skip to content

Warnings caused by plex macros #45

@kaimast

Description

@kaimast

I started seeing these on the newest rust nightly

kai@kai-thinkpad ~/d/plex (master)> cargo test
   Compiling proc-macro2 v1.0.10
   Compiling unicode-xid v0.2.0
   Compiling bit-vec v0.4.4
   Compiling syn v1.0.17
   Compiling vec_map v0.6.0
   Compiling lalr v0.0.2
   Compiling bit-set v0.4.0
   Compiling redfa v0.0.2
   Compiling quote v1.0.3
   Compiling plex v0.2.5 (/home/kai/dev/plex)
warning: unnecessary braces around block return value
   --> examples/demo.rs:167:13
    |
167 |             Ident(var) Equals assign[rhs] => Expr {
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these braces
    |
    = note: `#[warn(unused_braces)]` on by default

warning: unnecessary braces around block return value
   --> examples/demo.rs:200:13
    |
200 |             Ident(i) => Expr {
    |             ^^^^^^^^ help: remove these braces

warning: unnecessary braces around block return value
   --> examples/demo.rs:204:13
    |
204 |             Integer(i) => Expr {
    |             ^^^^^^^^^^ help: remove these braces

    Finished test [unoptimized + debuginfo] target(s) in 22.71s
     Running target/debug/deps/plex-1283d3a11f2149ad

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests plex

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Adding #![allow(unused_braces)] to src/lib.rs fixes it when compiling plex itself but not when using the macro in other projects (or the tests above).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions