Skip to content

Commit e5f1761

Browse files
committed
---
yaml --- r: 216255 b: refs/heads/stable c: e4b8064 h: refs/heads/master i: 216253: a4460aa 216251: 04910a8 216247: 95b7ad8 216239: 437e181 216223: a472128 216191: 1beccef v: v3
1 parent c1506c5 commit e5f1761

File tree

6 files changed

+63
-2
lines changed

6 files changed

+63
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ refs/heads/tmp: 378a370ff2057afeb1eae86eb6e78c476866a4a6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: a5286998df566e736b32f6795bfc3803bdaf453d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: a249910d3417160e2f871bc5a5200bec6b11f518
32+
refs/heads/stable: e4b80647c8d3f1d41b1e8467e2a04e09d0c67b03
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375

branches/stable/configure

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,9 +659,10 @@ if [ -n "$CFG_ENABLE_DEBUG" ]; then
659659
CFG_DISABLE_OPTIMIZE=1
660660
CFG_DISABLE_OPTIMIZE_CXX=1
661661
fi
662-
CFG_ENABLE_LLVM_ASSERTIONS=1
663662
CFG_ENABLE_DEBUG_ASSERTIONS=1
664663
CFG_ENABLE_DEBUG_JEMALLOC=1
664+
CFG_ENABLE_DEBUGINFO=1
665+
CFG_ENABLE_LLVM_ASSERTIONS=1
665666
fi
666667

667668
# OK, now write the debugging options

branches/stable/src/librustc_trans/trans/adt.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,10 @@ fn find_discr_field_candidate<'tcx>(tcx: &ty::ctxt<'tcx>,
414414
assert_eq!(nonzero_fields.len(), 1);
415415
let nonzero_field = ty::lookup_field_type(tcx, did, nonzero_fields[0].id, substs);
416416
match nonzero_field.sty {
417+
ty::ty_ptr(ty::mt { ty, .. }) if !type_is_sized(tcx, ty) => {
418+
path.push_all(&[0, FAT_PTR_ADDR]);
419+
Some(path)
420+
},
417421
ty::ty_ptr(..) | ty::ty_int(..) | ty::ty_uint(..) => {
418422
path.push(0);
419423
Some(path)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
trait Expr : PartialEq<Self::Item> {
12+
//~^ ERROR: unsupported cyclic reference between types/traits detected
13+
type Item = Expr;
14+
}
15+
16+
fn main() {}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
enum Foo { Bar }
12+
13+
fn main() {
14+
Foo::Bar.a;
15+
//~^ ERROR: attempted access of field `a` on type `Foo`, but no field with that name was found
16+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2015 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+
// Don't fail if we encounter a NonZero<*T> where T is an unsized type
12+
13+
#![feature(unique)]
14+
15+
use std::ptr::Unique;
16+
17+
fn main() {
18+
let mut a = [0u8; 5];
19+
let b: Option<Unique<[u8]>> = unsafe { Some(Unique::new(&mut a)) };
20+
match b {
21+
Some(_) => println!("Got `Some`"),
22+
None => panic!("Unexpected `None`"),
23+
}
24+
}

0 commit comments

Comments
 (0)