Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backticks #12441

Merged
merged 1 commit into from
Feb 22, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3689,15 +3689,15 @@ pub fn type_err_to_str(cx: ctxt, err: &type_err) -> ~str {
}
}
terr_integer_as_char => {
format!("expected an integral type but found char")
format!("expected an integral type but found `char`")
}
terr_int_mismatch(ref values) => {
format!("expected {} but found {}",
format!("expected `{}` but found `{}`",
values.expected.to_str(),
values.found.to_str())
}
terr_float_mismatch(ref values) => {
format!("expected {} but found {}",
format!("expected `{}` but found `{}`",
values.expected.to_str(),
values.found.to_str())
}
Expand Down Expand Up @@ -3765,13 +3765,13 @@ pub fn provided_trait_methods(cx: ctxt, id: ast::DefId) -> ~[@Method] {
}
_ => {
cx.sess.bug(format!("provided_trait_methods: \
{:?} is not a trait",
`{:?}` is not a trait",
id))
}
}
}
_ => {
cx.sess.bug(format!("provided_trait_methods: {:?} is not \
cx.sess.bug(format!("provided_trait_methods: `{:?}` is not \
a trait",
id))
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ pub fn instantiate_trait_ref(ccx: &CrateCtxt,
_ => {
ccx.tcx.sess.span_fatal(
ast_trait_ref.path.span,
format!("{} is not a trait",
format!("`{}` is not a trait",
path_to_str(&ast_trait_ref.path)));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-2330.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait channel<T> {
}

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

Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/issue-3907.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct S {
name: int
}

impl Foo for S { //~ ERROR: Foo is not a trait
impl Foo for S { //~ ERROR: `Foo` is not a trait
fn bar() { }
}

Expand Down