Skip to content

Commit 7561bd4

Browse files
---
yaml --- r: 226159 b: refs/heads/master c: 2a08cff h: refs/heads/master i: 226157: e98d857 226155: 6a51cbc 226151: 76419f9 226143: a00302e v: v3
1 parent 77b9426 commit 7561bd4

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 99796a6c9c98f17c93384228396a8a808b46a1a0
2+
refs/heads/master: 2a08cff97c94160ddd06cdec380bbde8bd4f1d1b
33
refs/heads/snap-stage3: a5c12f4e39d32af3c951b66bd2839bc0b5a1125b
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/librustc_resolve/diagnostics.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,8 @@ impl Something {} // error: use of undeclared type name `Something`
406406
trait Foo {
407407
fn bar(N); // error: use of undeclared type name `N`
408408
}
409+
// or:
410+
fn foo(x: T) {} // error: use of undeclared type name `T`
409411
```
410412
411413
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:
414416
```
415417
struct Something;
416418
417-
impl Something {}
419+
impl Something {} // ok!
418420
// or:
419421
trait Foo {
420422
type N;
421423
422-
fn bar(Self::N);
424+
fn bar(Self::N); // ok!
423425
}
426+
//or:
427+
fn foo<T>(x: T) {} // ok!
424428
```
425429
"##,
426430

@@ -436,9 +440,8 @@ let Foo = 12i32; // error: declaration of `Foo` shadows an enum variant or
436440
```
437441
438442
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:
442445
443446
```
444447
struct Foo;

0 commit comments

Comments
 (0)