Skip to content

Improve E0211 error diagnostic #29260

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

Merged
merged 1 commit into from
Oct 24, 2015
Merged

Conversation

GuillaumeGomez
Copy link
Member

@@ -2348,8 +2348,8 @@ For information on the design of the orphan rules, see [RFC 1023].
"##,

E0211: r##"
You used an intrinsic function which doesn't correspond to its
definition. Erroneous code example:
You used a function/type which doesn't correspond to its
Copy link
Member

Choose a reason for hiding this comment

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

"You used a function or type which doesn't fit the requirements for where it was used"

(definition is wrong here)

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought it was an invalid type/function which didn't correspond to what was expected. Whar is still wrong ?

Copy link
Member

Choose a reason for hiding this comment

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

Not all of these have a corresponding "definition"

Copy link
Member Author

Choose a reason for hiding this comment

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

Which one doesn't have then ? And what "global" explanation would you give instead ?

}
```

The second case example is a bit particular : main function must always
Copy link
Member

Choose a reason for hiding this comment

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

the main function

@GuillaumeGomez
Copy link
Member Author

Updated !

@Manishearth
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 23, 2015

📌 Commit 77053e2 has been approved by Manishearth

}
```

The second case example is a bit particular : the main function must always
Copy link
Contributor

Choose a reason for hiding this comment

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

odd spacing here with the colon

Copy link
Member Author

Choose a reason for hiding this comment

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

Oups, french habit...

@bors
Copy link
Collaborator

bors commented Oct 24, 2015

⌛ Testing commit 77053e2 with merge 43869e9...

@bors bors merged commit 77053e2 into rust-lang:master Oct 24, 2015
@GuillaumeGomez GuillaumeGomez deleted the E0211_improvement branch October 24, 2015 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants