Skip to content

Commit 08d18e0

Browse files
bors[bot]lnicola
andauthored
Merge #5610
5610: Bump deps r=flodiebold a=lnicola Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 parents 239dd50 + 797cdb0 commit 08d18e0

File tree

7 files changed

+45
-39
lines changed

7 files changed

+45
-39
lines changed

Cargo.lock

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

crates/ra_hir_ty/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ test_utils = { path = "../test_utils" }
2828

2929
scoped-tls = "1"
3030

31-
chalk-solve = { version = "0.18.0" }
32-
chalk-ir = { version = "0.18.0" }
33-
chalk-recursive = { version = "0.18.0" }
31+
chalk-solve = { version = "0.19.0" }
32+
chalk-ir = { version = "0.19.0" }
33+
chalk-recursive = { version = "0.19.0" }
3434

3535
[dev-dependencies]
3636
expect = { path = "../expect" }

crates/ra_hir_ty/src/traits/chalk.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> {
183183
.collect(),
184184
1,
185185
),
186+
where_clauses: make_binders(vec![], 0),
186187
};
187188
let num_vars = datas.num_binders;
188189
Arc::new(OpaqueTyDatum { opaque_ty_id: id, bound: make_binders(bound, num_vars) })
@@ -193,15 +194,6 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> {
193194
Ty::Unknown.to_chalk(self.db)
194195
}
195196

196-
fn force_impl_for(
197-
&self,
198-
_well_known: rust_ir::WellKnownTrait,
199-
_ty: &chalk_ir::TyData<Interner>,
200-
) -> Option<bool> {
201-
// this method is mostly for rustc
202-
None
203-
}
204-
205197
fn is_object_safe(&self, _trait_id: chalk_ir::TraitId<Interner>) -> bool {
206198
// FIXME: implement actual object safety
207199
true
@@ -547,8 +539,13 @@ pub(crate) fn fn_def_datum_query(
547539
),
548540
where_clauses,
549541
};
550-
let datum =
551-
FnDefDatum { id: fn_def_id, binders: make_binders(bound, sig.num_binders), abi: () };
542+
let datum = FnDefDatum {
543+
id: fn_def_id,
544+
abi: (),
545+
safety: chalk_ir::Safety::Safe,
546+
variadic: sig.value.is_varargs,
547+
binders: make_binders(bound, sig.num_binders),
548+
};
552549
Arc::new(datum)
553550
}
554551

crates/ra_hir_ty/src/traits/chalk/mapping.rs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,16 @@ impl ToChalk for Ty {
3030
Ty::Apply(apply_ty) => match apply_ty.ctor {
3131
TypeCtor::Ref(m) => ref_to_chalk(db, m, apply_ty.parameters),
3232
TypeCtor::Array => array_to_chalk(db, apply_ty.parameters),
33-
TypeCtor::FnPtr { num_args: _, is_varargs: _ } => {
34-
// FIXME: handle is_varargs
33+
TypeCtor::FnPtr { num_args: _, is_varargs } => {
3534
let substitution = apply_ty.parameters.to_chalk(db).shifted_in(&Interner);
36-
chalk_ir::TyData::Function(chalk_ir::Fn { num_binders: 0, substitution })
37-
.intern(&Interner)
35+
chalk_ir::TyData::Function(chalk_ir::FnPointer {
36+
num_binders: 0,
37+
abi: (),
38+
safety: chalk_ir::Safety::Safe,
39+
variadic: is_varargs,
40+
substitution,
41+
})
42+
.intern(&Interner)
3843
}
3944
_ => {
4045
let name = apply_ty.ctor.to_chalk(db);
@@ -118,7 +123,12 @@ impl ToChalk for Ty {
118123
let parameters = from_chalk(db, opaque_ty.substitution);
119124
Ty::Opaque(OpaqueTy { opaque_ty_id: impl_trait_id, parameters })
120125
}
121-
chalk_ir::TyData::Function(chalk_ir::Fn { num_binders, substitution }) => {
126+
chalk_ir::TyData::Function(chalk_ir::FnPointer {
127+
num_binders,
128+
variadic,
129+
substitution,
130+
..
131+
}) => {
122132
assert_eq!(num_binders, 0);
123133
let parameters: Substs = from_chalk(
124134
db,
@@ -127,7 +137,7 @@ impl ToChalk for Ty {
127137
Ty::Apply(ApplicationTy {
128138
ctor: TypeCtor::FnPtr {
129139
num_args: (parameters.len() - 1) as u16,
130-
is_varargs: false,
140+
is_varargs: variadic,
131141
},
132142
parameters,
133143
})

crates/ra_syntax/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ doctest = false
1313
[dependencies]
1414
itertools = "0.9.0"
1515
rowan = "0.10.0"
16-
rustc_lexer = { version = "669.0.0", package = "rustc-ap-rustc_lexer" }
16+
rustc_lexer = { version = "671.0.0", package = "rustc-ap-rustc_lexer" }
1717
rustc-hash = "1.1.0"
1818
arrayvec = "0.5.1"
1919
once_cell = "1.3.1"

crates/ra_syntax/src/ast/expr_ext.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,12 @@ impl ast::Literal {
333333

334334
match token.kind() {
335335
INT_NUMBER => {
336-
// FYI: there was a bug here previously, thus an if statement bellow is necessary.
336+
// FYI: there was a bug here previously, thus the if statement below is necessary.
337337
// The lexer treats e.g. `1f64` as an integer literal. See
338338
// https://github.com/rust-analyzer/rust-analyzer/issues/1592
339339
// and the comments on the linked PR.
340340

341341
let text = token.text();
342-
343342
if let suffix @ Some(_) = Self::find_suffix(&text, &FLOAT_SUFFIXES) {
344343
LiteralKind::FloatNumber { suffix }
345344
} else {

crates/rust-analyzer/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env_logger = { version = "0.7.1", default-features = false }
2020
itertools = "0.9.0"
2121
jod-thread = "0.1.0"
2222
log = "0.4.8"
23-
lsp-types = { version = "0.78.0", features = ["proposed"] }
23+
lsp-types = { version = "0.79.0", features = ["proposed"] }
2424
parking_lot = "0.11.0"
2525
pico-args = "0.3.1"
2626
oorandom = "11.1.2"
@@ -42,7 +42,7 @@ ra_syntax = { path = "../ra_syntax" }
4242
ra_text_edit = { path = "../ra_text_edit" }
4343
vfs = { path = "../vfs" }
4444
vfs-notify = { path = "../vfs-notify" }
45-
ra_cfg = { path = "../ra_cfg"}
45+
ra_cfg = { path = "../ra_cfg" }
4646
ra_toolchain = { path = "../ra_toolchain" }
4747

4848
# This should only be used in CLI

0 commit comments

Comments
 (0)