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

Update RELEASES.md for 1.26.0 #49523

Merged
merged 3 commits into from
May 9, 2018
Merged

Update RELEASES.md for 1.26.0 #49523

merged 3 commits into from
May 9, 2018

Conversation

XAMPPRocky
Copy link
Member

@XAMPPRocky XAMPPRocky added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-release Relevant to the release subteam, which will review and decide on the PR/issue. labels Mar 30, 2018
@shepmaster shepmaster added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 30, 2018
@mark-i-m
Copy link
Member

Holy moly

@mark-i-m
Copy link
Member

The links at the end are not supposed to be rendered, right?

RELEASES.md Outdated
- [128-bit integers in the form of `u128` & `i128` are now stable.][49101]
- [`main` now accepts any type implementing the unstable trait
`Termination` (currently `()`, `!`,
`Result<(), E: Debug>`, `Result<!, E: Debug>`).][49162]
Copy link
Member

Choose a reason for hiding this comment

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

Maybe don't mention the trait, and just write

main() can now return !, Result<(), E: Debug> and Result<!, E: Debug> in additional to ().

?

RELEASES.md Outdated
- [Stabilised the `!` type (A type that has no value).][47630]
- [The inclusive range syntax e.g. `for x in 0..=10` is now stable.][47813]
- [`impl Trait` is now stable allowing you to have abstract
return types.][49255] e.g. `fn foo() -> impl Iterator<Item=u8>`
Copy link
Member

Choose a reason for hiding this comment

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

impl Trait can also appear in argument position e.g. fn open(a: impl AsRef<Path>).

RELEASES.md Outdated

Compiler
--------
- [LLD is now used as the default linker for `wasm32-unknown-target`.][48125]
Copy link
Member

Choose a reason for hiding this comment

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

wasm32-unknown-unknown.

RELEASES.md Outdated
Language
--------
- [Closures now implement `Copy + Clone` if all captured variables do.][49299]
- [Stabilised the `!` type (A type that has no value).][47630]
Copy link
Member

Choose a reason for hiding this comment

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

A type that has no value

! isn't just a ZST (zero sized type), it has special powers. Can't recall what exactly they were but a better name would be "never type".

Copy link
Member

Choose a reason for hiding this comment

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

Oh BTW, if we can't find a suitable fix for #49039 (comment), we may be forced to unstabilize ! again.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think there was a thread where it was decided that "never type" is the official, technically correct pronunciation of "! type", though unfortunately I can't find it. Since ! is how you spell it in code, I'd show both names: "Stabilised the ! type, also known as the "never" type".

Copy link
Member

Choose a reason for hiding this comment

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

