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

Rust 1.18 regression, yggie/mach, type annotations needed #41806

Closed
brson opened this issue May 7, 2017 · 6 comments
Closed

Rust 1.18 regression, yggie/mach, type annotations needed #41806

brson opened this issue May 7, 2017 · 6 comments
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@brson
Copy link
Contributor

brson commented May 7, 2017

https://github.com/yggie/mach

brian@ip-10-145-43-250:~/dev/mach⟫ git log -1
commit b1c15026e0f31117d0d54ee6eeaeadd3e94a3d92
Author: Bryan Yap <bryan.yap.mh@gmail.com>
Date:   Tue Jan 3 17:18:11 2017 +0000

    renamed CollisionBody to CollisionObject
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/mach⟫ cargo +beta test
   Compiling mach v0.0.1 (file:///mnt2/dev/mach)
   Compiling pkg-config v0.3.8
   Compiling log v0.3.6
   Compiling itoa v0.1.1
   Compiling smallvec v0.1.8
error[E0282]: type annotations needed
  --> src/mach_world.rs:23:13
   |
23 |         let world = CustomWorld::new(
   |             ^^^^^
   |             |
   |             consider giving `world` a type
   |             cannot infer type for `custom_world::CustomWorld<collisions::broadphase::brute_force_broadphase::BruteForceBroadphase<collisions::body::Body<dynamics::dynamic_body_extension::DynamicBodyExtension<E>, collisions::narrowphase::null_narrowphase::NullNarrowphase>>, dynamics::solvers::mach_constraint_solver::MachConstraintSolver, collisions::detection::gjkepa::gjk_epa_detection::GJKEPADetection, _, dynamics::integrators::semi_implicit_euler::SemiImplicitEuler, collisions::body::Body<dynamics::dynamic_body_extension::DynamicBodyExtension<E>, collisions::narrowphase::null_narrowphase::NullNarrowphase>>`

   Compiling bitflags v0.7.0
   Compiling xml-rs v0.3.5
   Compiling regex-syntax v0.3.9
error: aborting due to previous error

error: Could not compile `mach`.
Build failed, waiting for other jobs to finish...
error: build failed

cc @yggie

@brson brson added the regression-from-stable-to-beta Performance or correctness regression from stable to beta. label May 7, 2017
@Mark-Simulacrum
Copy link
Member

Seems to be caused by 84be2df (#41236), cc @cengizio. Note: This may be wrong, experimental bisect tool used.

@yggie
Copy link

yggie commented May 9, 2017

simplest reproduction of the problem based on my codebase: https://is.gd/5JTVVw, looks like it has trouble inferring the types when using a temporary variable

@nikomatsakis nikomatsakis added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 9, 2017
@nikomatsakis
Copy link
Contributor

I'm pretty sure this is actually the same as #41677. Will verify.

@nikomatsakis
Copy link
Contributor

I can confirm that #41716 fixes this problem in my local tests.

@cengiz-io
Copy link
Contributor

Since we've merged #41716 I think this can be closed.

@Mark-Simulacrum
Copy link
Member

Agreed; closing. Let us know if anyone can reproduce on recent nightlies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants