-
Notifications
You must be signed in to change notification settings - Fork 13.7k
On E0277, point at type that doesn't implement bound #145641
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
Conversation
r? @davidtwco rustbot has assigned @davidtwco. Use |
This PR modifies |
This comment has been minimized.
This comment has been minimized.
e6812a5
to
7c6dfde
Compare
This comment has been minimized.
This comment has been minimized.
r=me once rebased to fix CI |
7c6dfde
to
8662dcf
Compare
This comment has been minimized.
This comment has been minimized.
When encountering an unmet trait bound, point at local type that doesn't implement the trait: ``` error[E0277]: the trait bound `Bar<T>: Foo` is not satisfied --> $DIR/issue-64855.rs:9:19 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | help: the trait `Foo` is not implemented for `Bar<T>` --> $DIR/issue-64855.rs:9:1 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^ ```
8662dcf
to
049c327
Compare
This PR was rebased onto a different master 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. |
@bors r=davidtwco |
…=davidtwco On E0277, point at type that doesn't implement bound When encountering an unmet trait bound, point at local type that doesn't implement the trait: ``` error[E0277]: the trait bound `Bar<T>: Foo` is not satisfied --> $DIR/issue-64855.rs:9:19 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | help: the trait `Foo` is not implemented for `Bar<T>` --> $DIR/issue-64855.rs:9:1 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^ ```
Rollup of 20 pull requests Successful merges: - #132087 (Fix overly restrictive lifetime in `core::panic::Location::file` return type) - #137396 (Recover `param: Ty = EXPR`) - #142185 (Convert moves of references to copies in ReferencePropagation) - #144443 (Make target pointer width in target json an integer) - #144648 (Implementation: `#[feature(nonpoison_rwlock)]`) - #144897 (print raw lifetime idents with r#) - #145218 ([Debuginfo] improve enum value formatting in LLDB for better readability) - #145380 (Add codegen-llvm regression tests) - #145573 (Add an experimental unsafe(force_target_feature) attribute.) - #145597 (resolve: Remove `ScopeSet::Late`) - #145641 (On E0277, point at type that doesn't implement bound) - #145669 (rustdoc-search: GUI tests check for `//` in URL) - #145695 (Introduce ProjectionElem::try_map.) - #145710 (Fix the ABI parameter inconsistency issue in debug.rs for LoongArch64) - #145726 (Experiment: Reborrow trait) - #145731 (Make raw pointers work in type-based search) - #145736 (triagebot: Update style team reviewers) - #145738 (Uplift rustc_mir_transform::coverage::counters::union_find to rustc_data_structures.) - #145743 (doc: fix some typos in comment) - #145745 (tests: Ignore basic-stepping.rs on LoongArch) Failed merges: - #145670 (port `sanitize` attribute to the new parsing infrastructure) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 28 pull requests Successful merges: - #132087 (Fix overly restrictive lifetime in `core::panic::Location::file` return type) - #137396 (Recover `param: Ty = EXPR`) - #137457 (Fix host code appearing in Wasm binaries) - #142185 (Convert moves of references to copies in ReferencePropagation) - #144648 (Implementation: `#[feature(nonpoison_rwlock)]`) - #144897 (print raw lifetime idents with r#) - #145218 ([Debuginfo] improve enum value formatting in LLDB for better readability) - #145380 (Add codegen-llvm regression tests) - #145573 (Add an experimental unsafe(force_target_feature) attribute.) - #145597 (resolve: Remove `ScopeSet::Late`) - #145633 (Fix some typos in LocalKey documentation) - #145641 (On E0277, point at type that doesn't implement bound) - #145669 (rustdoc-search: GUI tests check for `//` in URL) - #145695 (Introduce ProjectionElem::try_map.) - #145710 (Fix the ABI parameter inconsistency issue in debug.rs for LoongArch64) - #145726 (Experiment: Reborrow trait) - #145731 (Make raw pointers work in type-based search) - #145736 (triagebot: Update style team reviewers) - #145738 (Uplift rustc_mir_transform::coverage::counters::union_find to rustc_data_structures.) - #145742 (rustdoc js: Even more typechecking improvments ) - #145743 (doc: fix some typos in comment) - #145745 (tests: Ignore basic-stepping.rs on LoongArch) - #145747 (Refactor lint buffering to avoid requiring a giant enum) - #145751 (fix(lexer): Allow '-' in the frontmatter infostring continue set) - #145761 (Add aarch64_be-unknown-hermit target) - #145762 (convert strings to symbols in attr diagnostics) - #145763 (Ship LLVM tools for the correct target when cross-compiling) - #145765 (Revert suggestions for missing methods in tuples) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #145641 - estebank:point-at-type-in-e0277, r=davidtwco On E0277, point at type that doesn't implement bound When encountering an unmet trait bound, point at local type that doesn't implement the trait: ``` error[E0277]: the trait bound `Bar<T>: Foo` is not satisfied --> $DIR/issue-64855.rs:9:19 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | help: the trait `Foo` is not implemented for `Bar<T>` --> $DIR/issue-64855.rs:9:1 | LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ; | ^^^^^^^^^^^^^^^^^ ```
When encountering an unmet trait bound, point at local type that doesn't implement the trait: