Skip to content

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

@brson

Description

@brson
Contributor

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

Activity

Mark-Simulacrum

Mark-Simulacrum commented on May 8, 2017

@Mark-Simulacrum
Member

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

yggie

yggie commented on May 9, 2017

@yggie

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

added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on May 9, 2017
nikomatsakis

nikomatsakis commented on May 9, 2017

@nikomatsakis
Contributor

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

nikomatsakis

nikomatsakis commented on May 9, 2017

@nikomatsakis
Contributor

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

cengiz-io

cengiz-io commented on May 17, 2017

@cengiz-io
Contributor

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

Mark-Simulacrum

Mark-Simulacrum commented on May 17, 2017

@Mark-Simulacrum
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cengiz-io@brson@nikomatsakis@yggie@Mark-Simulacrum

        Issue actions

          Rust 1.18 regression, yggie/mach, type annotations needed · Issue #41806 · rust-lang/rust