Skip to content

make RustaceansAreAwesome satisfy trait bounds - #163200

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
dianne:dyn-satisfies-bounds
Sep 29, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
dianne:dyn-satisfies-bounds

Conversation

@dianne

@dianne dianne commented Sep 23, 2026

Copy link
Copy Markdown
Member

We use RustaceansAreAwesome in place of dyn Trait when checking whether Trait's methods' receivers are dyn-dispatchable. Trait's where-bounds should hold for it.

Fixes #161621

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 23, 2026
Comment on lines +29 to +30
//~| ERROR type mismatch resolving
//~| ERROR the size for values of type `RustaceansAreAwesome` cannot be known

@dianne dianne Sep 23, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These extra errors should be removed by #163201

View changes since the review

@rust-log-analyzer

This comment has been minimized.

@dianne

dianne commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

I can't tell what the failure is supposed to be there. following the instructions to reproduce locally also turns up nothing. I'll just try re-running PR CI

@dianne
dianne force-pushed the dyn-satisfies-bounds branch from b4c7073 to 452a7ca Compare September 23, 2026 09:29
@dianne

dianne commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

looks like it was nothing.

I'm guessing this doesn't need an FCP since it fixes a regression. I don't think it should instantly stabilize anything that wasn't allowed prior to this check being formulated in terms of DispatchFromDyn

but to be sure, r? types

@rustbot rustbot added the T-types Relevant to the types team, which will review and decide on the PR/issue. label Sep 23, 2026
@dianne
dianne marked this pull request as ready for review September 23, 2026 12:51
@rustbot rustbot 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 Sep 23, 2026
@oli-obk

oli-obk commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

@bors r+

finnicky situation. I wonder if we can fix it properly at some point by avoiding the need for RustaceansAreAwesome by avoiding the cycle in some other way.

Either way, it makes both sense that the change would fix those issues and that it just adds the bounds (that we we already add to Self) also to RustaceansAreAwesome, which is just a placeholder doing the same thing as Self but avoiding a cycle in dyn trait checks

@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 452a7ca has been approved by oli-obk

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Sep 28, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 28, 2026
…-obk

make `RustaceansAreAwesome` satisfy trait bounds

We use `RustaceansAreAwesome` in place of `dyn Trait` when checking whether `Trait`'s methods' receivers are dyn-dispatchable. `Trait`'s where-bounds should hold for it.

Fixes rust-lang#161621
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 28, 2026
…-obk

make `RustaceansAreAwesome` satisfy trait bounds

We use `RustaceansAreAwesome` in place of `dyn Trait` when checking whether `Trait`'s methods' receivers are dyn-dispatchable. `Trait`'s where-bounds should hold for it.

Fixes rust-lang#161621
rust-bors Bot pushed a commit that referenced this pull request Sep 28, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #158936 (Add `std::fs::{Home|Media}Dirs`)
 - #129036 (Additional NonZero conversions)
 - #158997 (Avoid recording unnameable `extern crate` aliases in diagnostic metadata)
 - #161015 (Stabilize `funnel_shifts` (including `const`))
 - #161712 (Stabilize `Result::into_{ok,err}`)
 - #162493 (Add support for -Zsanitizer-cfi-minimal-runtime)
 - #162655 (next solver: prefer to select impl candidates over global where-clause candidates)
 - #162862 (Fix intra doc link resolution when a doc comment is composed of both inner and outer doc comment)
 - #163200 (make `RustaceansAreAwesome` satisfy trait bounds)
 - #163331 (Move `Arc` and `Rc` into `rcs` mod)
 - #163427 (implement #![feature(gca_adts)])
 - #163428 (do not complain about unstable target features on nightly)
 - #163444 (Add `stable_rustc` helper in `run-make-support`)
 - #163447 (Allow using different index types when reading and writing to tables)
 - #163450 (Force the correct type variable to never for method resolution on an adjusted never type)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 29, 2026
…-obk

make `RustaceansAreAwesome` satisfy trait bounds

We use `RustaceansAreAwesome` in place of `dyn Trait` when checking whether `Trait`'s methods' receivers are dyn-dispatchable. `Trait`'s where-bounds should hold for it.

