This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
tests/ui/impl-trait/in-trait Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ // Don't panic when iterating through the `hir::Map::parent_iter` of an RPITIT.
2+
3+ pub trait Foo {
4+ fn demo ( ) -> impl Foo
5+ //~^ ERROR the trait bound `String: Copy` is not satisfied
6+ where
7+ String : Copy ;
8+ //~^ ERROR the trait bound `String: Copy` is not satisfied
9+ }
10+
11+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0277]: the trait bound `String: Copy` is not satisfied
2+ --> $DIR/synthetic-hir-has-parent.rs:7:9
3+ |
4+ LL | String: Copy;
5+ | ^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
6+ |
7+ = help: see issue #48214
8+ help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
9+ |
10+ LL + #![feature(trivial_bounds)]
11+ |
12+
13+ error[E0277]: the trait bound `String: Copy` is not satisfied
14+ --> $DIR/synthetic-hir-has-parent.rs:4:18
15+ |
16+ LL | fn demo() -> impl Foo
17+ | ^^^^^^^^ the trait `Copy` is not implemented for `String`
18+ |
19+ = help: see issue #48214
20+ help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
21+ |
22+ LL + #![feature(trivial_bounds)]
23+ |
24+
25+ error: aborting due to 2 previous errors
26+
27+ For more information about this error, try `rustc --explain E0277`.
You can’t perform that action at this time.
0 commit comments