Skip to content

Commit

Permalink
[mojo-lang] Fix MOCO-757: Transfer ^ of borrowed arg leads to double …
Browse files Browse the repository at this point in the history
…free (#40892)

Mojo used to support transfering out of `let` declarations, which
were immutable but owned.  We don't have to support this anymore,
so there is no reason to support transfering from immutable refs.

MODULAR_ORIG_COMMIT_REV_ID: ee2358b31fb300ab0843b53f54eea065b55e0fda
  • Loading branch information
lattner authored and modularbot committed Jun 7, 2024
1 parent 6fd7018 commit ee3f97d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/test/test_utils/types.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct MoveOnly[T: Movable](Movable):
var data: T
"""Test data payload."""

fn __init__(inout self, i: T):
fn __init__(inout self, owned i: T):
"""Construct a MoveOnly providing the payload data.
Args:
Expand Down

0 comments on commit ee3f97d

Please sign in to comment.