Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jens1o committed Jan 11, 2019
1 parent ea7a0c3 commit 2ac4ce5
Show file tree
Hide file tree
Showing 14 changed files with 76 additions and 214 deletions.
10 changes: 0 additions & 10 deletions src/actions/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

//! Actions that the RLS can perform: responding to requests, watching files,
//! etc.
Expand Down
10 changes: 0 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

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

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

//! The Rust Language Server.
//!
//! The RLS provides a server that runs in the background, providing IDEs,
Expand Down
9 changes: 0 additions & 9 deletions tests/fixtures/common/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
struct Bar {
x: u64,
}
Expand Down
9 changes: 0 additions & 9 deletions tests/fixtures/find_all_refs_no_cfg_test/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
struct Bar {
x: u64,
}
Expand Down
10 changes: 0 additions & 10 deletions tests/fixtures/workspace_symbol/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

mod x {
pub fn nemo() {}
}
Expand Down
10 changes: 0 additions & 10 deletions tests/fixtures/workspace_symbol_duplicates/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[path="shared.rs"]
mod a;
#[path="shared.rs"]
Expand Down
10 changes: 0 additions & 10 deletions tests/fixtures/workspace_symbol_duplicates/src/shared.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[allow(unused)]
struct Frobnicator;
10 changes: 0 additions & 10 deletions tests/support/harness.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(clippy::expect_fun_call)]

use std::collections::HashMap;
Expand Down
10 changes: 0 additions & 10 deletions tests/support/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use serde_json::{self, json};

use std::env;
Expand Down
10 changes: 0 additions & 10 deletions tests/support/paths.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(unknown_lints)]

use std::cell::Cell;
Expand Down
162 changes: 76 additions & 86 deletions tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use serde_json::{self, json};

use std::io::Write;
Expand Down Expand Up @@ -307,27 +297,27 @@ fn cmd_changing_workspace_lib_retains_bin_diagnostics() {
rls.notify(
"textDocument/didChange",
Some(json!({
"contentChanges": [
{
"range": {
"start": {
"line": 1,
"character": 38,
},
"end": {
"line": 1,
"character": 41,
}
"contentChanges": [
{
"range": {
"start": {
"line": 1,
"character": 38,
},
"rangeLength": 3,
"text": "u64"
}
],
"textDocument": {
"uri": format!("file://{}/library/src/lib.rs", root_path.display()),
"version": 0
"end": {
"line": 1,
"character": 41,
}
},
"rangeLength": 3,
"text": "u64"
}
})),
],
"textDocument": {
"uri": format!("file://{}/library/src/lib.rs", root_path.display()),
"version": 0
}
})),
)
.unwrap();

Expand Down Expand Up @@ -362,27 +352,27 @@ fn cmd_changing_workspace_lib_retains_bin_diagnostics() {
rls.notify(
"textDocument/didChange",
Some(json!({
"contentChanges": [
{
"range": {
"start": {
"line": 1,
"character": 38,
},
"end": {
"line": 1,
"character": 41,
}
"contentChanges": [
{
"range": {
"start": {
"line": 1,
"character": 38,
},
"rangeLength": 3,
"text": "u32"
}
],
"textDocument": {
"uri": format!("file://{}/library/src/lib.rs", root_path.display()),
"version": 1
"end": {
"line": 1,
"character": 41,
}
},
"rangeLength": 3,
"text": "u32"
}
})),
],
"textDocument": {
"uri": format!("file://{}/library/src/lib.rs", root_path.display()),
"version": 1
}
})),
)
.unwrap();

Expand Down Expand Up @@ -478,27 +468,27 @@ fn cmd_implicit_workspace_pick_up_lib_changes() {
rls.notify(
"textDocument/didChange",
Some(json!({
"contentChanges": [
{
"range": {
"start": {
"line": 1,
"character": 23,
},
"end": {
"line": 1,
"character": 26,
}
"contentChanges": [
{
"range": {
"start": {
"line": 1,
"character": 23,
},
"rangeLength": 3,
"text": "bar"
}
],
"textDocument": {
"uri": format!("file://{}/inner/src/lib.rs", root_path.display()),
"version": 0
"end": {
"line": 1,
"character": 26,
}
},
"rangeLength": 3,
"text": "bar"
}
})),
],
"textDocument": {
"uri": format!("file://{}/inner/src/lib.rs", root_path.display()),
"version": 0
}
})),
)
.unwrap();

Expand All @@ -520,27 +510,27 @@ fn cmd_implicit_workspace_pick_up_lib_changes() {
rls.notify(
"textDocument/didChange",
Some(json!({
"contentChanges": [
{
"range": {
"start": {
"line": 1,
"character": 23,
},
"end": {
"line": 1,
"character": 26,
}
"contentChanges": [
{
"range": {
"start": {
"line": 1,
"character": 23,
},
"rangeLength": 3,
"text": "foo"
}
],
"textDocument": {
"uri": format!("file://{}/inner/src/lib.rs", root_path.display()),
"version": 1
"end": {
"line": 1,
"character": 26,
}
},
"rangeLength": 3,
"text": "foo"
}
})),
],
"textDocument": {
"uri": format!("file://{}/inner/src/lib.rs", root_path.display()),
"version": 1
}
})),
)
.unwrap();

Expand Down
10 changes: 0 additions & 10 deletions tests/tests_old.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(clippy::cyclomatic_complexity)]

use rls::actions::{notifications, requests};
Expand Down

0 comments on commit 2ac4ce5

Please sign in to comment.