Change:
When trying to compile nphysics on a nightly created on or after , the compiler errors. Before this date it is fine. Example code: Presumably was that broke things, as it's a commit on that day that touches trans. On Windows 64 bit GNU this is the output:
cc
You sure it's that innocent commit and not, you know, my changes to debuginfo, for MIR? Specifically, is gone, that could cause problems.
I can't reproduce on master (just rebased one of my branches containing unrelated changes, so I had a compiler to check with). EDIT: Still no reproduction, even after .
Ok so I was misinterpreting which crate was being compiled. nphysics compiles fine, but , which uses nphysics, doesn't. I'm trying to narrow down the code now.
Here's some of the rust log that I got when compiling on debug builds:
That's not really helpful, sadly, nightly doesn't use yet, so there's no output.
This bug is not in beta, correct?
I'm afraid that I can't test that as I'm using s.
Can you check the test from instead? Particularly interested about the nightlies you had issues with.
Sure, unfortunately that test case works fine for both pre and post-.
Ah, beats me then.
I'll try and find which part of my code hits the error.
So I did some digging and I was wrong again, it turns out it is the nphysics crate. This is a minimal test case:
It depends on the crate, but it's not the crate itself, and that testcase is still large in terms of how much it needs to monomorphize.
True, sorry but I am not knowledgeable at all in rustc or nphysics, so it's the best I can do :/
triage: P-high
Still need a good regression test.
triage: P-low
I'm going to go ahead and close this. It's somewhat unlikely we'll hit this again (at least, we haven't obviously done so in the past 3ish years), and coming up with a good test case when the current case is all of nphysics is likely to be quite hard.

Discussion:
use abi::Abi; use common::{NodeIdAndSpan, CrateContext, FunctionContext, Block, BlockAndBuilder}; use monomorphize::Instance; <ins> use rustc::infer::normalize_associated_type; </ins> use rustc::ty::{self, Ty}; use session::config::{self, FullDebugInfo, LimitedDebugInfo, NoDebugInfo}; use util::nodemap::{DefIdMap, NodeMap, FnvHashMap, FnvHashSet};

name_to_append_suffix_to.push('<'); for (i, &actual_type) in actual_types.iter().enumerate() { <ins> let actual_type = normalize_associated_type(cx.tcx(), &actual_type); </ins> // Add actual type name to <...> clause of function name let actual_type_name = compute_debuginfo_type_name(cx, actual_type,

// Again, only create type information if full debuginfo is enabled let template_params: Vec<_> = if cx.sess().opts.debuginfo == FullDebugInfo { generics.types.as_slice().iter().enumerate().map(|(i, param)| { <del> let actual_type = actual_types[i]; </del> <ins> let actual_type = normalize_associated_type(cx.tcx(), &actual_types[i]); </ins> let actual_type_metadata = type_metadata(cx, actual_type, codemap::DUMMY_SP); let name = CString::new(param.name.as_str().as_bytes()).unwrap(); unsafe {

<ins> // Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // compile-flags: -g use std::ops::Deref; trait Foo { fn foo() {} } impl Foo for u8 {} fn bar<T: Deref>() where T::Target: Foo { <<T as Deref>::Target as Foo>::foo() } fn main() { bar::<&u8>(); } </ins>