Skip to content

Commit

Permalink
declare the a param explicitly, mistake pointed out by @gryznar
Browse files Browse the repository at this point in the history
  • Loading branch information
lattner committed Jun 11, 2023
1 parent da058f1 commit 3a18118
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proposals/lifetimes-keyword-renaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ the current Mojo keyword paint:
Instead of reading an argument as “this function takes foo which is a borrowed string”, we would read it as “foo is a borrow/ref of a string”. This makes it consistent with local borrows on the stack:

```mojo
fn do_stuff(x: ref(a) String): ...
fn do_stuff[a: lifetime](x: ref(a) String): ...
fn usage():
var str = String("hello")
Expand Down

0 comments on commit 3a18118

Please sign in to comment.