Closed aidancully closed 9 years ago
Here is a smaller test case (using no_std
) to reproduce this:
#![feature(no_std)]
#![feature(lang_items)]
#![crate_type="lib"]
#![no_std]
#[lang="sized"]
pub trait Sized { }
trait T {
type Ty;
}
And then build it like so:
% RUST_LOG=debug ./x86_64-apple-darwin/stage1/bin/rustc /tmp/issue22187.rs > /tmp/issue22187.log 2>&1
[ERROR#1] %
I rechecked my patch more rigorously, and it looks like this was resolved by a6c295cb22d4c76c0b58a7f0fbca104b7dcbfdc4. I'm closing this issue.
build command:
output tail:
I isolated the problem to this line in librustc_typeck/collect.rs:
In this case, the assoc_predicates for a type are defined in the local crate (it's libcore, and the associated predicate is
?Sized
), so thelookup_trait_def
assertion trips.