Skip to content

Commit bbc4e57

Browse files
committed
---
yaml --- r: 107258 b: refs/heads/dist-snap c: 33e8663 h: refs/heads/master v: v3
1 parent c9282df commit bbc4e57

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 02d86216f39d78d614c684e72250cd37e5c6339a
9+
refs/heads/dist-snap: 33e866339126df3806f9cae95f2b91d38abaab32
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/guide-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ A typical mutable container will implement at least `iter()`, `mut_iter()` and
130130
### Freezing
131131
132132
Unlike most other languages with external iterators, Rust has no *iterator
133-
invalidation*. As long an iterator is still in scope, the compiler will prevent
133+
invalidation*. As long as an iterator is still in scope, the compiler will prevent
134134
modification of the container through another handle.
135135
136136
~~~

branches/dist-snap/src/librustc/middle/trans/adt.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,6 @@ pub fn trans_const(ccx: &CrateContext, r: &Repr, discr: Disr,
730730
if discr == nndiscr {
731731
C_struct(build_const_struct(ccx, nonnull, vals), false)
732732
} else {
733-
assert_eq!(vals.len(), 0);
734733
let vals = nonnull.fields.iter().enumerate().map(|(i, &ty)| {
735734
let llty = type_of::sizing_type_of(ccx, ty);
736735
if i == ptrfield { C_null(llty) } else { C_undef(llty) }

branches/dist-snap/src/librustdoc/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -109,7 +109,13 @@ pub fn usage(argv0: &str) {
109109
}
110110

111111
pub fn main_args(args: &[~str]) -> int {
112-
let matches = groups::getopts(args.tail(), opts()).unwrap();
112+
let matches = match groups::getopts(args.tail(), opts()) {
113+
Ok(m) => m,
114+
Err(err) => {
115+
println(err.to_err_msg());
116+
return 1;
117+
}
118+
};
113119
if matches.opt_present("h") || matches.opt_present("help") {
114120
usage(args[0]);
115121
return 0;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use std::result::{Result,Ok};
12+
static C: Result<(), ~int> = Ok(());
13+
14+
// This is because of yet another bad assertion (ICE) about the null side of a nullable enum.
15+
// So we won't actually compile if the bug is present, but we check the value in main anyway.
16+
17+
pub fn main() {
18+
assert!(C.is_ok());
19+
}

0 commit comments

Comments
 (0)