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

normalize use of backticks in compiler messages for librustc_allocator #62880

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
4 changes: 2 additions & 2 deletions src/librustc_allocator/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl MutVisitor for ExpandAllocatorDirectives<'_> {

if self.found {
self.handler
.span_err(item.span, "cannot define more than one #[global_allocator]");
.span_err(item.span, "cannot define more than one `#[global_allocator]`");
return smallvec![item];
}
self.found = true;
Expand Down Expand Up @@ -280,7 +280,7 @@ impl AllocFnFactory<'_> {
AllocatorTy::Unit => (self.cx.ty(self.span, TyKind::Tup(Vec::new())), expr),

AllocatorTy::Layout | AllocatorTy::Usize | AllocatorTy::Ptr => {
panic!("can't convert AllocatorTy to an output")
panic!("can't convert `AllocatorTy` to an output")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/allocator/two-allocators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ use std::alloc::System;
static A: System = System;
#[global_allocator]
static B: System = System;
//~^ ERROR: cannot define more than one #[global_allocator]
//~^ ERROR: cannot define more than one `#[global_allocator]`

fn main() {}
2 changes: 1 addition & 1 deletion src/test/ui/allocator/two-allocators.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: cannot define more than one #[global_allocator]
error: cannot define more than one `#[global_allocator]`
--> $DIR/two-allocators.rs:6:1
|
LL | static B: System = System;
Expand Down