File tree Expand file tree Collapse file tree 4 files changed +4
-9
lines changed Expand file tree Collapse file tree 4 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ impl HirDisplay for Ty {
377
377
}
378
378
379
379
// FIXME: all this just to decide whether to use parentheses...
380
- let conains_impl_fn = |bounds : & [ QuantifiedWhereClause ] | {
380
+ let contains_impl_fn = |bounds : & [ QuantifiedWhereClause ] | {
381
381
bounds. iter ( ) . any ( |bound| {
382
382
if let WhereClause :: Implemented ( trait_ref) = bound. skip_binders ( ) {
383
383
let trait_ = trait_ref. hir_trait_id ( ) ;
@@ -390,7 +390,7 @@ impl HirDisplay for Ty {
390
390
let ( preds_to_print, has_impl_fn_pred) = match t. kind ( & Interner ) {
391
391
TyKind :: Dyn ( dyn_ty) if dyn_ty. bounds . skip_binders ( ) . interned ( ) . len ( ) > 1 => {
392
392
let bounds = dyn_ty. bounds . skip_binders ( ) . interned ( ) ;
393
- ( bounds. len ( ) , conains_impl_fn ( bounds) )
393
+ ( bounds. len ( ) , contains_impl_fn ( bounds) )
394
394
}
395
395
TyKind :: Alias ( AliasTy :: Opaque ( OpaqueTy {
396
396
opaque_ty_id,
@@ -435,7 +435,7 @@ impl HirDisplay for Ty {
435
435
}
436
436
}
437
437
438
- ( len, conains_impl_fn ( bounds. skip_binders ( ) ) )
438
+ ( len, contains_impl_fn ( bounds. skip_binders ( ) ) )
439
439
} else {
440
440
( 0 , false )
441
441
}
Original file line number Diff line number Diff line change @@ -578,7 +578,6 @@ impl<'a> InferenceContext<'a> {
578
578
Solution :: Ambig ( Guidance :: Definite ( subst) ) => {
579
579
canonicalized. apply_solution ( & mut self . table , subst)
580
580
}
581
- // FIXME: should we accept ambiguous results here?
582
581
_ => return Err ( TypeError ) ,
583
582
} ;
584
583
let unsize =
Original file line number Diff line number Diff line change @@ -881,8 +881,6 @@ impl<'a> TyLoweringContext<'a> {
881
881
cov_mark:: hit!( lower_rpit) ;
882
882
let self_ty =
883
883
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 ( ) ) ;
886
884
let predicates = self . with_shifted_in ( DebruijnIndex :: ONE , |ctx| {
887
885
let mut predicates: Vec < _ > = bounds
888
886
. iter ( )
@@ -907,7 +905,6 @@ impl<'a> TyLoweringContext<'a> {
907
905
}
908
906
predicates
909
907
} ) ;
910
- self . unsized_types . replace ( outer_unsized_types) ;
911
908
912
909
ReturnTypeImplTrait { bounds : crate :: make_only_type_binders ( 1 , predicates) }
913
910
}
Original file line number Diff line number Diff line change @@ -747,7 +747,7 @@ fn bar(worble: ()) ${0:-> ()} {
747
747
check_assist (
748
748
generate_function,
749
749
r#"
750
- #[lang = " sized"] trait Sized {}
750
+ //- minicore: sized
751
751
trait Foo {}
752
752
fn foo() -> impl Foo {
753
753
todo!()
@@ -757,7 +757,6 @@ fn baz() {
757
757
}
758
758
"# ,
759
759
r#"
760
- #[lang = "sized"] trait Sized {}
761
760
trait Foo {}
762
761
fn foo() -> impl Foo {
763
762
todo!()
You can’t perform that action at this time.
0 commit comments