Fixes rust-lang#161621
rust-bors Bot pushed a commit that referenced this pull request Sep 29, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #162655 (next solver: prefer to select impl candidates over global where-clause candidates)
 - #162832 (add `Div` and `Mul` for `Complex<{float}>`)
 - #162862 (Fix intra doc link resolution when a doc comment is composed of both inner and outer doc comment)
 - #163024 (Add `Dir` equivalents of `fs::metadata` & `fs::symlink_metadata`)
 - #163200 (make `RustaceansAreAwesome` satisfy trait bounds)
 - #163210 (std: split stack overflow module)
 - #163331 (Move `Arc` and `Rc` into `rcs` mod)
 - #163183 (Add .seek_read_buf_exact() to std::os::windows::fs::FileExt)
 - #163450 (Force the correct type variable to never for method resolution on an adjusted never type)
rust-bors Bot pushed a commit that referenced this pull request Sep 29, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #158997 (Avoid recording unnameable `extern crate` aliases in diagnostic metadata)
 - #162655 (next solver: prefer to select impl candidates over global where-clause candidates)
 - #162832 (add `Div` and `Mul` for `Complex<{float}>`)
 - #162862 (Fix intra doc link resolution when a doc comment is composed of both inner and outer doc comment)
 - #163200 (make `RustaceansAreAwesome` satisfy trait bounds)
 - #163210 (std: split stack overflow module)
 - #163331 (Move `Arc` and `Rc` into `rcs` mod)
 - #163183 (Add .seek_read_buf_exact() to std::os::windows::fs::FileExt)
 - #163450 (Force the correct type variable to never for method resolution on an adjusted never type)
@rust-bors
rust-bors Bot merged commit 5208401 into rust-lang:main Sep 29, 2026
13 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Sep 29, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 29, 2026
Rollup merge of #163200 - dianne:dyn-satisfies-bounds, r=oli-obk

make `RustaceansAreAwesome` satisfy trait bounds

We use `RustaceansAreAwesome` in place of `dyn Trait` when checking whether `Trait`'s methods' receivers are dyn-dispatchable. `Trait`'s where-bounds should hold for it.

Fixes #161621
@dianne
dianne deleted the dyn-satisfies-bounds branch September 29, 2026 12:32
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Sep 30, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#158997 (Avoid recording unnameable `extern crate` aliases in diagnostic metadata)
 - rust-lang/rust#162655 (next solver: prefer to select impl candidates over global where-clause candidates)
 - rust-lang/rust#162832 (add `Div` and `Mul` for `Complex<{float}>`)
 - rust-lang/rust#162862 (Fix intra doc link resolution when a doc comment is composed of both inner and outer doc comment)
 - rust-lang/rust#163200 (make `RustaceansAreAwesome` satisfy trait bounds)
 - rust-lang/rust#163210 (std: split stack overflow module)
 - rust-lang/rust#163331 (Move `Arc` and `Rc` into `rcs` mod)
 - rust-lang/rust#163183 (Add .seek_read_buf_exact() to std::os::windows::fs::FileExt)
 - rust-lang/rust#163450 (Force the correct type variable to never for method resolution on an adjusted never type)
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Sep 30, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#158997 (Avoid recording unnameable `extern crate` aliases in diagnostic metadata)
 - rust-lang/rust#162655 (next solver: prefer to select impl candidates over global where-clause candidates)
 - rust-lang/rust#162832 (add `Div` and `Mul` for `Complex<{float}>`)
 - rust-lang/rust#162862 (Fix intra doc link resolution when a doc comment is composed of both inner and outer doc comment)
 - rust-lang/rust#163200 (make `RustaceansAreAwesome` satisfy trait bounds)
 - rust-lang/rust#163210 (std: split stack overflow module)
 - rust-lang/rust#163331 (Move `Arc` and `Rc` into `rcs` mod)
 - rust-lang/rust#163183 (Add .seek_read_buf_exact() to std::os::windows::fs::FileExt)
 - rust-lang/rust#163450 (Force the correct type variable to never for method resolution on an adjusted never type)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nonsensical "trait bound is not satisfied" error on trait method definition

4 participants