diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-06-20 14:14:30 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-06-20 14:15:36 +0200 |
| commit | 53686b91caac6c6782b8d2a41675f4f0941aa254 (patch) | |
| tree | cd6a5db266b04a281d39db4af3fedaed2168daad | |
| parent | 9e88b48133c703c04780a9474c029b4398ca3260 (diff) | |
| download | rust-53686b91caac6c6782b8d2a41675f4f0941aa254.tar.gz rust-53686b91caac6c6782b8d2a41675f4f0941aa254.zip | |
Satisfy tidy
| -rw-r--r-- | src/liballoc/raw_vec.rs | 2 | ||||
| -rw-r--r-- | src/libcore/intrinsics.rs | 2 | ||||
| -rw-r--r-- | src/librustc_mir/transform/check_consts/ops.rs | 8 | ||||
| -rw-r--r-- | src/test/ui/consts/const-eval/const_raw_ptr_ops.rs | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs index 805dbfe2775..87e73a1b91e 100644 --- a/src/liballoc/raw_vec.rs +++ b/src/liballoc/raw_vec.rs @@ -60,7 +60,7 @@ impl<T> RawVec<T, Global> { /// `#[rustc_force_min_const_fn]` attribute which requires conformance /// with `min_const_fn` but does not necessarily allow calling it in /// `stable(...) const fn` / user code not enabling `foo` when - /// `#[rustc_const_unstable(feature = "foo", ..)]` is present. + /// `#[rustc_const_unstable(feature = "foo", issue = "01234")]` is present. pub const NEW: Self = Self::new(); /// Creates the biggest possible `RawVec` (on the system heap) diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 2b34e980282..50e321f9c71 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -11,7 +11,7 @@ //! In order to make an intrinsic usable at compile-time, one needs to copy the implementation //! from https://github.com/rust-lang/miri/blob/master/src/shims/intrinsics.rs to //! `librustc_mir/interpret/intrinsics.rs` and add a -//! `#[rustc_const_unstable(feature = "foo2", issue = "01234")]` to the intrinsic. +//! `#[rustc_const_unstable(feature = "foo", issue = "01234")]` to the intrinsic. //! //! If an intrinsic is supposed to be used from a `const fn` with a `rustc_const_stable` attribute, //! the intrinsic's attribute must be `rustc_const_stable`, too. Such a change should not be done diff --git a/src/librustc_mir/transform/check_consts/ops.rs b/src/librustc_mir/transform/check_consts/ops.rs index e1a040b2e0e..ff22b6b184e 100644 --- a/src/librustc_mir/transform/check_consts/ops.rs +++ b/src/librustc_mir/transform/check_consts/ops.rs @@ -285,10 +285,10 @@ impl NonConstOp for Panic { pub struct RawPtrComparison; impl NonConstOp for RawPtrComparison { fn emit_error(&self, ccx: &ConstCx<'_, '_>, span: Span) { - let mut err = ccx.tcx.sess.struct_span_err( - span, - "pointers cannot be reliably compared during const eval.", - ); + let mut err = ccx + .tcx + .sess + .struct_span_err(span, "pointers cannot be reliably compared during const eval."); err.note( "see issue #53020 <https://github.com/rust-lang/rust/issues/53020> \ for more information", diff --git a/src/test/ui/consts/const-eval/const_raw_ptr_ops.rs b/src/test/ui/consts/const-eval/const_raw_ptr_ops.rs index 083ebfdd4da..e238e13b8e2 100644 --- a/src/test/ui/consts/const-eval/const_raw_ptr_ops.rs +++ b/src/test/ui/consts/const-eval/const_raw_ptr_ops.rs @@ -1,6 +1,6 @@ fn main() {} // unconst and bad, will thus error in miri -const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; //~ ERROR cannot be reliably compared +const X: bool = unsafe { &1 as *const i32 == &2 as *const i32 }; //~ ERROR cannot be reliably // unconst and bad, will thus error in miri -const X2: bool = unsafe { 42 as *const i32 == 43 as *const i32 }; //~ ERROR cannot be reliably compared +const X2: bool = unsafe { 42 as *const i32 == 43 as *const i32 }; //~ ERROR cannot be reliably |
