Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Fixed diagnostics #89

Merged
merged 1 commit into from
Feb 16, 2017
Merged

Fixed diagnostics #89

merged 1 commit into from
Feb 16, 2017

Conversation

KalitaAlexey
Copy link
Member

For the code:

struct Foo {}

fn bar(foo: Foo) {}

fn main() {
    let foo = Foo {};
    bar(foo);
    bar(foo);
}

It gave:

E0382: use of moved value: `foo`

Now it gives:

E0382: use of moved value: `foo`
  label: value used here after move
  note: move occurs because `foo` has type `Foo`, which does not implement the `Copy` trait

Fixes #81

@KalitaAlexey KalitaAlexey merged commit cafec86 into master Feb 16, 2017
@KalitaAlexey KalitaAlexey deleted the fix-diagnostics branch February 16, 2017 15:51
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.

1 participant