-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-bugCategory: This is a bug.Category: This is a bug.
Description
#[test] fn foo(){}
#[test] fn foo(){}
produces:
error[E0252]: the name `foo` is defined multiple times
--> ./test.rs:20:8
|
13 | pub fn foo() {
| --- previous import of the value `foo` here
...
20 | pub fn foo() {
| ^^^ `foo` reimported here
|
= note: `foo` must be defined only once in the value namespace of this module
help: You can use `as` to change the binding name of the import
|
20 | pub fn foo as other_foo() {
| ^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0252`.
PR responsible (sorry!): #52890
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-bugCategory: This is a bug.Category: This is a bug.