Guarantee rustc_dump_user_substs error order.

This commit buffers the errors output by the `rustc_dump_user_substs`
attribute so that they can be output in order of span and would
therefore be consistent.
This commit is contained in:
David Wood 2018-12-22 15:32:44 +01:00
parent 0bfe184b1a
commit c20ba65a0b
No known key found for this signature in database
GPG key ID: 01760B4F9F53F154
2 changed files with 24 additions and 9 deletions

View file

@ -1,8 +1,8 @@
error: user substs: UserSubsts { substs: [^0, ^1, u32], user_self_ty: None }
--> $DIR/dump-fn-method.rs:44:5
error: user substs: UserSubsts { substs: [u32], user_self_ty: None }
--> $DIR/dump-fn-method.rs:26:13
|
LL | y.method::<u32>(44, 66); //~ ERROR [^0, ^1, u32]
| ^^^^^^^^^^^^^^^^^^^^^^^
LL | let x = foo::<u32>; //~ ERROR [u32]
| ^^^^^^^^^^
error: user substs: UserSubsts { substs: [^0, u32, ^1], user_self_ty: None }
--> $DIR/dump-fn-method.rs:32:13
@ -16,11 +16,11 @@ error: user substs: UserSubsts { substs: [u8, u16, u32], user_self_ty: None }
LL | let x = <u8 as Bazoom<u16>>::method::<u32>; //~ ERROR [u8, u16, u32]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: user substs: UserSubsts { substs: [u32], user_self_ty: None }
--> $DIR/dump-fn-method.rs:26:13
error: user substs: UserSubsts { substs: [^0, ^1, u32], user_self_ty: None }
--> $DIR/dump-fn-method.rs:44:5
|
LL | let x = foo::<u32>; //~ ERROR [u32]
| ^^^^^^^^^^
LL | y.method::<u32>(44, 66); //~ ERROR [^0, ^1, u32]
| ^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors