Skip to content

Commit 766e138

Browse files
author
kud1ing
committed
backticks
1 parent 1366e04 commit 766e138

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/librustc/middle/ty.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3689,15 +3689,15 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
36893689
}
36903690
}
36913691
terr_integer_as_char => {
3692-
format!("expected an integral type but found char")
3692+
format!("expected an integral type but found `char`")
36933693
}
36943694
terr_int_mismatch(ref values) => {
3695-
format!("expected {} but found {}",
3695+
format!("expected `{}` but found `{}`",
36963696
values.expected.to_str(),
36973697
values.found.to_str())
36983698
}
36993699
terr_float_mismatch(ref values) => {
3700-
format!("expected {} but found {}",
3700+
format!("expected `{}` but found `{}`",
37013701
values.expected.to_str(),
37023702
values.found.to_str())
37033703
}
@@ -3765,13 +3765,13 @@ pub fn provided_trait_methods(cx: ctxt, id: ast::DefId) -> ~[@Method] {
37653765
}
37663766
_ => {
37673767
cx.sess.bug(format!("provided_trait_methods: \
3768-
{:?} is not a trait",
3768+
`{:?}` is not a trait",
37693769
id))
37703770
}
37713771
}
37723772
}
37733773
_ => {
3774-
cx.sess.bug(format!("provided_trait_methods: {:?} is not \
3774+
cx.sess.bug(format!("provided_trait_methods: `{:?}` is not \
37753775
a trait",
37763776
id))
37773777
}

src/librustc/middle/typeck/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ pub fn instantiate_trait_ref(ccx: &CrateCtxt,
768768
_ => {
769769
ccx.tcx.sess.span_fatal(
770770
ast_trait_ref.path.span,
771-
format!("{} is not a trait",
771+
format!("`{}` is not a trait",
772772
path_to_str(&ast_trait_ref.path)));
773773
}
774774
}

src/test/compile-fail/issue-2330.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait channel<T> {
1515
}
1616

1717
// `chan` is not a trait, it's an enum
18-
impl chan for int { //~ ERROR chan is not a trait
18+
impl chan for int { //~ ERROR `chan` is not a trait
1919
fn send(&self, v: int) { fail!() }
2020
}
2121

src/test/compile-fail/issue-3907.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct S {
1717
name: int
1818
}
1919

20-
impl Foo for S { //~ ERROR: Foo is not a trait
20+
impl Foo for S { //~ ERROR: `Foo` is not a trait
2121
fn bar() { }
2222
}
2323

0 commit comments

Comments
 (0)