File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -406,6 +406,8 @@ impl Something {} // error: use of undeclared type name `Something`
406
406
trait Foo {
407
407
fn bar(N); // error: use of undeclared type name `N`
408
408
}
409
+ // or:
410
+ fn foo(x: T) {} // error: use of undeclared type name `T`
409
411
```
410
412
411
413
To fix this error, please verify you didn't misspell the type name,
@@ -414,13 +416,15 @@ you did declare it or imported it into the scope. Examples:
414
416
```
415
417
struct Something;
416
418
417
- impl Something {}
419
+ impl Something {} // ok!
418
420
// or:
419
421
trait Foo {
420
422
type N;
421
423
422
- fn bar(Self::N);
424
+ fn bar(Self::N); // ok!
423
425
}
426
+ //or:
427
+ fn foo<T>(x: T) {} // ok!
424
428
```
425
429
"## ,
426
430
@@ -436,9 +440,8 @@ let Foo = 12i32; // error: declaration of `Foo` shadows an enum variant or
436
440
```
437
441
438
442
439
- To fix this error, make sure declarations do not shadow any enum variants or
440
- structures in the scope. Please also verify that neither name was misspelled.
441
- Example:
443
+ To fix this error, rename the variable such that it doesn't shadow any enum
444
+ variable or structure in scope. Example:
442
445
443
446
```
444
447
struct Foo;
You can’t perform that action at this time.
0 commit comments