1
Fork 0

Generalize E0401

This commit is contained in:
León Orell Valerian Liehr 2023-09-10 23:06:14 +02:00
parent 3cd97ed3c3
commit b00e408e61
No known key found for this signature in database
GPG key ID: D17A07215F68E713
35 changed files with 141 additions and 153 deletions

View file

@ -1,4 +1,4 @@
Inner items do not inherit type or const parameters from the functions
Inner items do not inherit the generic parameters from the items
they are embedded in.
Erroneous code example:
@ -32,8 +32,8 @@ fn foo<T>(x: T) {
}
```
Items inside functions are basically just like top-level items, except
that they can only be used from the function they are in.
Items nested inside other items are basically just like top-level items, except
that they can only be used from the item they are in.
There are a couple of solutions for this.