]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #62880 - fakenine:normalize_use_of_backticks_compiler_messages_p14...
authorMark Rousskov <mark.simulacrum@gmail.com>
Tue, 23 Jul 2019 16:51:19 +0000 (12:51 -0400)
committerGitHub <noreply@github.com>
Tue, 23 Jul 2019 16:51:19 +0000 (12:51 -0400)
normalize use of backticks in compiler messages for librustc_allocator

https://github.com/rust-lang/rust/issues/60532

src/librustc_allocator/expand.rs
src/test/ui/allocator/two-allocators.rs
src/test/ui/allocator/two-allocators.stderr

index 87373364c4d9e3d26753f667c03ac52d86774f84..af63fffc0f9b4074a7fd32b0f9ed733d40e6c562 100644 (file)
@@ -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 @@ fn ret_ty(&self, ty: &AllocatorTy, expr: P<Expr>) -> (P<Ty>, P<Expr>) {
             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")
             }
         }
     }
index 10fb03c39302b470f85d4927e0d96c2ec31901ef..0f81fc41823ba13654876ff35bff907c1fe5a042 100644 (file)
@@ -4,6 +4,6 @@
 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() {}
index da247f6c316c311ee4552ef5955d53f1b289dc3f..6b0c2b2a25d38516d5d66c5c6223da5149937b5e 100644 (file)
@@ -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;