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

doc: rename 'nil' to 'unit' when describing () #12210

Merged
merged 1 commit into from
Feb 13, 2014
Merged

doc: rename 'nil' to 'unit' when describing () #12210

merged 1 commit into from
Feb 13, 2014

Conversation

zr40
Copy link
Contributor

@zr40 zr40 commented Feb 12, 2014

According to kimundi on IRC, the current term for () is 'unit'. This commit updates tutorial.md to change 'nil' to 'unit' where () is described.

@brson
Copy link
Contributor

brson commented Feb 12, 2014

I don't know when this type became 'unit' but I guess it's done.

@eddyb
Copy link
Member

eddyb commented Feb 12, 2014

Should probably replace the multitude of nil occurrences in libsyntax and librustc with unit, at some point.

@crazymykl
Copy link

Having unit and unit as types is not friendly to dyslexics.

@huonw
Copy link
Member

huonw commented Feb 12, 2014

Having unit and unit

And your typo there is more evidence. :)

I agree with @crazymykl, I think this should get more discussion.

@lilyball
Copy link
Contributor

The type theory name for this type is the Unit type, so naming it unit seems the correct thing to do. nil always struck me as a bad name for it because it means something different than it does in pretty much every programming language that as a nil. The potential confusion with uint is unfortunate, but since the type isn't actually called unit in the type system, it's called (), I think it's ok.

@crazymykl
Copy link

Maybe it should be preferred to write () where possible, with a parenthetical mentioning it is pronounced unit/nil where appropriate.

bors added a commit that referenced this pull request Feb 13, 2014
According to kimundi on IRC, the current term for `()` is 'unit'. This commit updates tutorial.md to change 'nil' to 'unit' where `()` is described.
@bors bors closed this Feb 13, 2014
@bors bors merged commit 4f72c01 into rust-lang:master Feb 13, 2014
@zr40 zr40 deleted the patch-1 branch February 19, 2014 17:54
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 8, 2024
…71, r=blyxyas

Add regression ui test for rust-lang#2371

Fixes rust-lang#2371.

rust-lang#2371 seems to already be handled correctly in the lint. This PR adds a ui regression test so we can close it.

r? `@blyxyas`

changelog: Add regression ui test for rust-lang#2371
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.

7 participants