# Rust 1.81.0 pre-release testing

**URL:** <https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479>\
**Category:** announcements\
**Created:** [September 3, 2024, 6:40pm UTC](https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479 "2024-09-03T18:40:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [September 3, 2024, 6:40pm UTC](https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479/1 "2024-09-03T18:40:05Z")

</div>

The 1.81.0 pre-release is ready for testing. The release is scheduled for September 5. [Release notes can be found here.](https://dev-doc.rust-lang.org/1.81.0/releases.html)

You can try it out locally by running:

```plaintext
RUSTUP_DIST_SERVER=https://dev-static.rust-lang.org rustup update stable

```

The index is [https://dev-static.rust-lang.org/dist/2024-09-03/index.html](https://dev-static.rust-lang.org/dist/2024-09-03/index.html).

The release team is also thinking about changes to our pre-release process: we'd love your feedback [on this GitHub issue](https://github.com/rust-lang/release-team/issues/16).

---

<div class="post-metadata">

**Author:** ![kornel](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/kornel/32/2711_2.png) [@kornel](https://internals.rust-lang.org/u/kornel)\
**Post date:** [September 3, 2024, 7:54pm UTC](https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479/3 "2024-09-03T19:54:35Z")

</div>

Good to see that [the warning](https://internals.rust-lang.org/t/type-inference-breakage-in-1-80-has-not-been-handled-well/21374) has made it:

> note: this is an inference error on crate `time` caused by an API change in Rust 1.80.0; update `time` to version `>=0.3.35` by calling `cargo update`

---

<div class="post-metadata">

**Author:** ![josh](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/josh/32/5934_2.png) [@josh](https://internals.rust-lang.org/u/josh)\
**Post date:** [September 4, 2024, 12:56am UTC](https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479/4 "2024-09-04T00:56:12Z")

</div>

Encountered an annoying instance of the new `dependency_on_unit_never_type_fallback` lint. Reduction (depends on the `nbd` crate):

```rust
pub fn handle_nbd() -> std::io::Result<()> {
    nbd::server::handshake(std::io::empty(), |_| {
        Ok(nbd::Export {
            ..Default::default()
        })
    })?;
    Ok(())
}

```

I can add a `data: (),` to the initializer of `nbd::Export` to work around this, but this seems awkward and unfortunate. This doesn't _seem_ like something where the never type needed to get involved in the first place.

`nbd::Export` has a default type parameter of `()`.

---

<div class="post-metadata">

**Author:** ![CAD97](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/cad97/32/3460_2.png) [@CAD97](https://internals.rust-lang.org/u/CAD97)\
**Post date:** [September 4, 2024, 1:46am UTC](https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479/5 "2024-09-04T01:46:01Z")

</div>

Unfortunately​ this is another culprit of defaults not affecting type inference. Constructing `nbd::Export::<_>` doesn't constrain the `Data` generic any and leaves it as an unconstrained​ inference variable.

There are certainly times where I wish omitting the generics list meant “use all defaults” instead of “infer all,” but the former has at least as many annoying cases as the latter, if not actually many more.

---

<div class="post-metadata">

**Author:** ![josh](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/josh/32/5934_2.png) [@josh](https://internals.rust-lang.org/u/josh)\
**Post date:** [September 4, 2024, 1:48am UTC](https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479/6 "2024-09-04T01:48:50Z")

</div>

Even with that, where is the `!` coming in? I could understand it going "I don't know what type you want, this is underconstrained", but why did it work _before_ while threatening to not work with the fallback change?

---

<div class="post-metadata">

**Author:** ![CAD97](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/cad97/32/3460_2.png) [@CAD97](https://internals.rust-lang.org/u/CAD97)\
**Post date:** [September 4, 2024, 1:55am UTC](https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479/7 "2024-09-04T01:55:52Z")

</div>

Exactly because `()` was used as a fallback type in cases of underconstrained type inference and the lint is warning in cases where that fallback occurs, AIUI.

Although, since choosing `!` here would require `!: Default`, it's at least _possible_ to determine `()` is the correct choice with a smidge of negative reasoning…

All of the underconstrained type fallback logics end up with weird edge case behaviors, unfortunately​.

---

<div class="post-metadata">

**Author:** ![josh](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/josh/32/5934_2.png) [@josh](https://internals.rust-lang.org/u/josh)\
**Post date:** [September 4, 2024, 2:01am UTC](https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479/8 "2024-09-04T02:01:35Z")

</div>

> [@CAD97](#):
>
> Although, since choosing `!` here would require `!: Default`, it's at least _possible_ to determine `()` is the correct choice with a smidge of negative reasoning…

That would be nice...

---

<div class="post-metadata">

**Author:** ![zirconium-n](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/zirconium-n/32/9078_2.png) [@zirconium-n](https://internals.rust-lang.org/u/zirconium-n)\
**Post date:** [September 4, 2024, 2:24am UTC](https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479/9 "2024-09-04T02:24:52Z")

</div>

> [@josh](#):
>
> Even with that, where is the `!` coming in?

I suspect it comes from the expansion of `?`, the residual type of try trait has `!` in it. But I don't have energy to check it now.

---

<div class="post-metadata">

**Author:** ![zirconium-n](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/zirconium-n/32/9078_2.png) [@zirconium-n](https://internals.rust-lang.org/u/zirconium-n)\
**Post date:** [September 4, 2024, 2:28am UTC](https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479/10 "2024-09-04T02:28:54Z")

</div>

😕 Not a fan of [regressing](https://github.com/rust-lang/rust/pull/120924/#issuecomment-2192600302) 0.6% rustc perf for a lint.

Edit: Ok it got the perf back in the following [PR](https://github.com/rust-lang/rust/pull/127313#issuecomment-2323484454). nvm

---

<div class="post-metadata">

**Author:** ![steffahn](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/steffahn/32/13288_2.png) [@steffahn](https://internals.rust-lang.org/u/steffahn)\
**Post date:** [February 26, 2026, 2:29am UTC](https://internals.rust-lang.org/t/rust-1-81-0-pre-release-testing/21479/13 "2026-02-26T02:29:21Z")

</div>

This topic was automatically closed 540 days after the last reply. New replies are no longer allowed.
