Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve PinBox on nightly #66375

Closed
tema3210 opened this issue Nov 13, 2019 · 1 comment
Closed

Cannot resolve PinBox on nightly #66375

tema3210 opened this issue Nov 13, 2019 · 1 comment

Comments

@tema3210
Copy link

My code is:


#![allow(dead_code)]
#![feature(generators, generator_trait,pin)]
use std::ops::{Generator, GeneratorState};
use std::boxed::PinBox;
use std::pin::Pin;

enum Node<T: Copy>{
	Leafs(Option< Box<Node<T>> >,Option< Box<Node<T>> >),
	Data(T),
}

impl<T: Copy> Node<T> {
...
}

fn IterateOverTreePreOrder<T: Copy>(trg: Node<T>)->PinBox<impl Generator<Yield=T,Return=()>>{
	...
}
...

But this doesn't compile because of:


tema3210@tema2-devhost:~/3kurs_alg_laby/05/rust$ cargo check
    Checking rust v0.1.0 (/home/tema3210/3kurs_alg_laby/05/rust)
error[E0432]: unresolved import `std::boxed::PinBox`
 --> src/main.rs:4:5
  |
4 | use std::boxed::PinBox;
  |     ^^^^^^^^^^^^^^^^^^ no `PinBox` in `boxed`

warning: unused import: `GeneratorState`
 --> src/main.rs:3:27
  |
3 | use std::ops::{Generator, GeneratorState};
  |                           ^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `std::pin::Pin`
 --> src/main.rs:5:5
  |
5 | use std::pin::Pin;
  |     ^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `rust`.

To learn more, run the command again with --verbose.
tema3210@tema2-devhost:~/3kurs_alg_laby/05/rust$ rustc --version
rustc 1.40.0-nightly (4f03f4a98 2019-11-12)
@jonas-schievink
Copy link
Contributor

PinBox has been removed. See #49150.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants