mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Fix ForTypeRepr docs and test with proper instance
This commit is contained in:
@@ -1158,13 +1158,12 @@ class _:
|
||||
@annotate(ForTypeRepr)
|
||||
class _:
|
||||
"""
|
||||
A type with a higher-ranked `for` modifier. This is currently not valid Rust syntax (`for<...>` can
|
||||
only be applied to traits to form a `TypeBound`).
|
||||
A function pointer type with a `for` modifier.
|
||||
|
||||
For example:
|
||||
```rust
|
||||
fn foo(value: for<'a> usize) {} // DOESN'T COMPILE
|
||||
// ^^^^^^^^^^^^^
|
||||
type RefOp<X> = for<'a> fn(&'a X) -> &'a X;
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
```
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user