File tree 3 files changed +7
-2
lines changed
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3936,6 +3936,7 @@ impl<'a> Resolver<'a> {
3936
3936
item. id ,
3937
3937
ItemRibKind ) ,
3938
3938
|this| {
3939
+ this. resolve_type_parameters ( & generics. ty_params ) ;
3939
3940
visit:: walk_item ( this, item, ( ) ) ;
3940
3941
} ) ;
3941
3942
}
Original file line number Diff line number Diff line change @@ -488,7 +488,9 @@ pub fn ensure_no_ty_param_bounds(ccx: &CrateCtxt,
488
488
generics : & ast:: Generics ,
489
489
thing : & ' static str ) {
490
490
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 {
492
494
match * bound {
493
495
ast:: TraitTyParamBound ( ..) | ast:: UnboxedFnTyParamBound ( ..) => {
494
496
// According to accepted RFC #XXX, we should
@@ -1076,9 +1078,10 @@ fn add_unsized_bound(ccx: &CrateCtxt,
1076
1078
desc : & str ,
1077
1079
span : Span ) {
1078
1080
let kind_id = ccx. tcx . lang_items . require ( SizedTraitLangItem ) ;
1081
+
1079
1082
match unbound {
1080
1083
& 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.
1082
1085
let trait_def_id = ty:: trait_ref_to_def_id ( ccx. tcx , tpb) ;
1083
1086
match kind_id {
1084
1087
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>;
24
24
enum E < Sized ? X > { }
25
25
impl < Sized ? X > T1 for S1 < X > { }
26
26
fn f < Sized ? X > ( ) { }
27
+ type TT < Sized ? T > = T ;
27
28
28
29
pub fn main ( ) {
29
30
}
You can’t perform that action at this time.
0 commit comments