Skip to content

Commit b63bcbf

Browse files
schmeealexcrichton
authored andcommitted
---
yaml --- r: 152564 b: refs/heads/try2 c: ebde8cf h: refs/heads/master v: v3
1 parent 9fb10a0 commit b63bcbf

File tree

7 files changed

+29
-8
lines changed

7 files changed

+29
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 9945052e64737a21a7d9a6cb337bda1a4eed3e0a
8+
refs/heads/try2: ebde8cfa618756ee615cb543c832b53653ce2977
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/util/ppaux.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ pub fn ty_to_str(cx: &ctxt, typ: t) -> String {
351351
ty_uint(t) => ast_util::uint_ty_to_str(t, None,
352352
ast_util::AutoSuffix).to_string(),
353353
ty_float(t) => ast_util::float_ty_to_str(t).to_string(),
354-
ty_box(typ) => format!("@{}", ty_to_str(cx, typ)),
355-
ty_uniq(typ) => format!("~{}", ty_to_str(cx, typ)),
354+
ty_box(typ) => format!("Gc<{}>", ty_to_str(cx, typ)),
355+
ty_uniq(typ) => format!("Box<{}>", ty_to_str(cx, typ)),
356356
ty_ptr(ref tm) => format!("*{}", mt_to_str(cx, tm)),
357357
ty_rptr(r, ref tm) => {
358358
let mut buf = region_ptr_to_str(cx, r);

branches/try2/src/test/compile-fail/autoderef-full-lval.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ struct fish {
2626
fn main() {
2727
let a: clam = clam{x: box(GC) 1, y: box(GC) 2};
2828
let b: clam = clam{x: box(GC) 10, y: box(GC) 20};
29-
let z: int = a.x + b.y; //~ ERROR binary operation `+` cannot be applied to type `@int`
29+
let z: int = a.x + b.y; //~ ERROR binary operation `+` cannot be applied to type `Gc<int>`
3030
println!("{:?}", z);
3131
assert_eq!(z, 21);
3232
let forty: fish = fish{a: box(GC) 40};
3333
let two: fish = fish{a: box(GC) 2};
3434
let answer: int = forty.a + two.a;
35-
//~^ ERROR binary operation `+` cannot be applied to type `@int`
35+
//~^ ERROR binary operation `+` cannot be applied to type `Gc<int>`
3636
println!("{:?}", answer);
3737
assert_eq!(answer, 42);
3838
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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::gc::{GC,Gc};
12+
13+
fn main() {
14+
let x: Box<int> = box 0;
15+
let y: Gc<int> = box (GC) 0;
16+
17+
println!("{}", x + 1); //~ ERROR binary operation `+` cannot be applied to type `Box<int>`
18+
//~^ ERROR cannot determine a type for this bounded type parameter: unconstrained type
19+
println!("{}", y + 1);
20+
//~^ ERROR binary operation `+` cannot be applied to type `Gc<int>`
21+
}

branches/try2/src/test/compile-fail/issue-7013.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct A {
3232

3333
fn main() {
3434
let a = A {v: box B{v: None} as Box<Foo+Send>};
35-
//~^ ERROR cannot pack type `~B`, which does not fulfill `Send`
35+
//~^ ERROR cannot pack type `Box<B>`, which does not fulfill `Send`
3636
let v = Rc::new(RefCell::new(a));
3737
let w = v.clone();
3838
let b = &*v;

branches/try2/src/test/compile-fail/issue-7061.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct BarStruct;
1616

1717
impl<'a> BarStruct {
1818
fn foo(&'a mut self) -> Gc<BarStruct> { self }
19-
//~^ ERROR: error: mismatched types: expected `@BarStruct` but found `&'a mut BarStruct
19+
//~^ ERROR: error: mismatched types: expected `Gc<BarStruct>` but found `&'a mut BarStruct
2020
}
2121

2222
fn main() {}

branches/try2/src/test/compile-fail/regions-infer-paramd-indirect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl<'a> set_f<'a> for c<'a> {
3333
}
3434

3535
fn set_f_bad(&self, b: Gc<b>) {
36-
self.f = b; //~ ERROR mismatched types: expected `@@&'a int` but found `@@&int`
36+
self.f = b; //~ ERROR mismatched types: expected `Gc<Gc<&'a int>>` but found `Gc<Gc<&int>>`
3737
//~^ ERROR cannot infer
3838
}
3939
}

0 commit comments

Comments
 (0)