Skip to content

Commit 064b141

Browse files
lilyballalexcrichton
authored andcommitted
---
yaml --- r: 110911 b: refs/heads/snap-stage3 c: 8135032 h: refs/heads/master i: 110909: 9f0e3a7 110907: b058ebe 110903: 1975277 110895: 99d6ac1 110879: d91c4b9 110847: abbd2cd v: v3
1 parent d6f7d42 commit 064b141

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 296e60be6b027a52de58251848037a92f23a0878
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 5099b8c863150675450631347436b7d220f4efd3
4+
refs/heads/snap-stage3: 81350327790fa7bfacb7c32603ca61eb0004b5b2
55
refs/heads/try: 38201d7c6bf0c32b0e5bdc8ecd63976ebc1b3a4c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/typeck/astconv.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,8 @@ pub fn ast_ty_to_ty<AC:AstConv, RS:RegionScope>(
572572
let path_str = path_to_str(path);
573573
tcx.sess.span_err(
574574
ast_ty.span,
575-
format!("reference to trait `{}` where a type is expected; \
576-
try `@{}`, `~{}`, or `&{}`",
577-
path_str, path_str, path_str, path_str));
575+
format!("reference to trait `{name}` where a type is expected; \
576+
try `~{name}` or `&{name}`", name=path_str));
578577
ty::mk_err()
579578
}
580579
ast::DefTy(did) | ast::DefStruct(did) => {

branches/snap-stage3/src/test/compile-fail/issue-5883.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
trait A {}
1212

1313
struct Struct {
14-
r: A //~ ERROR reference to trait `A` where a type is expected
14+
r: A //~ ERROR reference to trait `A` where a type is expected; try `~A` or `&A`
1515
}
1616

17-
fn new_struct(r: A) -> Struct { //~ ERROR reference to trait `A` where a type is expected
17+
fn new_struct(r: A) -> Struct {
18+
//~^ ERROR reference to trait `A` where a type is expected; try `~A` or `&A`
1819
Struct { r: r }
1920
}
2021

2122
trait Curve {}
22-
enum E {X(Curve)} //~ ERROR reference to trait `Curve` where a type is expected
23+
enum E {X(Curve)}
24+
//~^ ERROR reference to trait `Curve` where a type is expected; try `~Curve` or `&Curve`
2325
fn main() {}

branches/snap-stage3/src/test/compile-fail/regions-trait-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn make_gc() -> @get_ctxt {
2929
let ctxt = ctxt { v: 22u };
3030
let hc = has_ctxt { c: &ctxt };
3131
return @hc as @get_ctxt;
32-
//^~ ERROR source contains reference
32+
//~^ ERROR source contains reference
3333
}
3434

3535
fn main() {

branches/snap-stage3/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ trait Foo {
1313

1414
// This should emit the less confusing error, not the more confusing one.
1515

16-
fn foo(_x: Foo:Send) { //~ERROR reference to trait `Foo` where a type is expected
16+
fn foo(_x: Foo:Send) {
17+
//~^ERROR reference to trait `Foo` where a type is expected; try `~Foo` or `&Foo`
1718
}
1819

1920
fn main() { }

0 commit comments

Comments
 (0)