-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
Description
rust-analyzer version: rust-analyzer 0.4.2659-standalone
rustc version: rustc 1.91.0-nightly (040a98a 2025-08-20)
editor or extension: coc-rust-analyzer Vim9.1
code snippet to reproduce:
#[derive(Debug)]
struct Foo(&'static str);
impl Foo {
fn text(&self) -> &str { self.0 }
}
fn main() {
let s = Foo("");
$0let m = format!("{s:?}{}", if s.text().ends_with("x") { "a" } else { "b" });$0
let _ = format!("{s:?}{m}");
}Select line let m use 'Extract into function', panic
@rustbot label +A-assists