Skip to content

Tracing report annoying type mismatch but rust compiles no error #3450

@guoqingbao

Description

@guoqingbao

Bug Report

The latest tracing library report annoying type mismatch under rust analyzer

expected &'static (dyn Callsite + 'static), found &DefaultCallsiterust-analyzer[E0308](https://doc.rust-lang.org/stable/error_codes/E0308.html)
expected &'static [&'static str], found &[&'static str; 1]rust-analyzer[E0308](https://doc.rust-lang.org/stable/error_codes/E0308.html)

Simple usage

    tracing::info!(
        "KvCache Transfer: Seq {} prefill finished and received in {} ms!",
        seq.id,
        transfer_duration
   );

There is no duplicate tracing in my workspace

cargo tree -d | grep tracing
├── tracing-attributes v0.1.31 (proc-macro)
│ └── tracing v0.1.44
│ ├── tracing-subscriber v0.3.22

Version

tracing = "0.1.44"
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }

Platform

Ubuntu 22.04

Rust analyzer: Version 0.4.2741

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions