The following (incorrect) code produces an ICE on stable and nightly: ```rust struct A; impl From<A> for &'static str { fn from(&self) -> &'static str { "" } } fn main(){} ``` ``` error: internal compiler error: /checkout/src/librustc/infer/region_constraints/mod.rs:685: cannot relate bound region: ReStatic <= ReLateBound(DebruijnIndex { depth: 1 }, BrAnon(0)) ``` Playground link: https://play.rust-lang.org/?gist=b86bdb728a9bd24e747744c075fd87fc&version=stable I appreciate this code _shouldn't_ compile; the `from` method should take `A` not `&self`. But it's an ICE regardless.
Activity
emilyalbini commentedon Feb 16, 2018
Full backtrace:
Fix rust-lang#48276