Skip to content

Commit

Permalink
Merge pull request #1463 from andreasfelix/patch-1
Browse files Browse the repository at this point in the history
Fix syntax in `'static lifetime elision` section of `lifetime-elision.md`
  • Loading branch information
matthewjasper authored Feb 9, 2024
2 parents 5be836c + 8c6c7cd commit 8c0b6a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lifetime-elision.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ usual rules, then it will error. By way of example:
# struct Bar;
# struct Baz;
# fn somefunc(a: &Foo, b: &Bar, c: &Baz) -> usize {42}
// Resolved as `fn<'a>(&'a str) -> &'a str`.
// Resolved as `for<'a> fn(&'a str) -> &'a str`.
const RESOLVED_SINGLE: fn(&str) -> &str = |x| x;

// Resolved as `Fn<'a, 'b, 'c>(&'a Foo, &'b Bar, &'c Baz) -> usize`.
// Resolved as `for<'a, 'b, 'c> Fn(&'a Foo, &'b Bar, &'c Baz) -> usize`.
const RESOLVED_MULTIPLE: &dyn Fn(&Foo, &Bar, &Baz) -> usize = &somefunc;
```

Expand Down

0 comments on commit 8c0b6a8

Please sign in to comment.