Generalize E0401
This commit is contained in:
parent
3cd97ed3c3
commit
b00e408e61
35 changed files with 141 additions and 153 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue