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 E0754 explanation #75626

Merged
merged 2 commits into from
Aug 18, 2020
Merged

Conversation

GuillaumeGomez
Copy link
Member

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 17, 2020
```

```compile_fail,E0754
# #![feature(non_ascii_idents)]

#[no_mangle]
fn řųśť() {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not make it error on the same line like ok on the same line as below?

Comment on lines 12 to 13
fn řųśť() {}
// ^ error!
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not make it error on the same line like ok on the same line as below?

Suggested change
fn řųśť() {}
// ^ error!
fn řųśť() {} // error!

fn main() {}
```

Non-ascii can be used as module names if it is inline
or a #\[path\] attribute is specified. For example:
Non-ascii can be used as module names if it is inline or a `#[path]` attribute
Copy link
Contributor

@pickfire pickfire Aug 17, 2020

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?

Suggested change
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"?

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

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).

@GuillaumeGomez
Copy link
Member Author

Updated.

Copy link
Contributor

@pickfire pickfire left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@GuillaumeGomez
Copy link
Member Author

@bors: r=pickfire rollup

@bors
Copy link
Contributor

bors commented Aug 17, 2020

📌 Commit 4fa69cb has been approved by pickfire

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 17, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 18, 2020
Rollup of 8 pull requests

Successful merges:

 - rust-lang#75389 (attempt to improve span_label docs)
 - rust-lang#75392 (Add `as_uninit`-like methods to pointer types and unify documentation of `as_ref` methods)
 - rust-lang#75464 (Move to intra doc links for ascii.rs and panic.rs)
 - rust-lang#75578 (Allowing raw ptr dereference in const fn)
 - rust-lang#75613 (Add explanation for `&mut self` method call when expecting `-> Self`)
 - rust-lang#75626 (Clean up E0754 explanation)
 - rust-lang#75629 (Use intra-doc links in `std::env`, `std::alloc` and `std::error`)
 - rust-lang#75634 (Mark x86_64-linux-kernel as *)

Failed merges:

r? @ghost
@bors bors merged commit 791768e into rust-lang:master Aug 18, 2020
@GuillaumeGomez GuillaumeGomez deleted the cleanup-e0754 branch August 18, 2020 07:24
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants