Skip to content

Instantly share code, notes, and snippets.

@durka
Created April 8, 2018 03:00
Show Gist options
  • Save durka/3eece20d2b6f27e828da6d4bcb08508b to your computer and use it in GitHub Desktop.
Save durka/3eece20d2b6f27e828da6d4bcb08508b to your computer and use it in GitHub Desktop.
$ cargo script -e '#[derive(Copy)] struct S(std::marker::PhantomData<*const T>);'
Compiling expr v0.1.0 (file:///Users/alex/.cargo/script-cache/expr-0658c6978a7ee620)
error[E0412]: cannot find type `T` in this scope
--> expr.rs:18:69
|
18 | match {#[derive(Copy)] struct S(std::marker::PhantomData<*const T>);} {
| ^ did you mean `S`?
error[E0204]: the trait `Copy` may not be implemented for this type
--> expr.rs:18:21
|
18 | match {#[derive(Copy)] struct S(std::marker::PhantomData<*const T>);} {
| ^^^^ ----------------------------------- this field does not implement `Copy`
error: aborting due to 2 previous errors
Some errors occurred: E0204, E0412.
For more information about an error, try `rustc --explain E0204`.
error: Could not compile `expr`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment