@@ -113,15 +113,15 @@ fn make_mir_scope<'gcc, 'tcx>(
113
113
let scope_data = & mir. source_scopes [ scope] ;
114
114
let parent_scope = if let Some ( parent) = scope_data. parent_scope {
115
115
make_mir_scope ( cx, _instance, mir, variables, debug_context, instantiated, parent) ;
116
- debug_context. scopes [ parent] . unwrap ( )
116
+ debug_context. scopes [ parent]
117
117
} else {
118
118
// The root is the function itself.
119
119
let file = cx. sess ( ) . source_map ( ) . lookup_source_file ( mir. span . lo ( ) ) ;
120
- debug_context. scopes [ scope] = Some ( DebugScope {
120
+ debug_context. scopes [ scope] = DebugScope {
121
121
file_start_pos : file. start_pos ,
122
122
file_end_pos : file. end_position ( ) ,
123
- ..debug_context. scopes [ scope] . unwrap ( )
124
- } ) ;
123
+ ..debug_context. scopes [ scope]
124
+ } ;
125
125
instantiated. insert ( scope) ;
126
126
return ;
127
127
} ;
@@ -130,7 +130,7 @@ fn make_mir_scope<'gcc, 'tcx>(
130
130
if !vars. contains ( scope) && scope_data. inlined . is_none ( ) {
131
131
// Do not create a DIScope if there are no variables defined in this
132
132
// MIR `SourceScope`, and it's not `inlined`, to avoid debuginfo bloat.
133
- debug_context. scopes [ scope] = Some ( parent_scope) ;
133
+ debug_context. scopes [ scope] = parent_scope;
134
134
instantiated. insert ( scope) ;
135
135
return ;
136
136
}
@@ -157,12 +157,12 @@ fn make_mir_scope<'gcc, 'tcx>(
157
157
// TODO(tempdragon): dbg_scope: Add support for scope extension here.
158
158
inlined_at. or ( p_inlined_at) ;
159
159
160
- debug_context. scopes [ scope] = Some ( DebugScope {
160
+ debug_context. scopes [ scope] = DebugScope {
161
161
dbg_scope,
162
162
inlined_at,
163
163
file_start_pos : loc. file . start_pos ,
164
164
file_end_pos : loc. file . end_position ( ) ,
165
- } ) ;
165
+ } ;
166
166
instantiated. insert ( scope) ;
167
167
}
168
168
@@ -232,12 +232,12 @@ impl<'gcc, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
232
232
}
233
233
234
234
// Initialize fn debug context (including scopes).
235
- let empty_scope = Some ( DebugScope {
235
+ let empty_scope = DebugScope {
236
236
dbg_scope : self . dbg_scope_fn ( instance, fn_abi, Some ( llfn) ) ,
237
237
inlined_at : None ,
238
238
file_start_pos : BytePos ( 0 ) ,
239
239
file_end_pos : BytePos ( 0 ) ,
240
- } ) ;
240
+ } ;
241
241
let mut fn_debug_context = FunctionDebugContext {
242
242
scopes : IndexVec :: from_elem ( empty_scope, mir. source_scopes . as_slice ( ) ) ,
243
243
inlined_function_scopes : Default :: default ( ) ,
0 commit comments