File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
trunk/src/librustc/middle Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: c6c1a22c563e0840f0efcccfe01a496114ac6ef0
2
+ refs/heads/master: 6867d91d20a77ad9be4288829cedec2a8c2b72ba
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: afbcbbc77ffc6b10053bc543daf7d2e05d68cc01
5
5
refs/heads/try: 296eb104620b346d88bc4a2c2ab7693e6d3db019
Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ fn check_struct_safe_for_destructor(cx: &mut Context,
87
87
span : Span ,
88
88
struct_did : DefId ) {
89
89
let struct_tpt = ty:: lookup_item_type ( cx. tcx , struct_did) ;
90
- if !struct_tpt. generics . has_type_params ( subst:: TypeSpace ) {
90
+ if !struct_tpt. generics . has_type_params ( subst:: TypeSpace )
91
+ && !struct_tpt. generics . has_region_params ( subst:: TypeSpace ) {
91
92
let struct_ty = ty:: mk_struct ( cx. tcx , struct_did,
92
93
subst:: Substs :: empty ( ) ) ;
93
94
if !ty:: type_is_sendable ( cx. tcx , struct_ty) {
Original file line number Diff line number Diff line change @@ -984,6 +984,10 @@ impl Generics {
984
984
pub fn has_type_params ( & self , space : subst:: ParamSpace ) -> bool {
985
985
!self . types . is_empty_in ( space)
986
986
}
987
+
988
+ pub fn has_region_params ( & self , space : subst:: ParamSpace ) -> bool {
989
+ !self . regions . is_empty_in ( space)
990
+ }
987
991
}
988
992
989
993
/// When type checking, we use the `ParameterEnvironment` to track
You can’t perform that action at this time.
0 commit comments