]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/cache-reached-depth-ice.rs
1 #![feature(rustc_attrs)]
3 // Test for a particular corner case where the evaluation
4 // cache can get out of date. The problem here is that
5 // when we cache C, we have observed that it reaches
6 // to depth 2 (the node for B), but we later realize
7 // that B itself depends on A (reached depth 0). We
8 // failed to update the depth for C transitively, which
9 // resulted in an assertion failure when it was referenced
12 // A (reached depth 0)
14 // B // depth 2 -- reached depth = 0
15 // C // depth 3 -- reached depth = 2 (should be 0)
19 // C (cache -- reached depth = 2)
39 #[rustc_evaluate_where_clauses]
40 fn test
<X
: ?Sized
+ Send
>() {}
44 //~^ ERROR evaluate(Binder(TraitPredicate(<A as std::marker::Send>, polarity:Positive), [])) = Ok(EvaluatedToOk)