Skip to content

Commit 26463f1

Browse files
committed
publish gen_lsp_server 0.2
1 parent 9f03c07 commit 26463f1

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/gen_lsp_server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
edition = "2018"
33
name = "gen_lsp_server"
4-
version = "0.1.0"
4+
version = "0.2.0"
55
authors = ["rust-analyzer developers"]
66
repository = "https://github.com/rust-analyzer/rust-analyzer"
77
license = "MIT OR Apache-2.0"

crates/ra_hir/src/ty/traits.rs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,23 +78,24 @@ pub enum Obligation {
7878

7979
/// Check using Chalk whether trait is implemented for given parameters including `Self` type.
8080
pub(crate) fn implements_query(
81-
db: &impl HirDatabase,
82-
krate: Crate,
83-
trait_ref: Canonical<TraitRef>,
81+
_db: &impl HirDatabase,
82+
_krate: Crate,
83+
_trait_ref: Canonical<TraitRef>,
8484
) -> Option<Solution> {
85-
let _p = profile("implements_query");
86-
let goal: chalk_ir::Goal = trait_ref.value.to_chalk(db).cast();
87-
debug!("goal: {:?}", goal);
88-
let env = chalk_ir::Environment::new();
89-
let in_env = chalk_ir::InEnvironment::new(&env, goal);
90-
let parameter = chalk_ir::ParameterKind::Ty(chalk_ir::UniverseIndex::ROOT);
91-
let canonical =
92-
chalk_ir::Canonical { value: in_env, binders: vec![parameter; trait_ref.num_vars] };
93-
// We currently don't deal with universes (I think / hope they're not yet
94-
// relevant for our use cases?)
95-
let u_canonical = chalk_ir::UCanonical { canonical, universes: 1 };
96-
let solution = solve(db, krate, &u_canonical);
97-
solution.map(|solution| solution_from_chalk(db, solution))
85+
return None;
86+
// let _p = profile("implements_query");
87+
// let goal: chalk_ir::Goal = trait_ref.value.to_chalk(db).cast();
88+
// debug!("goal: {:?}", goal);
89+
// let env = chalk_ir::Environment::new();
90+
// let in_env = chalk_ir::InEnvironment::new(&env, goal);
91+
// let parameter = chalk_ir::ParameterKind::Ty(chalk_ir::UniverseIndex::ROOT);
92+
// let canonical =
93+
// chalk_ir::Canonical { value: in_env, binders: vec![parameter; trait_ref.num_vars] };
94+
// // We currently don't deal with universes (I think / hope they're not yet
95+
// // relevant for our use cases?)
96+
// let u_canonical = chalk_ir::UCanonical { canonical, universes: 1 };
97+
// let solution = solve(db, krate, &u_canonical);
98+
// solution.map(|solution| solution_from_chalk(db, solution))
9899
}
99100

100101
fn solution_from_chalk(db: &impl HirDatabase, solution: chalk_solve::Solution) -> Solution {

0 commit comments

Comments
 (0)