Skip to content

Commit 6c366ad

Browse files
committed
Clean up
1 parent de074fe commit 6c366ad

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

crates/hir_ty/src/display.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ impl HirDisplay for Ty {
377377
}
378378

379379
// FIXME: all this just to decide whether to use parentheses...
380-
let conains_impl_fn = |bounds: &[QuantifiedWhereClause]| {
380+
let contains_impl_fn = |bounds: &[QuantifiedWhereClause]| {
381381
bounds.iter().any(|bound| {
382382
if let WhereClause::Implemented(trait_ref) = bound.skip_binders() {
383383
let trait_ = trait_ref.hir_trait_id();
@@ -390,7 +390,7 @@ impl HirDisplay for Ty {
390390
let (preds_to_print, has_impl_fn_pred) = match t.kind(&Interner) {
391391
TyKind::Dyn(dyn_ty) if dyn_ty.bounds.skip_binders().interned().len() > 1 => {
392392
let bounds = dyn_ty.bounds.skip_binders().interned();
393-
(bounds.len(), conains_impl_fn(bounds))
393+
(bounds.len(), contains_impl_fn(bounds))
394394
}
395395
TyKind::Alias(AliasTy::Opaque(OpaqueTy {
396396
opaque_ty_id,
@@ -435,7 +435,7 @@ impl HirDisplay for Ty {
435435
}
436436
}
437437

438-
(len, conains_impl_fn(bounds.skip_binders()))
438+
(len, contains_impl_fn(bounds.skip_binders()))
439439
} else {
440440
(0, false)
441441
}

crates/hir_ty/src/infer/coerce.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,6 @@ impl<'a> InferenceContext<'a> {
578578
Solution::Ambig(Guidance::Definite(subst)) => {
579579
canonicalized.apply_solution(&mut self.table, subst)
580580
}
581-
// FIXME: should we accept ambiguous results here?
582581
_ => return Err(TypeError),
583582
};
584583
let unsize =

crates/hir_ty/src/lower.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -881,8 +881,6 @@ impl<'a> TyLoweringContext<'a> {
881881
cov_mark::hit!(lower_rpit);
882882
let self_ty =
883883
TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0)).intern(&Interner);
884-
// XXX(iDawer): Can shifting mess with unsized_types? For now I better reinsure.
885-
let outer_unsized_types = self.unsized_types.replace(Default::default());
886884
let predicates = self.with_shifted_in(DebruijnIndex::ONE, |ctx| {
887885
let mut predicates: Vec<_> = bounds
888886
.iter()
@@ -907,7 +905,6 @@ impl<'a> TyLoweringContext<'a> {
907905
}
908906
predicates
909907
});
910-
self.unsized_types.replace(outer_unsized_types);
911908

912909
ReturnTypeImplTrait { bounds: crate::make_only_type_binders(1, predicates) }
913910
}

crates/ide_assists/src/handlers/generate_function.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ fn bar(worble: ()) ${0:-> ()} {
747747
check_assist(
748748
generate_function,
749749
r#"
750-
#[lang = "sized"] trait Sized {}
750+
//- minicore: sized
751751
trait Foo {}
752752
fn foo() -> impl Foo {
753753
todo!()
@@ -757,7 +757,6 @@ fn baz() {
757757
}
758758
"#,
759759
r#"
760-
#[lang = "sized"] trait Sized {}
761760
trait Foo {}
762761
fn foo() -> impl Foo {
763762
todo!()

0 commit comments

Comments
 (0)