Open
Description
I tried this code:
[package]
name = "repro"
version = "0.1.0"
edition = "2018"
[dependencies]
quote = "=1.0.3"
use quote::quote;
pub fn repro() {
let many = [1, 2, 3];
let _together = quote! {
#(#many),*
};
}
I think this is a basic and common usage of the quote crate.
I expected to see no warnings:
% RUSTFLAGS=-Dwarnings cargo +nightly-2020-04-04 build
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
% RUSTFLAGS=-Dwarnings cargo +nightly-2020-04-04 doc
Documenting repro v0.1.0 (/private/tmp/repro)
Finished dev [unoptimized + debuginfo] target(s) in 0.82s
Instead, warnings are generated (and my CI build fails due to the deny
):
% RUSTFLAGS=-Dwarnings cargo +nightly-2020-04-04 build
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
% RUSTFLAGS=-Dwarnings cargo +nightly-2020-04-04 doc
Documenting repro v0.1.0 (/private/tmp/repro)
warning: unnecessary braces around block return value
|
= note: `#[warn(unused_braces)]` on by default
Finished dev [unoptimized + debuginfo] target(s) in 0.82s
Note that the warning only appears when running rustdoc.
Meta
rustc +nightly-2020-04-04 --version --verbose
:
rustc 1.44.0-nightly (74bd074ee 2020-04-03)
binary: rustc
commit-hash: 74bd074eefcf4915c73d1ab91bc90859664729e6
commit-date: 2020-04-03
host: x86_64-apple-darwin
release: 1.44.0-nightly
LLVM version: 9.0
Metadata
Metadata
Assignees
Labels
Area: Lints (warnings about flaws in source code) such as unused_mut.Category: This is a bug.Helping to "clean up" bugs with minimal examples and bisectionsMedium priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.