]> git.lizzy.rs Git - rust.git/commitdiff
Improve wording
authorYuki OKUSHI <huyuumi.dev@gmail.com>
Tue, 2 Apr 2019 21:39:00 +0000 (06:39 +0900)
committerYuki OKUSHI <huyuumi.dev@gmail.com>
Tue, 2 Apr 2019 21:39:00 +0000 (06:39 +0900)
src/librustc_mir/transform/qualify_min_const_fn.rs
src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.rs
src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr
src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.rs
src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr
src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.rs
src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr

index 87459571b529cba42d32499fa8dcf31decd35759..5cea8ba27142d4ecbb42251c07bdb6d5b544e4a4 100644 (file)
@@ -326,7 +326,7 @@ fn check_terminator(
                     abi::Abi::Rust if tcx.is_min_const_fn(def_id) => {},
                     abi::Abi::Rust => return Err((
                         span,
-                        "can only call other `min_const_fn` within a `min_const_fn`".into(),
+                        "can only call other `const` within a `const`".into(),
                     )),
                     abi => return Err((
                         span,
index db416e7eb03ac7ecf4c91cc96f2993be6cb3cc59..c55219b1d154d4a530f0c1f1e95c167e4e6be496 100644 (file)
@@ -12,14 +12,14 @@ const fn foo() -> u32 { 42 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 // can't call non-min_const_fn
-const fn bar() -> u32 { foo() } //~ ERROR can only call other `min_const_fn`
+const fn bar() -> u32 { foo() } //~ ERROR can only call other `const`
 
 #[unstable(feature = "rust1", issue="0")]
 const fn foo2() -> u32 { 42 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 // can't call non-min_const_fn
-const fn bar2() -> u32 { foo2() } //~ ERROR can only call other `min_const_fn`
+const fn bar2() -> u32 { foo2() } //~ ERROR can only call other `const`
 
 #[stable(feature = "rust1", since = "1.0.0")]
 // conformity is required, even with `const_fn` feature gate
@@ -31,6 +31,6 @@ const fn foo2_gated() -> u32 { 42 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 // can't call non-min_const_fn
-const fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `min_const_fn`
+const fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `const`
 
 fn main() {}
index a8d0dc37e4031ff9844c5e6c67531a2291e1e734..208a714f8884202648d5903fb0f5cca69ce928e7 100644 (file)
@@ -1,4 +1,4 @@
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
   --> $DIR/min_const_fn_libstd_stability.rs:15:25
    |
 LL | const fn bar() -> u32 { foo() }
@@ -6,7 +6,7 @@ LL | const fn bar() -> u32 { foo() }
    |
    = help: add #![feature(const_fn)] to the crate attributes to enable
 
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
   --> $DIR/min_const_fn_libstd_stability.rs:22:26
    |
 LL | const fn bar2() -> u32 { foo2() }
@@ -22,7 +22,7 @@ LL | const fn bar3() -> u32 { (5f32 + 6f32) as u32 }
    |
    = help: add #![feature(const_fn)] to the crate attributes to enable
 
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
   --> $DIR/min_const_fn_libstd_stability.rs:34:32
    |
 LL | const fn bar2_gated() -> u32 { foo2_gated() }
index 7faba480a233e0b36ffcd2b858cf92e68bcedc70..211b781352582c299a9c52bb21c2434554774e87 100644 (file)
 
 #[stable(feature = "rust1", since = "1.0.0")]
 // can't call non-min_const_fn
-const unsafe fn bar() -> u32 { unsafe { foo() } } //~ ERROR can only call other `min_const_fn`
+const unsafe fn bar() -> u32 { unsafe { foo() } } //~ ERROR can only call other `const`
 
 #[unstable(feature = "rust1", issue="0")]
 const unsafe fn foo2() -> u32 { 42 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 // can't call non-min_const_fn
-const unsafe fn bar2() -> u32 { unsafe { foo2() } } //~ ERROR can only call other `min_const_fn`
+const unsafe fn bar2() -> u32 { unsafe { foo2() } } //~ ERROR can only call other `const`
 
 #[stable(feature = "rust1", since = "1.0.0")]
 // conformity is required, even with `const_fn` feature gate
index 5b2bee19acf90747ecb847806a21df953261761f..a6cae5dcc7ee0d3ab0593b4309470ec5e4b30ecf 100644 (file)
@@ -1,4 +1,4 @@
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
   --> $DIR/min_const_unsafe_fn_libstd_stability.rs:15:41
    |
 LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
@@ -6,7 +6,7 @@ LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
    |
    = help: add #![feature(const_fn)] to the crate attributes to enable
 
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
   --> $DIR/min_const_unsafe_fn_libstd_stability.rs:22:42
    |
 LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
@@ -22,7 +22,7 @@ LL | const unsafe fn bar3() -> u32 { (5f32 + 6f32) as u32 }
    |
    = help: add #![feature(const_fn)] to the crate attributes to enable
 
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
   --> $DIR/min_const_unsafe_fn_libstd_stability.rs:34:48
    |
 LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
index bc1d5091f38d356f5b49275442235182e6e2e22f..cf5f1b253a6363bf82e371efd6154da24f8391a9 100644 (file)
@@ -12,14 +12,14 @@ const fn foo() -> u32 { 42 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 // can't call non-min_const_fn
-const unsafe fn bar() -> u32 { foo() } //~ ERROR can only call other `min_const_fn`
+const unsafe fn bar() -> u32 { foo() } //~ ERROR can only call other `const`
 
 #[unstable(feature = "rust1", issue="0")]
 const fn foo2() -> u32 { 42 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 // can't call non-min_const_fn
-const unsafe fn bar2() -> u32 { foo2() } //~ ERROR can only call other `min_const_fn`
+const unsafe fn bar2() -> u32 { foo2() } //~ ERROR can only call other `const`
 
 // check whether this function cannot be called even with the feature gate active
 #[unstable(feature = "foo2", issue="0")]
@@ -27,6 +27,6 @@ const fn foo2_gated() -> u32 { 42 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 // can't call non-min_const_fn
-const unsafe fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `min_const_fn`
+const unsafe fn bar2_gated() -> u32 { foo2_gated() } //~ ERROR can only call other `const`
 
 fn main() {}
index f7f630c9ae3f55343b07406774185793c9d6e1dd..30336a8a2a541c3edc6bff344b2880265d2a0358 100644 (file)
@@ -1,4 +1,4 @@
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
   --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:15:32
    |
 LL | const unsafe fn bar() -> u32 { foo() }
@@ -6,7 +6,7 @@ LL | const unsafe fn bar() -> u32 { foo() }
    |
    = help: add #![feature(const_fn)] to the crate attributes to enable
 
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
   --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:22:33
    |
 LL | const unsafe fn bar2() -> u32 { foo2() }
@@ -14,7 +14,7 @@ LL | const unsafe fn bar2() -> u32 { foo2() }
    |
    = help: add #![feature(const_fn)] to the crate attributes to enable
 
-error[E0723]: can only call other `min_const_fn` within a `min_const_fn` (see issue #57563)
+error[E0723]: can only call other `const` within a `const` (see issue #57563)
   --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:30:39
    |
 LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }