-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: David Wood <[email protected]>
- Loading branch information
Showing
4 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn f(_: B) {} | ||
//~^ ERROR cannot find type `B` in this scope [E0412] | ||
|
||
fn main() { | ||
let _ = [0; f as usize]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error[E0412]: cannot find type `B` in this scope | ||
--> $DIR/issue-112630-1.rs:1:9 | ||
| | ||
LL | fn f(_: B) {} | ||
| ^ not found in this scope | ||
| | ||
help: you might be missing a type parameter | ||
| | ||
LL | fn f<B>(_: B) {} | ||
| +++ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
enum Foo { | ||
Bar(B), | ||
//~^ ERROR cannot find type `B` in this scope [E0412] | ||
} | ||
|
||
fn main() { | ||
let _ = [0; Foo::Bar as usize]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error[E0412]: cannot find type `B` in this scope | ||
--> $DIR/issue-112630.rs:2:9 | ||
| | ||
LL | Bar(B), | ||
| ^ not found in this scope | ||
| | ||
help: you might be missing a type parameter | ||
| | ||
LL | enum Foo<B> { | ||
| +++ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0412`. |