Skip to content

Commit

Permalink
Satisfy tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jun 20, 2020
1 parent 9e88b48 commit 53686b9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/liballoc/raw_vec.rs
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/intrinsics.rs
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_mir/transform/check_consts/ops.rs
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions 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

0 comments on commit 53686b9

Please sign in to comment.