"never" is what you need to search for to find it in the docs (https://doc.rust-lang.org/nightly/std/?search=never), so it would be good to include that name here.

Copy link
Member

Choose a reason for hiding this comment

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

Can't recall what exactly they were but a better name would be "never type".

Because there is no value of this type, if the compiler ever sees something with this type, it must be dead code and can be optimized out.

Copy link
Member

@scottmcm scottmcm Mar 31, 2018

Choose a reason for hiding this comment

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

struct Foo; is definitely a ZST: https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts

(enum Void {} can be considered as having "size -∞" that just gets saturated to zero since the API returns usize.)

Copy link
Member

Choose a reason for hiding this comment

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

To clarify: () and struct Foo; are Zero sized types: they have exactly one possible value (() and Foo, respectively), so they can be represented with log(1) = 0 bits, hence the name. ! is not zero-sized; it cannot be represented with any number of bits because there are no values of that type.

Copy link
Member

Choose a reason for hiding this comment

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

I'd say a ZST is any type T that fulfills std::mem::size_of::<T>() == 0. And ! does fulfill it so it is zero sized. I mean when ! has a size of zero, it must be zero-sized right?

In the "abstract" type check world, both struct Foo; and enum Var{} can have values. After all you can do things like let v: ! = panic!(); let w: u32 = v; println!("{}", w + 1);.

In the "technical" code gen world, both () and ! get optimized out, their "values" never get onto the stack. The difference only shows if stuff is nested in stuff like Result, but the nomicon claims that this optimisation is not yet being performed... might be outdated given eddyb's work on it.

So I believe that the statement "a type that has no value" is neither unique to the ! type (as there are types like enum Var {}) nor is 100% accurate as as far as type checking is concerned it actually can.

Copy link
Member

@mark-i-m mark-i-m Apr 2, 2018

Choose a reason for hiding this comment

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

And ! does fulfill it so it is zero sized.

Do you mean theoretically or in implementation? Theoretically, it should not have size zero; it's size is undefined. I don't know what the implementation of mem::size_of::<!>() does, though. I guess 0 is probably the most reasonable answer, but really None or panic! would be more correct...

Copy link
Contributor

Choose a reason for hiding this comment

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

@est31 There are expressions of uninhabited types (what you mean by "the type checking perspective"), but none of these expressions ever actually evaluate to a value (if they do via unsafe code, that's UB). So "no values" is an accurate if not unique description of !.

Though the specific phrasing "a type that has no value" has an unfortunate double meaning ("has no value" as in "is useless")...

@kennytm
Copy link
Member

kennytm commented Apr 2, 2018

We need to add fs::{read, write} #49422/#49521, fs::read_to_string() #49522 and process::id() #49574 assuming we still haven't branched beta yet.

@tmccombs
Copy link
Contributor

tmccombs commented Apr 2, 2018

and process::id()

I set the "since" to 1.27 for process::id() because I though beta had been branched. If it hasn't I can make another PR to set it to 1.26.

@kennytm
Copy link
Member

kennytm commented Apr 2, 2018

The branch point of 1.26 has just been set by #49589 to 097efa9. This contains process::id(). So yes @tmccombs we need another PR to change it back to 1.26. Remind us to backport that to beta as well.

RELEASES.md Outdated
- [Added hexadecimal formatting for integers with fmt::Debug][48978]
e.g. `assert!(format!("{:02x?}", b"Foo\0") == "[46, 6f, 6f, 00]")`
- [Implemented `Default, Hash` for `cmp::Reverse`.][48628]
- [Optimized `str::repeat` being 8x fast in large cases.][48657]
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: "fast" should be "faster"

tmccombs added a commit to tmccombs/rust that referenced this pull request Apr 3, 2018
It was stabilized right before the beta branch was cut for 1.26.0.

See rust-lang#49523 (comment)
kennytm added a commit to kennytm/rust that referenced this pull request Apr 3, 2018
Fix "since" version for getpid feature.

It was stabilized right before the beta branch was cut for 1.26.0.

See rust-lang#49523 (comment)

This will need to be backported to beta (1.26.0)
kennytm added a commit to kennytm/rust that referenced this pull request Apr 3, 2018
Fix "since" version for getpid feature.

It was stabilized right before the beta branch was cut for 1.26.0.

See rust-lang#49523 (comment)

This will need to be backported to beta (1.26.0)
RELEASES.md Outdated
`fn open(path: impl AsRef<Path>)`.
- [Pattern matching on references are now automatically dereferenced.][49394]
- [128-bit integers in the form of `u128` & `i128` are now stable.][49101]
- [`main` now accepts any type implementing the unstable trait
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of "now accepts any type" I might say "can now return any type"

RELEASES.md Outdated
`Termination` (currently `()`, `!`,
`Result<(), E: Debug>`, `Result<!, E: Debug>`).][49162]
- [`main` can now return `!`, `Result<(), E: Debug>`,
`Result<!, E: Debug>`).][49162] In addition to `()`.
Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary )..

