Remove references to @Trait from a compiler error message
This commit is contained in:
parent
5099b8c863
commit
8135032779
4 changed files with 10 additions and 8 deletions
|
|
@ -11,13 +11,15 @@
|
|||
trait A {}
|
||||
|
||||
struct Struct {
|
||||
r: A //~ ERROR reference to trait `A` where a type is expected
|
||||
r: A //~ ERROR reference to trait `A` where a type is expected; try `~A` or `&A`
|
||||
}
|
||||
|
||||
fn new_struct(r: A) -> Struct { //~ ERROR reference to trait `A` where a type is expected
|
||||
fn new_struct(r: A) -> Struct {
|
||||
//~^ ERROR reference to trait `A` where a type is expected; try `~A` or `&A`
|
||||
Struct { r: r }
|
||||
}
|
||||
|
||||
trait Curve {}
|
||||
enum E {X(Curve)} //~ ERROR reference to trait `Curve` where a type is expected
|
||||
enum E {X(Curve)}
|
||||
//~^ ERROR reference to trait `Curve` where a type is expected; try `~Curve` or `&Curve`
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ fn make_gc() -> @get_ctxt {
|
|||
let ctxt = ctxt { v: 22u };
|
||||
let hc = has_ctxt { c: &ctxt };
|
||||
return @hc as @get_ctxt;
|
||||
//^~ ERROR source contains reference
|
||||
//~^ ERROR source contains reference
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ trait Foo {
|
|||
|
||||
// This should emit the less confusing error, not the more confusing one.
|
||||
|
||||
fn foo(_x: Foo:Send) { //~ERROR reference to trait `Foo` where a type is expected
|
||||
fn foo(_x: Foo:Send) {
|
||||
//~^ERROR reference to trait `Foo` where a type is expected; try `~Foo` or `&Foo`
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue