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

ices/68013.rs: fixed with errors #364

Merged
merged 1 commit into from
May 15, 2020
Merged

ices/68013.rs: fixed with errors #364

merged 1 commit into from
May 15, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#68013

// https://github.com/rust-lang/rust/issues/68013
// Reduced from [https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=0f18f9d5d6071f9a10586e87e5dfd0b0]

#![feature(coerce_unsized)]

// These imports are also needed to get the ICE.
use std::rc::Rc;
use std::cell::Cell;
use std::ops::Deref;
use std::ops::CoerceUnsized;

#[derive(Clone)]
struct Redirectable<'a, T: ?Sized> {
    data: Rc<Cell<&'a T>>
}

impl<U, T: CoerceUnsized<U>> CoerceUnsized<Redirectable<'_, U>> for Redirectable<'_, T> {}
=== stdout ===
=== stderr ===
warning: unused import: `std::ops::Deref`
 --> /home/runner/work/glacier/glacier/ices/68013.rs:9:5
  |
9 | use std::ops::Deref;
  |     ^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0601]: `main` function not found in crate `68013`
  --> /home/runner/work/glacier/glacier/ices/68013.rs:4:1
   |
4  | / #![feature(coerce_unsized)]
5  | |
6  | | // These imports are also needed to get the ICE.
7  | | use std::rc::Rc;
...  |
16 | |
17 | | impl<U, T: CoerceUnsized<U>> CoerceUnsized<Redirectable<'_, U>> for Redirectable<'_, T> {}
   | |__________________________________________________________________________________________^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/68013.rs`

error[E0277]: the trait bound `&T: std::marker::Unsize<&U>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/68013.rs:17:1
   |
17 | impl<U, T: CoerceUnsized<U>> CoerceUnsized<Redirectable<'_, U>> for Redirectable<'_, T> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Unsize<&U>` is not implemented for `&T`
   |
   = note: all implementations of `Unsize` are provided automatically by the compiler, see <https://doc.rust-lang.org/stable/std/marker/trait.Unsize.html> for more information
   = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::rc::Rc<std::cell::Cell<&U>>>` for `std::rc::Rc<std::cell::Cell<&T>>`

error: aborting due to 2 previous errors; 1 warning emitted

Some errors have detailed explanations: E0277, E0601.
For more information about an error, try `rustc --explain E0277`.
==============

=== stdout ===
=== stderr ===
warning: unused import: `std::ops::Deref`
 --> /home/runner/work/glacier/glacier/ices/68013.rs:9:5
  |
9 | use std::ops::Deref;
  |     ^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0601]: `main` function not found in crate `68013`
  --> /home/runner/work/glacier/glacier/ices/68013.rs:4:1
   |
4  | / #![feature(coerce_unsized)]
5  | |
6  | | // These imports are also needed to get the ICE.
7  | | use std::rc::Rc;
...  |
16 | |
17 | | impl<U, T: CoerceUnsized<U>> CoerceUnsized<Redirectable<'_, U>> for Redirectable<'_, T> {}
   | |__________________________________________________________________________________________^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/68013.rs`

error[E0277]: the trait bound `&T: std::marker::Unsize<&U>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/68013.rs:17:1
   |
17 | impl<U, T: CoerceUnsized<U>> CoerceUnsized<Redirectable<'_, U>> for Redirectable<'_, T> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Unsize<&U>` is not implemented for `&T`
   |
   = note: all implementations of `Unsize` are provided automatically by the compiler, see <https://doc.rust-lang.org/stable/std/marker/trait.Unsize.html> for more information
   = note: required because of the requirements on the impl of `std::ops::CoerceUnsized<std::rc::Rc<std::cell::Cell<&U>>>` for `std::rc::Rc<std::cell::Cell<&T>>`

error: aborting due to 2 previous errors; 1 warning emitted

Some errors have detailed explanations: E0277, E0601.
For more information about an error, try `rustc --explain E0277`.
==============
@Alexendoo Alexendoo merged commit a467dae into master May 15, 2020
@Alexendoo Alexendoo deleted the autofix/ices/68013.rs branch May 15, 2020 13:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants