Deduplicate and clean up pretty printing logic
This commit is contained in:
parent
1581278534
commit
02dbb35b2b
12 changed files with 287 additions and 148 deletions
|
|
@ -1,3 +1,6 @@
|
|||
// normalize-stderr-64bit "0x00000000" -> "0x[PREFIX]"
|
||||
// normalize-stderr-32bit "0x" -> "0x[PREFIX]"
|
||||
|
||||
#![feature(const_generics, const_compare_raw_pointers)]
|
||||
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
|
||||
--> $DIR/raw-ptr-const-param.rs:1:12
|
||||
--> $DIR/raw-ptr-const-param.rs:4:12
|
||||
|
|
||||
LL | #![feature(const_generics, const_compare_raw_pointers)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
@ -7,15 +7,15 @@ LL | #![feature(const_generics, const_compare_raw_pointers)]
|
|||
= note: `#[warn(incomplete_features)]` on by default
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/raw-ptr-const-param.rs:7:38
|
||||
--> $DIR/raw-ptr-const-param.rs:10:38
|
||||
|
|
||||
LL | let _: Const<{15 as *const _}> = Const::<{10 as *const _}>;
|
||||
| ----------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{pointer}`, found `{pointer}`
|
||||
| ----------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `0x[PREFIX]0000000f`, found `0x[PREFIX]0000000a`
|
||||
| |
|
||||
| expected due to this
|
||||
|
|
||||
= note: expected struct `Const<{pointer}>`
|
||||
found struct `Const<{pointer}>`
|
||||
= note: expected struct `Const<0x[PREFIX]0000000f>`
|
||||
found struct `Const<0x[PREFIX]0000000a>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ error: any use of this value will cause an error
|
|||
LL | intrinsics::ptr_offset_from(self, origin)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| exact_div: 1 cannot be divided by 2 without remainder
|
||||
| exact_div: 1isize cannot be divided by 2isize without remainder
|
||||
| inside call to `std::ptr::const_ptr::<impl *const u16>::offset_from` at $DIR/offset_from_ub.rs:36:14
|
||||
|
|
||||
::: $DIR/offset_from_ub.rs:31:1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue