-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
C-bugCategory: bugCategory: bug
Description
rust-analyzer version: rust-analyzer version: 0.4.2554-standalone (db02cdc 2025-07-27)
rustc version: rustc 1.89.0-nightly (99e7c15 2025-06-01)
editor or extension: VSCode
relevant settings:
cargo.toml dependency:
thiserror = "2.0.12"
code snippet to reproduce:
When trying to use "rename symbol" on FooError, vscode says "No references found at position"
#[derive(Debug, thiserror::Error)]
pub enum FooError {
#[error("bar")]
Bar,
#[error("baz")]
Baz,
}temporarily removing thiserror::Error allows the symbol to be renamed.
incase it is useful, this is the expansion of the macro:
// Recursive expansion of thiserror::Error macro
// ==============================================
#[allow(unused_qualifications)]
#[automatically_derived]
impl ::thiserror::__private::Error for FooError {}
#[allow(unused_qualifications)]
#[automatically_derived]
impl ::core::fmt::Display for FooError {
fn fmt(&self, __formatter: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
#[allow(unused_variables, deprecated, clippy::used_underscore_binding)]
match self {
FooError::Bar {} => __formatter.write_str("bar"),
FooError::Baz {} => __formatter.write_str("baz"),
}
}
}Metadata
Metadata
Assignees
Labels
C-bugCategory: bugCategory: bug