You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling playground v0.0.1 (/playground)
error[E0599]: no method named `make_owned` found for type `O` in the current scope
--> src/main.rs:92:27
|
92 | let owned = extracted.make_owned();
| ^^^^^^^^^^
|
= note: the method `make_owned` exists but the following trait bounds were not satisfied:
`&O : UnRef`
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `make_owned`, perhaps you need to implement it:
candidate #1: `UnRef`
error[E0277]: the trait bound `for<'a> <_ as Extract<'a, (TupleIndex1, TupleIndex2)>>::Out: UnRef` is not satisfied
--> src/main.rs:99:9
|
99 | generic::<_, (TupleIndex1, TupleIndex2), _>(a);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> UnRef` is not implemented for `<_ as Extract<'a, (TupleIndex1, TupleIndex2)>>::Out`
|
= help: the following implementations were found:
<&'a A as UnRef>
note: required by `generic`
--> src/main.rs:85:1
|
85 | / fn generic<T:'static, I, O>(t: T)
86 | | where
87 | | for<'a> T: Extract<'a, I, Out = O>,
88 | | //O: UnRef,
... |
92 | | let owned = extracted.make_owned();
93 | | }
| |_^
thread 'rustc' panicked at 'assertion failed: !ty.needs_infer() && !ty.has_placeholders()', src/librustc_typeck/check/writeback.rs:119:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: aborting due to 2 previous errors
Some errors occurred: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.34.0-nightly (f47ec2ad5 2019-02-14) running on x86_64-unknown-linux-gnu
note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type bin
note: some of the compiler flags provided by cargo are hidden
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
The text was updated successfully, but these errors were encountered:
Happens on the current beta release and the current nightly release.
Playground link
Code shared by the playground by clicking on report an issue:
(I'm aware that this code won't work, but rustc should not crash here)
(Playground)
Errors:
The text was updated successfully, but these errors were encountered: