File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
ide-completion/src/completions Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,14 @@ struct Display<'a> {
207
207
impl fmt:: Display for Display < ' _ > {
208
208
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
209
209
let mut symbol = self . name . symbol . as_str ( ) ;
210
+
211
+ if symbol == "'static" {
212
+ // FIXME: '`static` can also be a label, and there it does need escaping.
213
+ // But knowing where it is will require adding a parameter to `display()`,
214
+ // and that is an infectious change.
215
+ return f. write_str ( symbol) ;
216
+ }
217
+
210
218
if let Some ( s) = symbol. strip_prefix ( '\'' ) {
211
219
f. write_str ( "'" ) ?;
212
220
symbol = s;
Original file line number Diff line number Diff line change @@ -116,13 +116,13 @@ fn foo<'lifetime>(foo: &'a$0) {}
116
116
check (
117
117
r#"
118
118
struct Foo;
119
- impl<'impl> Foo {
119
+ impl<'r# impl> Foo {
120
120
fn foo<'func>(&'a$0 self) {}
121
121
}
122
122
"# ,
123
123
expect ! [ [ r#"
124
124
lt 'func
125
- lt 'impl
125
+ lt 'r# impl
126
126
lt 'static
127
127
"# ] ] ,
128
128
) ;
You can’t perform that action at this time.
0 commit comments