.sess
.struct_span_err(attr.span, "program clause dump");
- for clause in clauses.iter() {
- // Skip the top-level binder for a less verbose output
- let program_clause = match clause {
- Clause::Implies(program_clause) => program_clause,
- Clause::ForAll(program_clause) => program_clause.skip_binder(),
- };
- err.note(&format!("{}", program_clause));
+ let mut strings: Vec<_> = clauses
+ .iter()
+ .map(|clause| {
+ // Skip the top-level binder for a less verbose output
+ let program_clause = match clause {
+ Clause::Implies(program_clause) => program_clause,
+ Clause::ForAll(program_clause) => program_clause.skip_binder(),
+ };
+ format!("{}", program_clause)
+ })
+ .collect();
+
+ strings.sort();
+
+ for string in strings {
+ err.note(&string);
}
err.emit();
LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: Implemented(Self: Bar) :- FromEnv(Self: Bar).
= note: FromEnv(Self: Bar) :- FromEnv(Self: Bar).
= note: FromEnv(Self: Foo) :- FromEnv(Self: Bar).
+ = note: Implemented(Self: Bar) :- FromEnv(Self: Bar).
error: program clause dump
--> $DIR/lower_env1.rs:19:1
LL | #[rustc_dump_env_program_clauses] //~ ERROR program clause dump
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized).
- = note: Implemented(Self: Bar) :- FromEnv(Self: Bar).
= note: FromEnv(Self: Bar) :- FromEnv(Self: Bar).
= note: FromEnv(Self: Foo) :- FromEnv(Self: Bar).
+ = note: Implemented(Self: Bar) :- FromEnv(Self: Bar).
= note: Implemented(Self: Foo) :- FromEnv(Self: Foo).
+ = note: Implemented(Self: std::marker::Sized) :- FromEnv(Self: std::marker::Sized).
error: aborting due to 2 previous errors
LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: Implemented(Self: Foo<S, T, U>) :- FromEnv(Self: Foo<S, T, U>).
= note: FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).
= note: FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).
= note: FromEnv(U: std::marker::Sized) :- FromEnv(Self: Foo<S, T, U>).
+ = note: Implemented(Self: Foo<S, T, U>) :- FromEnv(Self: Foo<S, T, U>).
error: aborting due to previous error
LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: Implemented(Self: Foo<F>) :- FromEnv(Self: Foo<F>).
+ = note: FromEnv(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) :- FromEnv(Self: Foo<F>).
= note: FromEnv(F: std::marker::Sized) :- FromEnv(Self: Foo<F>).
= note: FromEnv(F: std::ops::Fn<(&'a (u8, u16),)>) :- FromEnv(Self: Foo<F>).
- = note: FromEnv(<F as std::ops::FnOnce<(&'a (u8, u16),)>>::Output == &'a u8) :- FromEnv(Self: Foo<F>).
+ = note: Implemented(Self: Foo<F>) :- FromEnv(Self: Foo<F>).
error: aborting due to previous error
LL | #[rustc_dump_program_clauses] //~ ERROR program clause dump
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: Implemented(Self: Foo<'a, 'b, S, T, U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
- = note: FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
- = note: FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
= note: FromEnv(S: std::fmt::Debug) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
+ = note: FromEnv(S: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
= note: FromEnv(T: std::borrow::Borrow<U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
+ = note: FromEnv(T: std::marker::Sized) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
+ = note: Implemented(Self: Foo<'a, 'b, S, T, U>) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
= note: RegionOutlives('a : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).
= note: TypeOutlives(U : 'b) :- FromEnv(Self: Foo<'a, 'b, S, T, U>).