RELEASES.md Outdated
_ => println!("Not all points were sequential."),
}
```
- [Parentheses are now allowed in `dyn` traits.][48481]
Copy link
Member

Choose a reason for hiding this comment

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

dyn Trait isn't stable yet, so should this go in the notes?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was wondering that myself but it was tagged with relnotes so I left it in.

Copy link
Member

Choose a reason for hiding this comment

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

@Aaronepower @steveklabnik The relnote was about a breaking change like this:

use std::ops::Fn as dyn;
fn g(_: Box<dyn(std::fmt::Debug)>) {}

Previously it compiles. Now it causes the E0658 "dyn Trait syntax is unstable" error.

Copy link
Member

Choose a reason for hiding this comment

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

oh huh

kennytm added a commit to kennytm/rust that referenced this pull request Apr 4, 2018
Fix "since" version for getpid feature.

It was stabilized right before the beta branch was cut for 1.26.0.

See rust-lang#49523 (comment)

This will need to be backported to beta (1.26.0)
@kennytm
Copy link
Member

kennytm commented Apr 4, 2018

Please also add #49458 ('_) and #49243 (String::retain) 😂

Given the large amount of stabilization and 1.26-beta being one-week-late, I suggest we double-check c83fa5d...097efa9 for any missing items.

kennytm pushed a commit to matklad/rust that referenced this pull request Apr 5, 2018
It was stabilized right before the beta branch was cut for 1.26.0.

See rust-lang#49523 (comment)
@pietroalbini pietroalbini added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 9, 2018
RELEASES.md Outdated

Language
--------
- [Closures now implement `Copy + Clone` if all captured variables do.][49299]
Copy link
Contributor

Choose a reason for hiding this comment

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

I read this as meaning that both Copy and Clone have to be implemented, thus Copy + Clone, but I think this change is also effective if the captured variables are only Clone.

RELEASES.md Outdated
return types.][49255] e.g. `fn foo() -> impl Iterator<Item=u8>` or
`fn open(path: impl AsRef<Path>)`.
- [Pattern matching on references are now automatically dereferenced.][49394]
- [128-bit integers in the form of `u128` & `i128` are now stable.][49101]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think “u128 and i128” is better than “u128 & i128”, both from a grammar (English not Rust) point of view and because the ampersand can be confused with the & operator at first glance.

@pietroalbini pietroalbini added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 16, 2018
RELEASES.md Outdated
Language
--------
- [Closures now implement `Copy + Clone` if all captured variables do.][49299]
- [Stabilised the `!` type.][47630] (Also known as the never type).
Copy link
Member

Choose a reason for hiding this comment

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

This is not going to be in 1.26 😢

RELEASES.md Outdated
`fn open(path: impl AsRef<Path>)`.
- [Pattern matching on references are now automatically dereferenced.][49394]
- [128-bit integers in the form of `u128` & `i128` are now stable.][49101]
- [`main` can now return `!`, `Result<(), E: Debug>`,
Copy link
Member

Choose a reason for hiding this comment

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

! should be removed from here.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 1, 2018
@XAMPPRocky
Copy link
Member Author

@Mark-Simulacrum Done

Copy link
Member

@ollie27 ollie27 left a comment

Choose a reason for hiding this comment

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

#46882 definitely needs to be mentioned. It stabilised a few things like const indexing.

RELEASES.md Outdated
- [`Option::cloned`]
- [`btree_map::Entry::and_modify`]
- [`convert::TryFrom`]
- [`convert::TryInto`]
Copy link
Member

Choose a reason for hiding this comment

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

TryFrom and TryInto were destabilised by #50121.

RELEASES.md Outdated
let _reversed_pair: &'static _ = &(PAIR.1, PAIR.0); // Doesn't work
}
```
- [Removed the deprecated unstable `SipHasher{13,24}` from documentation.][49108]
Copy link
Member

Choose a reason for hiding this comment

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

SipHasher{13,24} were never stable so there's no reason to include this change.

RELEASES.md Outdated
- [Implemented `Default, Hash` for `cmp::Reverse`.][48628]
- [Optimized `str::repeat` being 8x faster in large cases.][48657]
- [`ascii::escape_default` is now available in libcore.][48735]
- [Implemented `FromStr` for `PathBuf`][48292]
Copy link
Member

Choose a reason for hiding this comment

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

This is being reverted: #50401.

@XAMPPRocky
Copy link
Member Author

@ollie27 What in #46882 do you think specifically needs to be mentioned to users of Rust? There's a lot there.

@ollie27
Copy link
Member

ollie27 commented May 6, 2018

What in #46882 do you think specifically needs to be mentioned to users of Rust? There's a lot there.

It's a few small things like being able to use indexing, dereferencing and tuple struct constructors in a const context.

@XAMPPRocky XAMPPRocky added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 7, 2018
@Mark-Simulacrum
Copy link
Member

Okay, let's get this landed.

@bors r+

I'm going to say we're probably not going to backport to beta at this point.

@bors
Copy link
Contributor

bors commented May 7, 2018

📌 Commit 85f3ecf has been approved by Mark-Simulacrum

@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 May 7, 2018
@kennytm
Copy link
Member

kennytm commented May 9, 2018

@Aaronepower Could you incorporate comments from https://internals.rust-lang.org/t/1-26-0-prerelease-testing/7475/2 (a clarification on impl Trait) and #50555 (a compatibility note)?

@kennytm
Copy link
Member

kennytm commented May 9, 2018

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented May 9, 2018

📌 Commit 111786d has been approved by Mark-Simulacrum

kennytm added a commit to kennytm/rust that referenced this pull request May 9, 2018
bors added a commit that referenced this pull request May 9, 2018
Rollup of 11 pull requests

Successful merges:

 - #49988 (Mention Result<!, E> in never docs.)
 - #50148 (turn `ManuallyDrop::new` into a constant function)
 - #50456 (Update the Cargo submodule)
 - #50460 (Make `String::new()` const)
 - #50464 (Remove some transmutes)
 - #50505 (Added regression function match value test)
 - #50511 (Add some explanations for #[must_use])
 - #50525 (Optimize string handling in lit_token().)
 - #50527 (Cleanup a `use` in a raw_vec test)
 - #50539 (Add more logarithm constants)
 - #49523 (Update RELEASES.md for 1.26.0)

Failed merges:
@bors bors merged commit 111786d into rust-lang:master May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-release Relevant to the release subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet