Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 7ae6006

Browse files
authored
Merge pull request #1235 from jens1o/master
Fix #1231
2 parents ea7a0c3 + 16e8881 commit 7ae6006

File tree

14 files changed

+99
-237
lines changed

14 files changed

+99
-237
lines changed

src/actions/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
//! Actions that the RLS can perform: responding to requests, watching files,
122
//! etc.
133

src/lib.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
//! The Rust Language Server.
122
//!
133
//! The RLS provides a server that runs in the background, providing IDEs,

src/lsp_data.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
//! Types, helpers, and conversions to and from LSP and `racer` types.
122
133
use std::error::Error;

src/main.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
//! The Rust Language Server.
122
//!
133
//! The RLS provides a server that runs in the background, providing IDEs,

tests/fixtures/common/src/main.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
101
struct Bar {
112
x: u64,
123
}

tests/fixtures/find_all_refs_no_cfg_test/src/main.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
101
struct Bar {
112
x: u64,
123
}

tests/fixtures/workspace_symbol/src/main.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
mod x {
122
pub fn nemo() {}
133
}

tests/fixtures/workspace_symbol_duplicates/src/main.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
#[path="shared.rs"]
122
mod a;
133
#[path="shared.rs"]
Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
#[allow(unused)]
122
struct Frobnicator;

tests/support/harness.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
#![allow(clippy::expect_fun_call)]
122

133
use std::collections::HashMap;

tests/support/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
use serde_json::{self, json};
122

133
use std::env;

tests/support/paths.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
#![allow(unknown_lints)]
122

133
use std::cell::Cell;

tests/tests.rs

Lines changed: 76 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
111
use serde_json::{self, json};
122

133
use std::io::Write;
@@ -307,27 +297,27 @@ fn cmd_changing_workspace_lib_retains_bin_diagnostics() {
307297
rls.notify(
308298
"textDocument/didChange",
309299
Some(json!({
310-
"contentChanges": [
311-
{
312-
"range": {
313-
"start": {
314-
"line": 1,
315-
"character": 38,
316-
},
317-
"end": {
318-
"line": 1,
319-
"character": 41,
320-
}
300+
"contentChanges": [
301+
{
302+
"range": {
303+
"start": {
304+
"line": 1,
305+
"character": 38,
321306
},
322-
"rangeLength": 3,
323-
"text": "u64"
324-
}
325-
],
326-
"textDocument": {
327-
"uri": format!("file://{}/library/src/lib.rs", root_path.display()),
328-
"version": 0
307+
"end": {
308+
"line": 1,
309+
"character": 41,
310+
}
311+
},
312+
"rangeLength": 3,
313+
"text": "u64"
329314
}
330-
})),
315+
],
316+
"textDocument": {
317+
"uri": format!("file://{}/library/src/lib.rs", root_path.display()),
318+
"version": 0
319+
}
320+
})),
331321
)
332322
.unwrap();
333323

@@ -362,27 +352,27 @@ fn cmd_changing_workspace_lib_retains_bin_diagnostics() {
362352
rls.notify(
363353
"textDocument/didChange",
364354
Some(json!({
365-
"contentChanges": [
366-
{
367-
"range": {
368-
"start": {
369-
"line": 1,
370-
"character": 38,
371-
},
372-
"end": {
373-
"line": 1,
374-
"character": 41,
375-
}
355+
"contentChanges": [
356+
{
357+
"range": {
358+
"start": {
359+
"line": 1,
360+
"character": 38,
376361
},
377-
"rangeLength": 3,
378-
"text": "u32"
379-
}
380-
],
381-
"textDocument": {
382-
"uri": format!("file://{}/library/src/lib.rs", root_path.display()),
383-
"version": 1
362+
"end": {
363+
"line": 1,
364+
"character": 41,
365+
}
366+
},
367+
"rangeLength": 3,
368+
"text": "u32"
384369
}
385-
})),
370+
],
371+
"textDocument": {
372+
"uri": format!("file://{}/library/src/lib.rs", root_path.display()),
373+
"version": 1
374+
}
375+
})),
386376
)
387377
.unwrap();
388378

@@ -478,27 +468,27 @@ fn cmd_implicit_workspace_pick_up_lib_changes() {
478468
rls.notify(
479469
"textDocument/didChange",
480470
Some(json!({
481-
"contentChanges": [
482-
{
483-
"range": {
484-
"start": {
485-
"line": 1,
486-
"character": 23,
487-
},
488-
"end": {
489-
"line": 1,
490-
"character": 26,
491-
}
471+
"contentChanges": [
472+
{
473+
"range": {
474+
"start": {
475+
"line": 1,
476+
"character": 23,
492477
},
493-
"rangeLength": 3,
494-
"text": "bar"
495-
}
496-
],
497-
"textDocument": {
498-
"uri": format!("file://{}/inner/src/lib.rs", root_path.display()),
499-
"version": 0
478+
"end": {
479+
"line": 1,
480+
"character": 26,
481+
}
482+
},
483+
"rangeLength": 3,
484+
"text": "bar"
500485
}
501-
})),
486+
],
487+
"textDocument": {
488+
"uri": format!("file://{}/inner/src/lib.rs", root_path.display()),
489+
"version": 0
490+
}
491+
})),
502492
)
503493
.unwrap();
504494

@@ -520,27 +510,27 @@ fn cmd_implicit_workspace_pick_up_lib_changes() {
520510
rls.notify(
521511
"textDocument/didChange",
522512
Some(json!({
523-
"contentChanges": [
524-
{
525-
"range": {
526-
"start": {
527-
"line": 1,
528-
"character": 23,
529-
},
530-
"end": {
531-
"line": 1,
532-
"character": 26,
533-
}
513+
"contentChanges": [
514+
{
515+
"range": {
516+
"start": {
517+
"line": 1,
518+
"character": 23,
534519
},
535-
"rangeLength": 3,
536-
"text": "foo"
537-
}
538-
],
539-
"textDocument": {
540-
"uri": format!("file://{}/inner/src/lib.rs", root_path.display()),
541-
"version": 1
520+
"end": {
521+
"line": 1,
522+
"character": 26,
523+
}
524+
},
525+
"rangeLength": 3,
526+
"text": "foo"
542527
}
543-
})),
528+
],
529+
"textDocument": {
530+
"uri": format!("file://{}/inner/src/lib.rs", root_path.display()),
531+
"version": 1
532+
}
533+
})),
544534
)
545535
.unwrap();
546536

0 commit comments

Comments
 (0)