Skip to content

Commit 37469c5

Browse files
---
yaml --- r: 229302 b: refs/heads/try c: 2a08cff h: refs/heads/master v: v3
1 parent bbf7d83 commit 37469c5

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,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 99796a6c9c98f17c93384228396a8a808b46a1a0
4+
refs/heads/try: 2a08cff97c94160ddd06cdec380bbde8bd4f1d1b
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/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)