GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Require that a `<_ as Try>::Residual` implement the `Residual` trait by scottmcm · Pull Request #154451 · rust-lang/rust Conversation
Member
The cc #154391
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
scottmcm
commented
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a more nuanced conversation about whether this should go further and also require
Suggested change
but that has a variety of implications, so I'd rather leave it for another time rather than this PR.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @scottmcm Where is that further step being discussed? And what are those implications?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
rustbot has assigned @petrochenkov. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
r? library |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Failed to set assignee to
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
r? libs |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
cc @rust-lang/libs-api
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| /// "foo-ness" of the residual so other types need to opt-in to interconversion. | ||
| #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] | ||
| type Residual; | ||
| type Residual: Residual<Self::Output>; |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| type Residual: Residual<Self::Output>; | |
| type Residual: [const] Residual<Self::Output>; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This needs more changes than just this so I'll leave it for a follow-up.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Per the discussion in the last @rust-lang/libs-api meeting, we're happy to defer to @scottmcm on the details here and the idea seems sound. Thanks ^^ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The `Residual` trait was even more experimental than `Try`, but now that RFC3721 is merged, I think it would make sense to require this.
c3021c3 to
3efcdbc
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@bors r=jhpratt |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Rollup of 18 pull requests Successful merges: - #154451 (Require that a `<_ as Try>::Residual` implement the `Residual` trait) - #154595 (Emit fatal on invalid const args with nested defs) - #154599 (report the `varargs_without_pattern` lint in deps) - #154699 (`core::unicode`: Replace `Cased` table with `Lt`) - #155353 (resolve: Remove `inaccessible_ctor_reexport` resolver field) - #155357 (Add `--remap-path-scope` as unstable in rustdoc) - #150649 (clippy fix: non_canonical_clone_impl) - #154604 (abort in core) - #154616 (Add `--quiet` flag to x.py and bootstrap to suppress output) - #155215 (Clean up `AttributeLintKind` and refactor diagnostic attribute linting) - #155228 (Check diagnostic output in incremental `cpass` and `rpass` revisions) - #155266 (Adjust release notes for post-merge feedback) - #155326 (Disallow ZST allocations with `TypedArena`.) - #155334 (docs: Use `0b1` instead of `NonZero::MIN` in `NonZero::bit_width` doctests) - #155340 (Handle nonnull pattern types in size skeleton) - #155347 (Add push_mut and new Layout methods to release notes) - #155356 (remove calls to AliasTyKind::def_id) - #155364 (Reduce diagnostic type visibilities.)
There was an error while loading. Please reload this page.
Rollup merge of #154451 - scottmcm:require-residual, r=jhpratt Require that a `<_ as Try>::Residual` implement the `Residual` trait The `Residual` trait was even more experimental than `Try`, but now that rust-lang/rfcs#3721 is merged, I think it would make sense to require this. Technically it's not strictly required, but without it something working on `<T: Try>` might need an extra bound even to use a homogeneous try block with the same output type as `T::Output`. (Another `where` will of course be needed to return a *different* `impl Try` type still.) cc #154391
Rollup of 18 pull requests Successful merges: - rust-lang/rust#154451 (Require that a `<_ as Try>::Residual` implement the `Residual` trait) - rust-lang/rust#154595 (Emit fatal on invalid const args with nested defs) - rust-lang/rust#154599 (report the `varargs_without_pattern` lint in deps) - rust-lang/rust#154699 (`core::unicode`: Replace `Cased` table with `Lt`) - rust-lang/rust#155353 (resolve: Remove `inaccessible_ctor_reexport` resolver field) - rust-lang/rust#155357 (Add `--remap-path-scope` as unstable in rustdoc) - rust-lang/rust#150649 (clippy fix: non_canonical_clone_impl) - rust-lang/rust#154604 (abort in core) - rust-lang/rust#154616 (Add `--quiet` flag to x.py and bootstrap to suppress output) - rust-lang/rust#155215 (Clean up `AttributeLintKind` and refactor diagnostic attribute linting) - rust-lang/rust#155228 (Check diagnostic output in incremental `cpass` and `rpass` revisions) - rust-lang/rust#155266 (Adjust release notes for post-merge feedback) - rust-lang/rust#155326 (Disallow ZST allocations with `TypedArena`.) - rust-lang/rust#155334 (docs: Use `0b1` instead of `NonZero::MIN` in `NonZero::bit_width` doctests) - rust-lang/rust#155340 (Handle nonnull pattern types in size skeleton) - rust-lang/rust#155347 (Add push_mut and new Layout methods to release notes) - rust-lang/rust#155356 (remove calls to AliasTyKind::def_id) - rust-lang/rust#155364 (Reduce diagnostic type visibilities.)
Rollup of 18 pull requests Successful merges: - rust-lang/rust#154451 (Require that a `<_ as Try>::Residual` implement the `Residual` trait) - rust-lang/rust#154595 (Emit fatal on invalid const args with nested defs) - rust-lang/rust#154599 (report the `varargs_without_pattern` lint in deps) - rust-lang/rust#154699 (`core::unicode`: Replace `Cased` table with `Lt`) - rust-lang/rust#155353 (resolve: Remove `inaccessible_ctor_reexport` resolver field) - rust-lang/rust#155357 (Add `--remap-path-scope` as unstable in rustdoc) - rust-lang/rust#150649 (clippy fix: non_canonical_clone_impl) - rust-lang/rust#154604 (abort in core) - rust-lang/rust#154616 (Add `--quiet` flag to x.py and bootstrap to suppress output) - rust-lang/rust#155215 (Clean up `AttributeLintKind` and refactor diagnostic attribute linting) - rust-lang/rust#155228 (Check diagnostic output in incremental `cpass` and `rpass` revisions) - rust-lang/rust#155266 (Adjust release notes for post-merge feedback) - rust-lang/rust#155326 (Disallow ZST allocations with `TypedArena`.) - rust-lang/rust#155334 (docs: Use `0b1` instead of `NonZero::MIN` in `NonZero::bit_width` doctests) - rust-lang/rust#155340 (Handle nonnull pattern types in size skeleton) - rust-lang/rust#155347 (Add push_mut and new Layout methods to release notes) - rust-lang/rust#155356 (remove calls to AliasTyKind::def_id) - rust-lang/rust#155364 (Reduce diagnostic type visibilities.)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.