Skip to content

Commit 9700add

Browse files
bors[bot]lnicola
andauthored
Merge #11304
11304: fix: Temporarily disable format string completions r=lnicola a=lnicola CC #11303 bors r+ Co-authored-by: Laurențiu Nicola <[email protected]>
2 parents e6e7280 + c504518 commit 9700add

File tree

1 file changed

+49
-46
lines changed

1 file changed

+49
-46
lines changed

crates/ide_completion/src/completions/format_string.rs

Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ use crate::{context::CompletionContext, CompletionItem, CompletionItemKind, Comp
88

99
/// Complete identifiers in format strings.
1010
pub(crate) fn format_string(acc: &mut Completions, ctx: &CompletionContext) {
11+
if true {
12+
return;
13+
}
1114
let string = match ast::String::cast(ctx.token.clone()) {
1215
Some(it) if is_format_string(&it) => it,
1316
_ => return,
@@ -36,7 +39,7 @@ pub(crate) fn format_string(acc: &mut Completions, ctx: &CompletionContext) {
3639
mod tests {
3740
use expect_test::{expect, Expect};
3841

39-
use crate::tests::{check_edit, completion_list_no_kw};
42+
use crate::tests::completion_list_no_kw;
4043

4144
fn check(ra_fixture: &str, expect: Expect) {
4245
let actual = completion_list_no_kw(ra_fixture);
@@ -59,49 +62,49 @@ format_args!("f$0");
5962
);
6063
}
6164

62-
#[test]
63-
fn completes_locals() {
64-
check_edit(
65-
"foobar",
66-
r#"
67-
macro_rules! format_args {
68-
($lit:literal $(tt:tt)*) => { 0 },
69-
}
70-
fn main() {
71-
let foobar = 1;
72-
format_args!("{f$0");
73-
}
74-
"#,
75-
r#"
76-
macro_rules! format_args {
77-
($lit:literal $(tt:tt)*) => { 0 },
78-
}
79-
fn main() {
80-
let foobar = 1;
81-
format_args!("{foobar");
82-
}
83-
"#,
84-
);
85-
check_edit(
86-
"foobar",
87-
r#"
88-
macro_rules! format_args {
89-
($lit:literal $(tt:tt)*) => { 0 },
90-
}
91-
fn main() {
92-
let foobar = 1;
93-
format_args!("{$0");
94-
}
95-
"#,
96-
r#"
97-
macro_rules! format_args {
98-
($lit:literal $(tt:tt)*) => { 0 },
99-
}
100-
fn main() {
101-
let foobar = 1;
102-
format_args!("{foobar");
103-
}
104-
"#,
105-
);
106-
}
65+
// #[test]
66+
// fn completes_locals() {
67+
// check_edit(
68+
// "foobar",
69+
// r#"
70+
// macro_rules! format_args {
71+
// ($lit:literal $(tt:tt)*) => { 0 },
72+
// }
73+
// fn main() {
74+
// let foobar = 1;
75+
// format_args!("{f$0");
76+
// }
77+
// "#,
78+
// r#"
79+
// macro_rules! format_args {
80+
// ($lit:literal $(tt:tt)*) => { 0 },
81+
// }
82+
// fn main() {
83+
// let foobar = 1;
84+
// format_args!("{foobar");
85+
// }
86+
// "#,
87+
// );
88+
// check_edit(
89+
// "foobar",
90+
// r#"
91+
// macro_rules! format_args {
92+
// ($lit:literal $(tt:tt)*) => { 0 },
93+
// }
94+
// fn main() {
95+
// let foobar = 1;
96+
// format_args!("{$0");
97+
// }
98+
// "#,
99+
// r#"
100+
// macro_rules! format_args {
101+
// ($lit:literal $(tt:tt)*) => { 0 },
102+
// }
103+
// fn main() {
104+
// let foobar = 1;
105+
// format_args!("{foobar");
106+
// }
107+
// "#,
108+
// );
109+
// }
107110
}

0 commit comments

Comments
 (0)