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 +44
-0
lines changed
tests/ui/higher-ranked/trait-bounds Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ error: the compiler unexpectedly panicked. this is a bug.
2+
3+ query stack during panic:
4+ #0 [evaluate_obligation] evaluating trait selection obligation `for<'a> [async fn body@$DIR/future.rs:32:35: 34:2]: core::future::future::Future`
5+ #1 [codegen_select_candidate] computing candidate for `<strlen as Trait>`
6+ end of query stack
Original file line number Diff line number Diff line change 1+ // ignore-tidy-linelength
2+ // edition:2021
3+ // revisions: classic next
4+ //[next] compile-flags: -Ztrait-solver=next
5+ //[next] check-pass
6+ //[classic] known-bug: #112347
7+ //[classic] build-fail
8+ //[classic] failure-status: 101
9+ //[classic] normalize-stderr-test "note: .*\n\n" -> ""
10+ //[classic] normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
11+ //[classic] normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
12+ //[classic] rustc-env:RUST_BACKTRACE=0
13+
14+ #![ feature( unboxed_closures) ]
15+
16+ use std:: future:: Future ;
17+
18+ trait Trait {
19+ fn func ( & self , _: & str ) ;
20+ }
21+
22+ impl < T > Trait for T
23+ where
24+ for < ' a > T : Fn < ( & ' a str , ) > + Send + Sync ,
25+ for < ' a > <T as FnOnce < ( & ' a str , ) > >:: Output : Future < Output = usize > + Send ,
26+ {
27+ fn func ( & self , _: & str ) {
28+ println ! ( "hello!" ) ;
29+ }
30+ }
31+
32+ async fn strlen ( x : & str ) -> usize {
33+ x. len ( )
34+ }
35+
36+ fn main ( ) {
37+ strlen. func ( "hi" ) ;
38+ }
You can’t perform that action at this time.
0 commit comments