Auto merge of #106998 - matthiaskrgr:rollup-hmfisji, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #104505 (Remove double spaces after dots in comments) - #106784 (prevent E0512 from emitting [type error] by checking the references_error) - #106834 (new trait solver: only consider goal changed if response is not identity) - #106889 (Mention the lack of `windows_mut` in `windows`) - #106963 (Use `scope_expr_id` from `ProbeCtxt`) - #106970 (Switch to `EarlyBinder` for `item_bounds` query) - #106980 (Hide `_use_mk_alias_ty_instead` in `<AliasTy as Debug>::fmt`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
edefa4189f
173 changed files with 412 additions and 366 deletions
|
@ -221,7 +221,7 @@ impl<'ll, 'tcx> ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
|
|||
bx.store(val, cast_dst, self.layout.align.abi);
|
||||
} else {
|
||||
// The actual return type is a struct, but the ABI
|
||||
// adaptation code has cast it into some scalar type. The
|
||||
// adaptation code has cast it into some scalar type. The
|
||||
// code that follows is the only reliable way I have
|
||||
// found to do a transform like i64 -> {i32,i32}.
|
||||
// Basically we dump the data onto the stack then memcpy it.
|
||||
|
|
|
@ -445,7 +445,7 @@ pub(crate) fn inline_asm_call<'ll>(
|
|||
};
|
||||
|
||||
// Store mark in a metadata node so we can map LLVM errors
|
||||
// back to source locations. See #17552.
|
||||
// back to source locations. See #17552.
|
||||
let key = "srcloc";
|
||||
let kind = llvm::LLVMGetMDKindIDInContext(
|
||||
bx.llcx,
|
||||
|
|
|
@ -145,7 +145,7 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
|
|||
// The binutils linker used on -windows-gnu targets cannot read the import
|
||||
// libraries generated by LLVM: in our attempts, the linker produced an .EXE
|
||||
// that loaded but crashed with an AV upon calling one of the imported
|
||||
// functions. Therefore, use binutils to create the import library instead,
|
||||
// functions. Therefore, use binutils to create the import library instead,
|
||||
// by writing a .DEF file to the temp dir and calling binutils's dlltool.
|
||||
let def_file_path =
|
||||
tmpdir.join(format!("{}{}", lib_name, name_suffix)).with_extension("def");
|
||||
|
@ -219,7 +219,7 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
|
|||
|
||||
// All import names are Rust identifiers and therefore cannot contain \0 characters.
|
||||
// FIXME: when support for #[link_name] is implemented, ensure that the import names
|
||||
// still don't contain any \0 characters. Also need to check that the names don't
|
||||
// still don't contain any \0 characters. Also need to check that the names don't
|
||||
// contain substrings like " @" or "NONAME" that are keywords or otherwise reserved
|
||||
// in definition files.
|
||||
let cstring_import_name_and_ordinal_vector: Vec<(CString, Option<u16>)> =
|
||||
|
@ -433,7 +433,7 @@ fn find_binutils_dlltool(sess: &Session) -> OsString {
|
|||
}
|
||||
|
||||
// The user didn't specify the location of the dlltool binary, and we weren't able
|
||||
// to find the appropriate one on the PATH. Just return the name of the tool
|
||||
// to find the appropriate one on the PATH. Just return the name of the tool
|
||||
// and let the invocation fail with a hopefully useful error message.
|
||||
tool_name
|
||||
}
|
||||
|
|
|
@ -909,7 +909,7 @@ unsafe fn embed_bitcode(
|
|||
|
||||
// Create a `__imp_<symbol> = &symbol` global for every public static `symbol`.
|
||||
// This is required to satisfy `dllimport` references to static data in .rlibs
|
||||
// when using MSVC linker. We do this only for data, as linker can fix up
|
||||
// when using MSVC linker. We do this only for data, as linker can fix up
|
||||
// code references on its own.
|
||||
// See #26591, #27438
|
||||
fn create_msvc_imps(
|
||||
|
|
|
@ -49,8 +49,8 @@ pub fn get_fn<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, instance: Instance<'tcx>) ->
|
|||
let llptrty = fn_abi.ptr_to_llvm_type(cx);
|
||||
|
||||
// This is subtle and surprising, but sometimes we have to bitcast
|
||||
// the resulting fn pointer. The reason has to do with external
|
||||
// functions. If you have two crates that both bind the same C
|
||||
// the resulting fn pointer. The reason has to do with external
|
||||
// functions. If you have two crates that both bind the same C
|
||||
// library, they may not use precisely the same types: for
|
||||
// example, they will probably each declare their own structs,
|
||||
// which are distinct types from LLVM's point of view (nominal
|
||||
|
|
|
@ -140,7 +140,7 @@ pub fn codegen_static_initializer<'ll, 'tcx>(
|
|||
fn set_global_alignment<'ll>(cx: &CodegenCx<'ll, '_>, gv: &'ll Value, mut align: Align) {
|
||||
// The target may require greater alignment for globals than the type does.
|
||||
// Note: GCC and Clang also allow `__attribute__((aligned))` on variables,
|
||||
// which can force it to be smaller. Rust doesn't support this yet.
|
||||
// which can force it to be smaller. Rust doesn't support this yet.
|
||||
if let Some(min) = cx.sess().target.min_global_align {
|
||||
match Align::from_bits(min) {
|
||||
Ok(min) => align = align.max(min),
|
||||
|
@ -171,7 +171,7 @@ fn check_and_apply_linkage<'ll, 'tcx>(
|
|||
llvm::LLVMRustSetLinkage(g1, base::linkage_to_llvm(linkage));
|
||||
|
||||
// Declare an internal global `extern_with_linkage_foo` which
|
||||
// is initialized with the address of `foo`. If `foo` is
|
||||
// is initialized with the address of `foo`. If `foo` is
|
||||
// discarded during linking (for example, if `foo` has weak
|
||||
// linkage and there are no definitions), then
|
||||
// `extern_with_linkage_foo` will instead be initialized to
|
||||
|
|
|
@ -654,7 +654,7 @@ fn codegen_gnu_try<'ll>(
|
|||
// Type indicator for the exception being thrown.
|
||||
//
|
||||
// The first value in this tuple is a pointer to the exception object
|
||||
// being thrown. The second value is a "selector" indicating which of
|
||||
// being thrown. The second value is a "selector" indicating which of
|
||||
// the landing pad clauses the exception's type had been matched to.
|
||||
// rust_try ignores the selector.
|
||||
bx.switch_to_block(catch);
|
||||
|
@ -718,7 +718,7 @@ fn codegen_emcc_try<'ll>(
|
|||
// Type indicator for the exception being thrown.
|
||||
//
|
||||
// The first value in this tuple is a pointer to the exception object
|
||||
// being thrown. The second value is a "selector" indicating which of
|
||||
// being thrown. The second value is a "selector" indicating which of
|
||||
// the landing pad clauses the exception's type had been matched to.
|
||||
bx.switch_to_block(catch);
|
||||
let tydesc = bx.eh_catch_typeinfo();
|
||||
|
|
|
@ -352,10 +352,10 @@ impl<'tcx> LayoutLlvmExt<'tcx> for TyAndLayout<'tcx> {
|
|||
let scalar = [a, b][index];
|
||||
|
||||
// Make sure to return the same type `immediate_llvm_type` would when
|
||||
// dealing with an immediate pair. This means that `(bool, bool)` is
|
||||
// dealing with an immediate pair. This means that `(bool, bool)` is
|
||||
// effectively represented as `{i8, i8}` in memory and two `i1`s as an
|
||||
// immediate, just like `bool` is typically `i8` in memory and only `i1`
|
||||
// when immediate. We need to load/store `bool` as `i8` to avoid
|
||||
// when immediate. We need to load/store `bool` as `i8` to avoid
|
||||
// crippling LLVM optimizations or triggering other LLVM bugs with `i1`.
|
||||
if immediate && scalar.is_bool() {
|
||||
return cx.type_i1();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue