Skip to content

Rust 1.18 regression, size of Self cannot be statically determined #41805

Closed

Description

https://github.com/AskePit/note_gen

101 brian@ip-10-145-43-250:~/dev/note_gen⟫ git log -1
commit 9cb62bd28f5bfe919ed27b267500e596af3d290b
Author: Shalakin Nikolay <askepit@gmail.com>
Date:   Wed Mar 1 22:02:16 2017 +0300

    Update README.md
brian@ip-10-145-43-250:/mnt2/dev⟫ rustc +beta -Vv
rustc 1.18.0-beta.1 (4dce67253 2017-04-25)
binary: rustc
commit-hash: 4dce67253d67785c74c8d270c38d774edd0deed8
commit-date: 2017-04-25
host: x86_64-unknown-linux-gnu
release: 1.18.0-beta.1
LLVM version: 3.9
brian@ip-10-145-43-250:~/dev/note_gen⟫ cargo +beta test
   Compiling libc v0.2.20
   Compiling rand v0.3.15
   Compiling note_gen v0.1.0 (file:///mnt2/dev/note_gen)
error[E0161]: cannot move a value of type Self: the size of Self cannot be statically determined
  --> src/main.rs:12:16
   |
12 |            String::from(Self::rand().to_str())
   |                         ^^^^^^^^^^^^

error: aborting due to previous error

error: Could not compile `note_gen`.

To learn more, run the command again with --verbose.

cc @AskePit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.relnotesMarks issues that should be documented in the release notes of the next release.Marks issues that should be documented in the release notes of the next release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions