Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

ices/68543.rs: fixed with errors #527

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#68543

#![feature(unsized_locals)]
#![crate_type = "lib"]

use std::future::Future;

async fn bug<T>(mut f: dyn Future<Output = T> + Unpin) -> T {
    (&mut f).await
}
=== stdout ===
=== stderr ===
warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/68543.rs:1:12
  |
1 | #![feature(unsized_locals)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information

error[E0277]: the size for values of type `(dyn Future<Output = T> + Unpin + 'static)` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/68543.rs:6:17
  |
6 | async fn bug<T>(mut f: dyn Future<Output = T> + Unpin) -> T {
  |                 ^^^^^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `(dyn Future<Output = T> + Unpin + 'static)`
  = help: unsized fn params are gated as an unstable feature
help: function arguments must have a statically known size, borrowed types always have a known size
  |
6 | async fn bug<T>(&mut f: dyn Future<Output = T> + Unpin) -> T {
  |                 ^

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0277`.
==============

=== stdout ===
=== stderr ===
warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/68543.rs:1:12
  |
1 | #![feature(unsized_locals)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #48055 <rust-lang/rust#48055> for more information

error[E0277]: the size for values of type `(dyn Future<Output = T> + Unpin + 'static)` cannot be known at compilation time
 --> /home/runner/work/glacier/glacier/ices/68543.rs:6:17
  |
6 | async fn bug<T>(mut f: dyn Future<Output = T> + Unpin) -> T {
  |                 ^^^^^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `(dyn Future<Output = T> + Unpin + 'static)`
  = help: unsized fn params are gated as an unstable feature
help: function arguments must have a statically known size, borrowed types always have a known size
  |
6 | async fn bug<T>(&mut f: dyn Future<Output = T> + Unpin) -> T {
  |                 ^

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0277`.
==============
@JohnTitor
Copy link
Member

This one is still ICE with unsized_fn_params and unsized_locals.

@Alexendoo Alexendoo deleted the autofix/ices/68543.rs branch October 29, 2020 12:49
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants