Skip to content

Conversation

@treeman
Copy link
Contributor

@treeman treeman commented Jul 28, 2014

A larger example for std::rand.

A larger example for std::rand
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be taking &[uint] (since it's just reading them, no need to force an allocation; called like free_doors(&[car, choice])).

@alexcrichton
Copy link
Member

Looks good to me! Could you squash the commits together?

Copy link
Contributor

Choose a reason for hiding this comment

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

this should have a trailing comma

@treeman
Copy link
Contributor Author

treeman commented Jul 28, 2014

@steveklabnik currently the head documentation is surrounded in /*! ... */, which might confuse a bit with ///. Usually we use //! but I chose not to change it. I can if you want of course?

@steveklabnik
Copy link
Contributor

Well, what I was thinking was that if it was an example, we should show the code as a doc comment, since it's supposed to be documentation. But since it's inside other documentation, does this work?

And yeah, we should switch to //!, since that's the preferred style.

Copy link
Contributor

Choose a reason for hiding this comment

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

typo: "accurate", not "accuraty"

@treeman
Copy link
Contributor Author

treeman commented Jul 28, 2014

It renders fine as a doc comment the way it is now, but I will change it to use //! across the board.

@treeman
Copy link
Contributor Author

treeman commented Jul 28, 2014

Also fixed the typo mentioned by @pnkfelix, but rebased away.

@treeman
Copy link
Contributor Author

treeman commented Jul 31, 2014

@brson it seems this got stuck as "discussing" at bors.

bors added a commit that referenced this pull request Jul 31, 2014
A larger example for `std::rand`.
@bors bors closed this Jul 31, 2014
@bors bors merged commit 23b84e5 into rust-lang:master Jul 31, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2023
Fix WideChar offsets calculation in `line-index`

Fix rust-lang#15981. This PR addresses the issue with the WideChar's offset calculation, ensuring accurate line-specific positions during text analysis in the `lib/line-index` module.

## Changes Made

- Corrected the calculation for `WideChar` offsets, ensuring they reflect positions within respective lines.
- Added tests to verify the accuracy of `WideChar` offset calculations, and correct existing tests.
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 15, 2025
changelog: [`multiple_inherent_impl`]: Don't flag cfg(test) impls as
repeats

fixes rust-lang/rust-clippy#13040
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.

6 participants