File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3931,6 +3931,7 @@ impl<'a> Resolver<'a> {
39313931 item. id ,
39323932 ItemRibKind ) ,
39333933 |this| {
3934+ this. resolve_type_parameters ( & generics. ty_params ) ;
39343935 visit:: walk_item ( this, item, ( ) ) ;
39353936 } ) ;
39363937 }
Original file line number Diff line number Diff line change @@ -488,7 +488,9 @@ pub fn ensure_no_ty_param_bounds(ccx: &CrateCtxt,
488488 generics : & ast:: Generics ,
489489 thing : & ' static str ) {
490490 for ty_param in generics. ty_params . iter ( ) {
491- for bound in ty_param. bounds . iter ( ) {
491+ let bounds = ty_param. bounds . iter ( ) ;
492+ let mut bounds = bounds. chain ( ty_param. unbound . iter ( ) ) ;
493+ for bound in bounds {
492494 match * bound {
493495 ast:: TraitTyParamBound ( ..) | ast:: UnboxedFnTyParamBound ( ..) => {
494496 // According to accepted RFC #XXX, we should
@@ -1076,9 +1078,10 @@ fn add_unsized_bound(ccx: &CrateCtxt,
10761078 desc : & str ,
10771079 span : Span ) {
10781080 let kind_id = ccx. tcx . lang_items . require ( SizedTraitLangItem ) ;
1081+
10791082 match unbound {
10801083 & Some ( ast:: TraitTyParamBound ( ref tpb) ) => {
1081- // # FIXME(8559) currently requires the unbound to be built-in.
1084+ // FIXME(# 8559) currently requires the unbound to be built-in.
10821085 let trait_def_id = ty:: trait_ref_to_def_id ( ccx. tcx , tpb) ;
10831086 match kind_id {
10841087 Ok ( kind_id) if trait_def_id != kind_id => {
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ struct S1<Sized? X>;
2424enum E < Sized ? X > { }
2525impl < Sized ? X > T1 for S1 < X > { }
2626fn f < Sized ? X > ( ) { }
27+ type TT < Sized ? T > = T ;
2728
2829pub fn main ( ) {
2930}
You can’t perform that action at this time.
0 commit comments