File tree Expand file tree Collapse file tree 7 files changed +18
-18
lines changed
test/ui/consts/min_const_fn Expand file tree Collapse file tree 7 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ fn check_terminator(
326326 abi:: Abi :: Rust if tcx. is_min_const_fn ( def_id) => { } ,
327327 abi:: Abi :: Rust => return Err ( (
328328 span,
329- "can only call other `min_const_fn ` within a `min_const_fn `" . into ( ) ,
329+ "can only call other `const ` within a `const `" . into ( ) ,
330330 ) ) ,
331331 abi => return Err ( (
332332 span,
Original file line number Diff line number Diff line change @@ -12,14 +12,14 @@ const fn foo() -> u32 { 42 }
1212
1313#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1414// can't call non-min_const_fn
15- const fn bar ( ) -> u32 { foo ( ) } //~ ERROR can only call other `min_const_fn `
15+ const fn bar ( ) -> u32 { foo ( ) } //~ ERROR can only call other `const `
1616
1717#[ unstable( feature = "rust1" , issue="0" ) ]
1818const fn foo2 ( ) -> u32 { 42 }
1919
2020#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2121// can't call non-min_const_fn
22- const fn bar2 ( ) -> u32 { foo2 ( ) } //~ ERROR can only call other `min_const_fn `
22+ const fn bar2 ( ) -> u32 { foo2 ( ) } //~ ERROR can only call other `const `
2323
2424#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2525// conformity is required, even with `const_fn` feature gate
@@ -31,6 +31,6 @@ const fn foo2_gated() -> u32 { 42 }
3131
3232#[ stable( feature = "rust1" , since = "1.0.0" ) ]
3333// can't call non-min_const_fn
34- const fn bar2_gated ( ) -> u32 { foo2_gated ( ) } //~ ERROR can only call other `min_const_fn `
34+ const fn bar2_gated ( ) -> u32 { foo2_gated ( ) } //~ ERROR can only call other `const `
3535
3636fn main ( ) { }
Original file line number Diff line number Diff line change 1- error[E0723]: can only call other `min_const_fn ` within a `min_const_fn ` (see issue #57563)
1+ error[E0723]: can only call other `const ` within a `const ` (see issue #57563)
22 --> $DIR/min_const_fn_libstd_stability.rs:15:25
33 |
44LL | const fn bar() -> u32 { foo() }
55 | ^^^^^
66 |
77 = help: add #![feature(const_fn)] to the crate attributes to enable
88
9- error[E0723]: can only call other `min_const_fn ` within a `min_const_fn ` (see issue #57563)
9+ error[E0723]: can only call other `const ` within a `const ` (see issue #57563)
1010 --> $DIR/min_const_fn_libstd_stability.rs:22:26
1111 |
1212LL | const fn bar2() -> u32 { foo2() }
@@ -22,7 +22,7 @@ LL | const fn bar3() -> u32 { (5f32 + 6f32) as u32 }
2222 |
2323 = help: add #![feature(const_fn)] to the crate attributes to enable
2424
25- error[E0723]: can only call other `min_const_fn ` within a `min_const_fn ` (see issue #57563)
25+ error[E0723]: can only call other `const ` within a `const ` (see issue #57563)
2626 --> $DIR/min_const_fn_libstd_stability.rs:34:32
2727 |
2828LL | const fn bar2_gated() -> u32 { foo2_gated() }
Original file line number Diff line number Diff line change @@ -12,14 +12,14 @@ const unsafe fn foo() -> u32 { 42 }
1212
1313#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1414// can't call non-min_const_fn
15- const unsafe fn bar ( ) -> u32 { unsafe { foo ( ) } } //~ ERROR can only call other `min_const_fn `
15+ const unsafe fn bar ( ) -> u32 { unsafe { foo ( ) } } //~ ERROR can only call other `const `
1616
1717#[ unstable( feature = "rust1" , issue="0" ) ]
1818const unsafe fn foo2 ( ) -> u32 { 42 }
1919
2020#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2121// can't call non-min_const_fn
22- const unsafe fn bar2 ( ) -> u32 { unsafe { foo2 ( ) } } //~ ERROR can only call other `min_const_fn `
22+ const unsafe fn bar2 ( ) -> u32 { unsafe { foo2 ( ) } } //~ ERROR can only call other `const `
2323
2424#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2525// conformity is required, even with `const_fn` feature gate
Original file line number Diff line number Diff line change 1- error[E0723]: can only call other `min_const_fn ` within a `min_const_fn ` (see issue #57563)
1+ error[E0723]: can only call other `const ` within a `const ` (see issue #57563)
22 --> $DIR/min_const_unsafe_fn_libstd_stability.rs:15:41
33 |
44LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
55 | ^^^^^
66 |
77 = help: add #![feature(const_fn)] to the crate attributes to enable
88
9- error[E0723]: can only call other `min_const_fn ` within a `min_const_fn ` (see issue #57563)
9+ error[E0723]: can only call other `const ` within a `const ` (see issue #57563)
1010 --> $DIR/min_const_unsafe_fn_libstd_stability.rs:22:42
1111 |
1212LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
@@ -22,7 +22,7 @@ LL | const unsafe fn bar3() -> u32 { (5f32 + 6f32) as u32 }
2222 |
2323 = help: add #![feature(const_fn)] to the crate attributes to enable
2424
25- error[E0723]: can only call other `min_const_fn ` within a `min_const_fn ` (see issue #57563)
25+ error[E0723]: can only call other `const ` within a `const ` (see issue #57563)
2626 --> $DIR/min_const_unsafe_fn_libstd_stability.rs:34:48
2727 |
2828LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
Original file line number Diff line number Diff line change @@ -12,21 +12,21 @@ const fn foo() -> u32 { 42 }
1212
1313#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1414// can't call non-min_const_fn
15- const unsafe fn bar ( ) -> u32 { foo ( ) } //~ ERROR can only call other `min_const_fn `
15+ const unsafe fn bar ( ) -> u32 { foo ( ) } //~ ERROR can only call other `const `
1616
1717#[ unstable( feature = "rust1" , issue="0" ) ]
1818const fn foo2 ( ) -> u32 { 42 }
1919
2020#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2121// can't call non-min_const_fn
22- const unsafe fn bar2 ( ) -> u32 { foo2 ( ) } //~ ERROR can only call other `min_const_fn `
22+ const unsafe fn bar2 ( ) -> u32 { foo2 ( ) } //~ ERROR can only call other `const `
2323
2424// check whether this function cannot be called even with the feature gate active
2525#[ unstable( feature = "foo2" , issue="0" ) ]
2626const fn foo2_gated ( ) -> u32 { 42 }
2727
2828#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2929// can't call non-min_const_fn
30- const unsafe fn bar2_gated ( ) -> u32 { foo2_gated ( ) } //~ ERROR can only call other `min_const_fn `
30+ const unsafe fn bar2_gated ( ) -> u32 { foo2_gated ( ) } //~ ERROR can only call other `const `
3131
3232fn main ( ) { }
Original file line number Diff line number Diff line change 1- error[E0723]: can only call other `min_const_fn ` within a `min_const_fn ` (see issue #57563)
1+ error[E0723]: can only call other `const ` within a `const ` (see issue #57563)
22 --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:15:32
33 |
44LL | const unsafe fn bar() -> u32 { foo() }
55 | ^^^^^
66 |
77 = help: add #![feature(const_fn)] to the crate attributes to enable
88
9- error[E0723]: can only call other `min_const_fn ` within a `min_const_fn ` (see issue #57563)
9+ error[E0723]: can only call other `const ` within a `const ` (see issue #57563)
1010 --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:22:33
1111 |
1212LL | const unsafe fn bar2() -> u32 { foo2() }
1313 | ^^^^^^
1414 |
1515 = help: add #![feature(const_fn)] to the crate attributes to enable
1616
17- error[E0723]: can only call other `min_const_fn ` within a `min_const_fn ` (see issue #57563)
17+ error[E0723]: can only call other `const ` within a `const ` (see issue #57563)
1818 --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:30:39
1919 |
2020LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
You can’t perform that action at this time.
0 commit comments