mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Auto merge of #16684 - Veykril:synthetic-fmt-args, r=Veykril
fix: Don't panic on synthetic syntax in inference diagnostics Temporary fix for https://github.com/rust-lang/rust-analyzer/issues/16682 We ought to rethink how we attach diagnostics to things, as IDs don't work for `format_args` like that!
This commit is contained in:
commit
1d3558bfe1
2 changed files with 33 additions and 17 deletions
|
@ -20,6 +20,19 @@ pub(crate) fn unresolved_ident(
|
|||
mod tests {
|
||||
use crate::tests::check_diagnostics;
|
||||
|
||||
// FIXME: This should show a diagnostic
|
||||
#[test]
|
||||
fn feature() {
|
||||
check_diagnostics(
|
||||
r#"
|
||||
//- minicore: fmt
|
||||
fn main() {
|
||||
format_args!("{unresolved}");
|
||||
}
|
||||
"#,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn missing() {
|
||||
check_diagnostics(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue