Auto merge of #75697 - lzutao:mir-dumb-const-prefix, r=oli-obk

Suppress "const" prefix of FnDef constants in MIR dump

I [was asked][1] to suppress the `const` infront of `FnDef`.
I tried to suppress comments for other types, but turned out that `const ()` and `()` is different: https://github.com/rust-lang/rust/pull/75697#discussion_r473892806

[1]: https://github.com/rust-lang/rust/pull/75670#issuecomment-675574333
This commit is contained in:
bors 2020-08-21 11:08:31 +00:00
commit 521db88cd9
70 changed files with 132 additions and 129 deletions

View file

@ -1,4 +1,4 @@
error[E0723]: can only call other `const fn` within a `const fn`, but `const regular_in_block` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `regular_in_block` is not stable as `const fn`
--> $DIR/const-extern-fn-call-extern-fn.rs:9:9
|
LL | regular_in_block();
@ -7,7 +7,7 @@ LL | regular_in_block();
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: can only call other `const fn` within a `const fn`, but `const regular` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `regular` is not stable as `const fn`
--> $DIR/const-extern-fn-call-extern-fn.rs:18:9
|
LL | regular();

View file

@ -1,4 +1,4 @@
error[E0723]: can only call other `const fn` within a `const fn`, but `const foo` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `foo` is not stable as `const fn`
--> $DIR/min_const_fn_libstd_stability.rs:16:25
|
LL | const fn bar() -> u32 { foo() }
@ -7,7 +7,7 @@ LL | const fn bar() -> u32 { foo() }
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `foo2` is not stable as `const fn`
--> $DIR/min_const_fn_libstd_stability.rs:24:26
|
LL | const fn bar2() -> u32 { foo2() }
@ -25,7 +25,7 @@ LL | const fn bar3() -> u32 { (5f32 + 6f32) as u32 }
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2_gated` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `foo2_gated` is not stable as `const fn`
--> $DIR/min_const_fn_libstd_stability.rs:38:32
|
LL | const fn bar2_gated() -> u32 { foo2_gated() }

View file

@ -1,4 +1,4 @@
error[E0723]: can only call other `const fn` within a `const fn`, but `const foo` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `foo` is not stable as `const fn`
--> $DIR/min_const_unsafe_fn_libstd_stability.rs:16:41
|
LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
@ -7,7 +7,7 @@ LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `foo2` is not stable as `const fn`
--> $DIR/min_const_unsafe_fn_libstd_stability.rs:24:42
|
LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
@ -25,7 +25,7 @@ LL | const unsafe fn bar3() -> u32 { (5f32 + 6f32) as u32 }
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2_gated` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `foo2_gated` is not stable as `const fn`
--> $DIR/min_const_unsafe_fn_libstd_stability.rs:38:48
|
LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }

View file

@ -1,4 +1,4 @@
error[E0723]: can only call other `const fn` within a `const fn`, but `const foo` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `foo` is not stable as `const fn`
--> $DIR/min_const_unsafe_fn_libstd_stability2.rs:16:32
|
LL | const unsafe fn bar() -> u32 { foo() }
@ -7,7 +7,7 @@ LL | const unsafe fn bar() -> u32 { foo() }
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `foo2` is not stable as `const fn`
--> $DIR/min_const_unsafe_fn_libstd_stability2.rs:24:33
|
LL | const unsafe fn bar2() -> u32 { foo2() }
@ -16,7 +16,7 @@ LL | const unsafe fn bar2() -> u32 { foo2() }
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: can only call other `const fn` within a `const fn`, but `const foo2_gated` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `foo2_gated` is not stable as `const fn`
--> $DIR/min_const_unsafe_fn_libstd_stability2.rs:33:39
|
LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }

View file

@ -1,4 +1,4 @@
error[E0723]: can only call other `const fn` within a `const fn`, but `const non_const` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `non_const` is not stable as `const fn`
--> $DIR/const-check-fns-in-const-impl.rs:12:16
|
LL | fn foo() { non_const() }

View file

@ -10,7 +10,7 @@ LL | | }
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
= help: add `#![feature(const_fn)]` to the crate attributes to enable
error[E0723]: can only call other `const fn` within a `const fn`, but `const <Int as std::ops::Add>::add` is not stable as `const fn`
error[E0723]: can only call other `const fn` within a `const fn`, but `<Int as std::ops::Add>::add` is not stable as `const fn`
--> $DIR/stability.rs:32:5
|
LL | Int(1i32) + Int(2i32)