Skip to content

Commit 2049287

Browse files
Disable test on bootstrap compiler
1 parent 1606335 commit 2049287

File tree

1 file changed

+25
-20
lines changed

1 file changed

+25
-20
lines changed

library/core/tests/cmp.rs

+25-20
Original file line numberDiff line numberDiff line change
@@ -204,30 +204,35 @@ fn cmp_default() {
204204
assert_eq!(Fool(false), Fool(true));
205205
}
206206

207-
struct S(i32);
207+
#[cfg(not(bootstrap))]
208+
mod const_cmp {
209+
use super::*;
208210

209-
impl const PartialEq for S {
210-
fn eq(&self, other: &Self) -> bool {
211-
self.0 == other.0
211+
struct S(i32);
212+
213+
impl const PartialEq for S {
214+
fn eq(&self, other: &Self) -> bool {
215+
self.0 == other.0
216+
}
212217
}
213-
}
214218

215-
impl const PartialOrd for S {
216-
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
217-
let ret = match (self.0, other.0) {
218-
(a, b) if a > b => Ordering::Greater,
219-
(a, b) if a < b => Ordering::Less,
220-
_ => Ordering::Equal,
221-
};
219+
impl const PartialOrd for S {
220+
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
221+
let ret = match (self.0, other.0) {
222+
(a, b) if a > b => Ordering::Greater,
223+
(a, b) if a < b => Ordering::Less,
224+
_ => Ordering::Equal,
225+
};
222226

223-
Some(ret)
227+
Some(ret)
228+
}
224229
}
225-
}
226230

227-
const _: () = assert!(S(1) == S(1));
228-
const _: () = assert!(S(0) != S(1));
231+
const _: () = assert!(S(1) == S(1));
232+
const _: () = assert!(S(0) != S(1));
229233

230-
const _: () = assert!(S(1) <= S(1));
231-
const _: () = assert!(S(1) >= S(1));
232-
const _: () = assert!(S(0) < S(1));
233-
const _: () = assert!(S(1) > S(0));
234+
const _: () = assert!(S(1) <= S(1));
235+
const _: () = assert!(S(1) >= S(1));
236+
const _: () = assert!(S(0) < S(1));
237+
const _: () = assert!(S(1) > S(0));
238+
}

0 commit comments

Comments
 (0)