Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up E0761 explanation #75941

Merged
merged 1 commit into from
Aug 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/librustc_error_codes/error_codes/E0761.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,20 @@ Multiple candidate files were found for an out-of-line module.

Erroneous code example:

```rust
```ignore (multiple source files required for compile_fail)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never seen this, I thought ignore needs to be at the end?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually mandatory in error codes explanations. ;)

// file: ambiguous_module/mod.rs
fn foo() {}
```
```rust
// file: ambiguous_module.rs
fn foo() {}
```
```ignore (multiple source files required for compile_fail)
// file: lib.rs
mod ambiguous_module; // error: file for module `ambiguous_module`
// found at both ambiguous_module.rs and
// ambiguous_module.rs/mod.rs
fn main() {}
```

Please remove this ambiguity by deleting/renaming one of the candidate files.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one or more to be exact

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Please remove this ambiguity by deleting/renaming one of the candidate files.
Please remove this ambiguity by deleting/renaming one or more of the candidate files.