Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport a gigantic pile of stuff #2570

Merged
merged 28 commits into from
Apr 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7c09e57
chore: allow renamed and removed lints on docs build (#2344)
hawkw Oct 10, 2022
81f94fe
subscriber: impl `fmt::Display` for `filter::Targets` (#2343)
hawkw Oct 10, 2022
528e633
attributes: support custom levels for `ret` and `err` (#2335)
nitnelave Oct 10, 2022
8cc41bf
attributes: improve docs; tests for using Levels in `#[instrument]` (…
jsgf Oct 27, 2022
17c1c64
chore: track Rust 1.65 clippy lints (#2366)
hawkw Nov 4, 2022
b7c5609
subscriber: fix wrong `doc_cfg` attribute (#2368)
hawkw Nov 4, 2022
018ded8
appender: allow worker thread name to be configured (#2365)
nstinus Nov 4, 2022
099f133
attributes: allow `clippy::unreachable` warning (#2356)
Abhicodes-crypto Nov 4, 2022
f0242bd
appender: Fix typo in RollingFileAppender docs (#2375)
yotamofek Nov 10, 2022
40b576f
fix(docs): Remove accidentally duplicated words (#2378)
LeoniePhiline Nov 11, 2022
ac8ddf4
chore: Remove `doc(html_root_url)` attribute from all crates. (#2384)
LukeMathWalker Nov 16, 2022
38c1d8b
subscriber: dim `Compact` targets, matching the default formatter (#2…
howardjohn Dec 8, 2022
191cdc5
attributes: add compile error on const fn instrumentation (#2418)
andrewpollack Dec 31, 2022
0328b5f
chore: fix new clippy lints from 1.67.0 (#2451)
hds Jan 28, 2023
59d9ae3
attributes: document default level for `err` (#2433)
quad Feb 8, 2023
c71fb14
chore: move tracing-opentelemetry to its own repo (#2523)
davidbarsky Apr 4, 2023
0192304
subscriber: dim `Compact` targets, matching the default formatter (#2…
davidbarsky Apr 5, 2023
fd17727
chore: fix `clippy::needless_borrow` lint in journald tests (#2547)
hawkw Apr 5, 2023
334bee7
tracing: `inline` methods to make macro-generated code smaller (#2555)
ldm0 Apr 11, 2023
b5f6317
Remove dep `cfg-if` from tracing (#2553)
NobodyXu Apr 12, 2023
6feda04
attributes: remove unused syn's feature visit (#2530)
klensy Apr 13, 2023
83cc0b0
attributes: update to syn 2.0 (#2516)
davidpdrsn Apr 13, 2023
192921c
subscriber: add ability to disable ANSI without crate feature (#2532)
daxpedda Apr 14, 2023
f079c81
mock: move layer mock from tracing-subscriber tests (#2369)
hawkw Apr 21, 2023
6b60a04
tracing, tracing-futures: instrument `Future` inside `Drop` (#2562)
ilslv Apr 18, 2023
a6326ef
attributes: update UI tests with the latest stable version of Rust (#…
dbidwell94 Apr 21, 2023
f1c188f
subscriber: add "unicode-case" and "unicode-perl" features to `regex`…
dbidwell94 Apr 21, 2023
2575f20
chore: fix rustfmt
hawkw Apr 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
attributes: allow clippy::unreachable warning (#2356)
## Motivation

PR #2270 added an unreachable branch with an explicit return value to
`#[instrument]` in `async fn`s in order to fix type inference issues.
That PR added the appropriate `#[allow]` attribute for the Rust
compiler's unreachable code linting, but not Clippy's, so a Clippy
warning is still emitted. See:
#2270 (comment)

## Solution

Adding the clippy lint warning as discussed here:
#2270 (comment)
  • Loading branch information
Abhicodes-crypto authored and hawkw committed Apr 21, 2023
commit 099f1334309a203315d814667b51183febb24cdb
2 changes: 1 addition & 1 deletion tracing-attributes/src/expand.rs
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ pub(crate) fn gen_function<'a, B: ToTokens + 'a>(
// unreachable, but does affect inference, so it needs to be written
// exactly that way for it to do its magic.
let fake_return_edge = quote_spanned! {return_span=>
#[allow(unreachable_code, clippy::diverging_sub_expression, clippy::let_unit_value)]
#[allow(unreachable_code, clippy::diverging_sub_expression, clippy::let_unit_value, clippy::unreachable)]
if false {
let __tracing_attr_fake_return: #return_type =
unreachable!("this is just for type inference, and is unreachable code");