-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Clean up E0754 explanation #75626
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 E0754 explanation #75626
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,31 +1,27 @@ | ||||||||
| An non-ascii identifier was used in an invalid context. | ||||||||
|
|
||||||||
| Erroneous code example: | ||||||||
| Erroneous code examples: | ||||||||
|
|
||||||||
| ```compile_fail,E0754 | ||||||||
| # #![feature(non_ascii_idents)] | ||||||||
| mod řųśť; | ||||||||
| // ^ error! | ||||||||
| fn main() {} | ||||||||
| ``` | ||||||||
|
|
||||||||
| ```compile_fail,E0754 | ||||||||
| # #![feature(non_ascii_idents)] | ||||||||
| #[no_mangle] | ||||||||
| fn řųśť() {} | ||||||||
| // ^ error! | ||||||||
|
||||||||
| fn řųśť() {} | |
| // ^ error! | |
| fn řųśť() {} // error! |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[path] attribute? What is that, should we do a link to that page?
| Non-ascii can be used as module names if it is inline or a `#[path]` attribute | |
| Non-ascii can be used as module names if it is inlined or a `#[path]` attribute |
Should it be "inlined" rather than "inline"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely! As for the path attribute, it allows you to link to a file module by its system path and give it a different name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but should we link it to the reference to let the users know what is that? I feel like this is a less known item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with external links is that they might change (for example in this case, this is: https://doc.rust-lang.org/reference/items/modules.html#the-path-attribute), even if they're part of the rust book.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But don't we have link check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only when referring to items inside the docs scope (so relative paths, not absolute ones).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make it
erroron the same line likeokon the same line as below?