Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/test/compile-fail/issue-3601.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -25,17 +25,17 @@ enum NodeKind {
Element(ElementData)
}

enum NodeData = {
struct NodeData {
kind: ~NodeKind
};
}

fn main() {
let mut id = HTMLImageData { image: None };
let ed = ElementData { kind: ~HTMLImageElement(id) };
let n = NodeData({kind : ~Element(ed)});
let n = NodeData {kind : ~Element(ed)};
match n.kind {
~Element(ed) => match ed.kind {
~HTMLImageElement(d) if d.image.is_some() => { true }
~HTMLImageElement(ref d) if d.image.is_some() => { true }
},
_ => fail!(~"WAT") //~ ERROR wat
};
Expand Down
6 changes: 4 additions & 2 deletions src/test/run-fail/bug-2470-bounds-check-overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ fn main() {

let x = ~[1u,2u,3u];
do vec::as_imm_buf(x) |p, _len| {
let base = p as uint; // base = 0x1230 say
let idx = base / sys::size_of::<uint>(); // idx = 0x0246 say
// base = 0x1230 say
let base = p as uint;
// idx = 0x0246 say
let idx = base / sys::size_of::<uint>();
error!("ov1 base = 0x%x", base);
error!("ov1 idx = 0x%x", idx);
error!("ov1 sizeof::<uint>() = 0x%x", sys::size_of::<uint>());
Expand Down