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

Add sample fix for E0749 #75360

Merged
merged 4 commits into from
Aug 11, 2020
Merged
Changes from 1 commit
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
1 change: 1 addition & 0 deletions src/librustc_error_codes/error_codes/E0749.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ trait MyTrait {
impl !MyTrait for u32 {
type Foo = i32; // error!
}
// impl !MyTrait for u32 {} // fix
Copy link
Member

Choose a reason for hiding this comment

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

Instead of putting it inside the erroneous code example, it would be better to put it into another code block at the end like the other explanations do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, I applied the suggestion. Do we need fn main() {}?

Copy link
Member

Choose a reason for hiding this comment

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

I never remember how rustdoc handles global attributes #![...], so let's wait to see if the CI is happy and we'll know for sure. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GuillaumeGomez Should we remove it? fn main

Copy link
Member

Choose a reason for hiding this comment

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

I guess we should indeed. Please also squash your commits.

Copy link
Contributor Author

@pickfire pickfire Aug 10, 2020

Choose a reason for hiding this comment

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

I am doing most documentation stuff from github directly, I don't want to interact with many branches (~5) I had on rust. (I am also lazy to compile rust, so sometimes I even test out if it works by sending a pull request to run it in CI)

But rather, --squash is troublesome, doing git rebase --autosquash is better, just git --fixup HEAD~ and that.

Copy link
Member

Choose a reason for hiding this comment

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

4 commits for 11 lines of uncontroversial documentation seems like super huge to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, rust already have > 120,000 commits, adding 4 won't make a difference, I do think it is a lot. I will squash if it is required, otherwise I rather be lazy and not squash. :P

# fn main() {}
```

Expand Down