normalize use of backticks for compiler messages in librustc_codegen
https://github.com/rust-lang/rust/issues/60532
This commit is contained in:
parent
6e310f2aba
commit
8aa9f18eb5
8 changed files with 11 additions and 11 deletions
|
@ -146,7 +146,7 @@ fn inline_asm_call(
|
||||||
unsafe {
|
unsafe {
|
||||||
// Ask LLVM to verify that the constraints are well-formed.
|
// Ask LLVM to verify that the constraints are well-formed.
|
||||||
let constraints_ok = llvm::LLVMRustInlineAsmVerify(fty, cons.as_ptr());
|
let constraints_ok = llvm::LLVMRustInlineAsmVerify(fty, cons.as_ptr());
|
||||||
debug!("Constraint verification result: {:?}", constraints_ok);
|
debug!("constraint verification result: {:?}", constraints_ok);
|
||||||
if constraints_ok {
|
if constraints_ok {
|
||||||
let v = llvm::LLVMRustInlineAsm(
|
let v = llvm::LLVMRustInlineAsm(
|
||||||
fty,
|
fty,
|
||||||
|
|
|
@ -215,7 +215,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
||||||
funclet: Option<&Funclet<'ll>>,
|
funclet: Option<&Funclet<'ll>>,
|
||||||
) -> &'ll Value {
|
) -> &'ll Value {
|
||||||
|
|
||||||
debug!("Invoke {:?} with args ({:?})",
|
debug!("invoke {:?} with args ({:?})",
|
||||||
llfn,
|
llfn,
|
||||||
args);
|
args);
|
||||||
|
|
||||||
|
@ -1035,7 +1035,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
||||||
funclet: Option<&Funclet<'ll>>,
|
funclet: Option<&Funclet<'ll>>,
|
||||||
) -> &'ll Value {
|
) -> &'ll Value {
|
||||||
|
|
||||||
debug!("Call {:?} with args ({:?})",
|
debug!("call {:?} with args ({:?})",
|
||||||
llfn,
|
llfn,
|
||||||
args);
|
args);
|
||||||
|
|
||||||
|
@ -1238,7 +1238,7 @@ impl Builder<'a, 'll, 'tcx> {
|
||||||
if dest_ptr_ty == stored_ptr_ty {
|
if dest_ptr_ty == stored_ptr_ty {
|
||||||
ptr
|
ptr
|
||||||
} else {
|
} else {
|
||||||
debug!("Type mismatch in store. \
|
debug!("type mismatch in store. \
|
||||||
Expected {:?}, got {:?}; inserting bitcast",
|
Expected {:?}, got {:?}; inserting bitcast",
|
||||||
dest_ptr_ty, stored_ptr_ty);
|
dest_ptr_ty, stored_ptr_ty);
|
||||||
self.bitcast(ptr, stored_ptr_ty)
|
self.bitcast(ptr, stored_ptr_ty)
|
||||||
|
@ -1274,7 +1274,7 @@ impl Builder<'a, 'll, 'tcx> {
|
||||||
.map(|(i, (expected_ty, &actual_val))| {
|
.map(|(i, (expected_ty, &actual_val))| {
|
||||||
let actual_ty = self.val_ty(actual_val);
|
let actual_ty = self.val_ty(actual_val);
|
||||||
if expected_ty != actual_ty {
|
if expected_ty != actual_ty {
|
||||||
debug!("Type mismatch in function call of {:?}. \
|
debug!("type mismatch in function call of {:?}. \
|
||||||
Expected {:?} for param {}, got {:?}; injecting bitcast",
|
Expected {:?} for param {}, got {:?}; injecting bitcast",
|
||||||
llfn, expected_ty, i, actual_ty);
|
llfn, expected_ty, i, actual_ty);
|
||||||
self.bitcast(actual_val, expected_ty)
|
self.bitcast(actual_val, expected_ty)
|
||||||
|
|
|
@ -433,7 +433,7 @@ pub fn maybe_create_entry_wrapper<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(cx: &'
|
||||||
if cx.get_defined_value("main").is_some() {
|
if cx.get_defined_value("main").is_some() {
|
||||||
// FIXME: We should be smart and show a better diagnostic here.
|
// FIXME: We should be smart and show a better diagnostic here.
|
||||||
cx.sess().struct_span_err(sp, "entry symbol `main` defined multiple times")
|
cx.sess().struct_span_err(sp, "entry symbol `main` defined multiple times")
|
||||||
.help("did you use #[no_mangle] on `fn main`? Use #[start] instead")
|
.help("did you use `#[no_mangle]` on `fn main`? Use `#[start]` instead")
|
||||||
.emit();
|
.emit();
|
||||||
cx.sess().abort_if_errors();
|
cx.sess().abort_if_errors();
|
||||||
bug!();
|
bug!();
|
||||||
|
|
|
@ -138,7 +138,7 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
|
||||||
// * packed struct - there is no alignment padding
|
// * packed struct - there is no alignment padding
|
||||||
match field.ty.sty {
|
match field.ty.sty {
|
||||||
_ if self.llextra.is_none() => {
|
_ if self.llextra.is_none() => {
|
||||||
debug!("Unsized field `{}`, of `{:?}` has no metadata for adjustment",
|
debug!("unsized field `{}`, of `{:?}` has no metadata for adjustment",
|
||||||
ix, self.llval);
|
ix, self.llval);
|
||||||
return simple();
|
return simple();
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ pub fn find_crate_name(sess: Option<&Session>,
|
||||||
if let Some(ref s) = sess.opts.crate_name {
|
if let Some(ref s) = sess.opts.crate_name {
|
||||||
if let Some((attr, name)) = attr_crate_name {
|
if let Some((attr, name)) = attr_crate_name {
|
||||||
if name.as_str() != *s {
|
if name.as_str() != *s {
|
||||||
let msg = format!("--crate-name and #[crate_name] are \
|
let msg = format!("`--crate-name` and `#[crate_name]` are \
|
||||||
required to match, but `{}` != `{}`",
|
required to match, but `{}` != `{}`",
|
||||||
s, name);
|
s, name);
|
||||||
sess.span_err(attr.span, &msg);
|
sess.span_err(attr.span, &msg);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// compile-flags: --crate-name foo
|
// compile-flags: --crate-name foo
|
||||||
|
|
||||||
#![crate_name = "bar"]
|
#![crate_name = "bar"]
|
||||||
//~^ ERROR: --crate-name and #[crate_name] are required to match, but `foo` != `bar`
|
//~^ ERROR: `--crate-name` and `#[crate_name]` are required to match, but `foo` != `bar`
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: --crate-name and #[crate_name] are required to match, but `foo` != `bar`
|
error: `--crate-name` and `#[crate_name]` are required to match, but `foo` != `bar`
|
||||||
--> $DIR/crate-name-mismatch.rs:3:1
|
--> $DIR/crate-name-mismatch.rs:3:1
|
||||||
|
|
|
|
||||||
LL | #![crate_name = "bar"]
|
LL | #![crate_name = "bar"]
|
||||||
|
|
|
@ -4,7 +4,7 @@ error: entry symbol `main` defined multiple times
|
||||||
LL | fn main(){}
|
LL | fn main(){}
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: did you use #[no_mangle] on `fn main`? Use #[start] instead
|
= help: did you use `#[no_mangle]` on `fn main`? Use `#[start]` instead
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue