diff options
| author | Samy Kacimi <samy.kacimi@protonmail.ch> | 2019-07-22 22:52:13 +0200 |
|---|---|---|
| committer | Samy Kacimi <samy.kacimi@protonmail.ch> | 2019-07-22 23:30:29 +0200 |
| commit | 1a7127bbc469ba10c11d9d2d0b10669aff38b90c (patch) | |
| tree | accb6b29a015a61555b78683628c32155ae5013e | |
| parent | e649e903440bfd919bfc9db848c28df6d795a116 (diff) | |
| download | rust-1a7127bbc469ba10c11d9d2d0b10669aff38b90c.tar.gz rust-1a7127bbc469ba10c11d9d2d0b10669aff38b90c.zip | |
normalize use of backticks in compiler messages for librustc_allocator
https://github.com/rust-lang/rust/issues/60532
| -rw-r--r-- | src/librustc_allocator/expand.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/allocator/two-allocators.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/allocator/two-allocators.stderr | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_allocator/expand.rs b/src/librustc_allocator/expand.rs index 87373364c4d..af63fffc0f9 100644 --- a/src/librustc_allocator/expand.rs +++ b/src/librustc_allocator/expand.rs @@ -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; @@ -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") } } } diff --git a/src/test/ui/allocator/two-allocators.rs b/src/test/ui/allocator/two-allocators.rs index 10fb03c3930..0f81fc41823 100644 --- a/src/test/ui/allocator/two-allocators.rs +++ b/src/test/ui/allocator/two-allocators.rs @@ -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() {} diff --git a/src/test/ui/allocator/two-allocators.stderr b/src/test/ui/allocator/two-allocators.stderr index da247f6c316..6b0c2b2a25d 100644 --- a/src/test/ui/allocator/two-allocators.stderr +++ b/src/test/ui/allocator/two-allocators.stderr @@ -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; |
