Skip to content

Commit 2094668

Browse files
nikomatsakisbrson
authored andcommitted
continue to annotate trans functions as unsafe where neccessary
1 parent d4d7eb0 commit 2094668

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/comp/middle/trans_objects.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ fn create_backwarding_vtbl(cx: @local_ctxt, sp: span, inner_obj_ty: ty::t,
569569
// finish_vtbl: Given a vector of vtable entries, create the table in
570570
// read-only memory and return a pointer to it.
571571
fn finish_vtbl(cx: @local_ctxt, llmethods: [ValueRef], name: str) ->
572-
ValueRef {
572+
ValueRef unsafe {
573573
let vtbl = C_struct(llmethods);
574574
let vtbl_name = mangle_internal_name_by_path(cx.ccx, cx.path + [name]);
575575
let gvar =
@@ -619,7 +619,7 @@ fn begin_fn(cx: @local_ctxt, sp: span, m: @ty::method,
619619
// returns the value returned from that call.
620620
fn process_bkwding_mthd(cx: @local_ctxt, sp: span, m: @ty::method,
621621
ty_params: [ast::ty_param], outer_obj_ty: ty::t,
622-
_additional_field_tys: [ty::t]) -> ValueRef {
622+
_additional_field_tys: [ty::t]) -> ValueRef unsafe {
623623

624624
let llbackwarding_fn = begin_fn(cx, sp, m, ty_params, "backwarding_fn");
625625
let fcx = new_fn_ctxt(cx, sp, llbackwarding_fn);
@@ -724,7 +724,7 @@ fn process_bkwding_mthd(cx: @local_ctxt, sp: span, m: @ty::method,
724724
fn process_fwding_mthd(cx: @local_ctxt, sp: span, m: @ty::method,
725725
ty_params: [ast::ty_param], inner_obj_ty: ty::t,
726726
backwarding_vtbl: ValueRef,
727-
additional_field_tys: [ty::t]) -> ValueRef {
727+
additional_field_tys: [ty::t]) -> ValueRef unsafe {
728728

729729
// Create a new function context and block context for the function,
730730
// holding onto a pointer to the first block.

0 commit comments

Comments
 (0)