Skip to content

Commit 1a7127b

Browse files
author
Samy Kacimi
committed
normalize use of backticks in compiler messages for librustc_allocator
#60532
1 parent e649e90 commit 1a7127b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/librustc_allocator/expand.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl MutVisitor for ExpandAllocatorDirectives<'_> {
7979

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

282282
AllocatorTy::Layout | AllocatorTy::Usize | AllocatorTy::Ptr => {
283-
panic!("can't convert AllocatorTy to an output")
283+
panic!("can't convert `AllocatorTy` to an output")
284284
}
285285
}
286286
}

src/test/ui/allocator/two-allocators.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ use std::alloc::System;
44
static A: System = System;
55
#[global_allocator]
66
static B: System = System;
7-
//~^ ERROR: cannot define more than one #[global_allocator]
7+
//~^ ERROR: cannot define more than one `#[global_allocator]`
88

99
fn main() {}

src/test/ui/allocator/two-allocators.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: cannot define more than one #[global_allocator]
1+
error: cannot define more than one `#[global_allocator]`
22
--> $DIR/two-allocators.rs:6:1
33
|
44
LL | static B: System = System;

0 commit comments

Comments
 (0)