about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-12-12Simplify and improve perf of import_assets::import_for_itemLukas Wirth-116/+99
2023-12-12Auto merge of #16098 - lnicola:sync-from-rust, r=lnicolabors-17/+22
minor: sync from downstream
2023-12-12Merge remote-tracking branch 'upstream/master' into sync-from-rustLaurențiu Nicola-75/+95
2023-12-12Fix formattingLaurențiu Nicola-1/+1
2023-12-12Merge branch 'master' into sync-from-rustLaurențiu Nicola-1/+5
2023-12-12blesseddarklyspaced-15/+15
resolved conflicts
2023-12-12added column number to dbg!()darklyspaced-3/+3
2023-12-12Auto merge of #118817 - lnicola:sync-from-ra, r=lnicolabors-6213/+9745
Subtree update of `rust-analyzer` r? `@ghost`
2023-12-12Auto merge of #118817 - lnicola:sync-from-ra, r=lnicolabors-6213/+9743
Subtree update of `rust-analyzer` r? `@ghost`
2023-12-12remove a cranelift test that doesn't make sense any moreRalf Jung-60/+0
2023-12-12make it more clear what comments refer to; avoid dangling unaligned referencesRalf Jung-5/+11
Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
2023-12-12remove a cranelift test that doesn't make sense any moreRalf Jung-60/+0
2023-12-12reject projecting to fields whose offset we cannot computeRalf Jung-75/+85
2023-12-12codegen: panic when trying to compute size/align of extern typeRalf Jung-25/+54
2023-12-12Auto merge of #3223 - rust-lang:rustup-2023-12-12, r=RalfJungbors-2831/+4315
Automatic Rustup
2023-12-12Remove dead codes in corer01and-3/+3
2023-12-12Auto merge of #118857 - matthiaskrgr:rollup-t02kx2u, r=matthiaskrgrbors-79/+1368
Rollup of 7 pull requests Successful merges: - #118445 (Let `reuse` look inside git submodules) - #118756 (use bold magenta instead of bold white for highlighting) - #118797 (End locals' live range before suspending coroutine) - #118840 (remove some redundant clones) - #118844 (Monomorphize args while building Instance body in StableMIR) - #118846 (Fix BinOp `ty()` assertion and `fn_sig()` for closures) - #118848 (Add myself back to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
2023-12-12Add rust_analyzer to EXTRA_CHECK_CFGSLaurențiu Nicola-0/+2
2023-12-12Rollup merge of #118848 - wesleywiser:vacation, r=wesleywiserMatthias Krüger-1/+1
Add myself back to review rotation
2023-12-12Rollup merge of #118846 - celinval:smir-ty-methods, r=compiler-errorsMatthias Krüger-13/+156
Fix BinOp `ty()` assertion and `fn_sig()` for closures `BinOp::ty()` was asserting that the argument types were primitives. However, the primitive check doesn't include pointers, which can be used in a `BinaryOperation`. Thus extend the arguments to include them. Since I had to add methods to check for pointers in TyKind, I just went ahead and added a bunch more utility checks that can be handy for our users and fixed the `fn_sig()` method to also include closures. `@compiler-errors` just wanted to confirm that today no `BinaryOperation` accept SIMD types. Is that correct? r? `@compiler-errors`
2023-12-12Rollup merge of #118844 - celinval:smir-mono-args, r=compiler-errorsMatthias Krüger-1/+5
Monomorphize args while building Instance body in StableMIR The function `Instance::body()` in StableMIR is supposed to return a monomorphic body by instantiating all possibly generic constructs. We were previously instantiating type and constants, but not generic arguments. This PR ensures that we also instantiate them. r? ``@compiler-errors``
2023-12-12Rollup merge of #118840 - matthiaskrgr:cloooooone, r=compiler-errorsMatthias Krüger-4/+4
remove some redundant clones
2023-12-12Rollup merge of #118797 - tmiasko:dead-coro, r=davidtwcoMatthias Krüger-8/+27
End locals' live range before suspending coroutine State transforms retains storage statements for locals that are not stored inside a coroutine. It ensures those locals are live when resuming by inserting StorageLive as appropriate. It forgot to end the storage of those locals when suspending, which is fixed here. While the end of live range is implicit when executing return, it is nevertheless useful for inliner which would otherwise extend the live range beyond return. Fixes #117733
2023-12-12Rollup merge of #118445 - ferrocene:jp-support-reuse-in-submodules, ↵Matthias Krüger-1/+2
r=Mark-Simulacrum Let `reuse` look inside git submodules Changes `collect-license-metadata` and `generate-copyright` so they can now look at the git submodules. Unfortunately `reuse` chokes on the LLVM submodule - it finds the word "Copyright" or the unicode copyright symbol in all kinds of places, including UTF-8 test cases. The `reuse` tool expressly won't let you ignore folders, so we let it scan everything and then strip out the LLVM sub-folder in post. Instead, we add in a hand-curated list of copyright information gleaned by reading the LLVM codebase carefully, which is stored in `.reuse/dep5` in Debian format where `reuse` can find and use it. The `.reuse/dep5` continues to track copyright info for files in the tree that do not have SPDX metadata in them (i.e. all of them)
2023-12-12Rollup merge of #118756 - jyn514:colors, r=estebankMatthias Krüger-23/+144
use bold magenta instead of bold white for highlighting according to a poll of gay people in my phone, purple is the most popular color to use for highlighting | color | percentage | | ---------- | ---------- | | bold white | 6% | | blue | 14% | | cyan | 26% | | purple | 37% | | magenta | 17% | unfortunately, purple is not supported by 16-color terminals, which rustc apparently wants to support for some reason. until we require support for full 256-color terms (e.g. by doing the same feature detection as we currently do for urls), we can't use it. instead, i have collapsed the purple votes into magenta on the theory that they're close, and also because magenta is pretty. before: ![image](https://github.com/rust-lang/rust/assets/23638587/9a89eee2-8b89-422e-8554-812827bb2a23) after: ![image](https://github.com/rust-lang/rust/assets/23638587/5bf3a917-8a20-4afd-af3e-f9491d0d57f5) other colors for comparison: blue: ![image](https://github.com/rust-lang/rust/assets/23638587/6f199c7b-d598-4009-8ffc-6b7b1d0d1f8c) cyan: ![image](https://github.com/rust-lang/rust/assets/23638587/a77e4fe3-563e-4aa5-ae92-745bb67287d1) purple: ![image](https://github.com/rust-lang/rust/assets/23638587/ffe603fb-d811-4106-95a9-4dd4c955924c) magenta without bolding: ![image](https://github.com/rust-lang/rust/assets/23638587/cf927e5f-8b25-4dc2-b8e7-32905a11a459) r? ``@estebank``
2023-12-12Rollup merge of #118445 - ferrocene:jp-support-reuse-in-submodules, ↵Matthias Krüger-29/+1031
r=Mark-Simulacrum Let `reuse` look inside git submodules Changes `collect-license-metadata` and `generate-copyright` so they can now look at the git submodules. Unfortunately `reuse` chokes on the LLVM submodule - it finds the word "Copyright" or the unicode copyright symbol in all kinds of places, including UTF-8 test cases. The `reuse` tool expressly won't let you ignore folders, so we let it scan everything and then strip out the LLVM sub-folder in post. Instead, we add in a hand-curated list of copyright information gleaned by reading the LLVM codebase carefully, which is stored in `.reuse/dep5` in Debian format where `reuse` can find and use it. The `.reuse/dep5` continues to track copyright info for files in the tree that do not have SPDX metadata in them (i.e. all of them)
2023-12-11rustdoc-search: clean up parserMichael Howell-7/+2
The `c === "="` was redundant when `isSeparatorCharacter` already checks that. The function `isStopCharacter` and `isEndCharacter` functions did exactly the same thing and have synonymous names. There doesn't seem much point in having both.
2023-12-12fmtThe Miri Conjob Bot-8/+4
2023-12-12Merge from rustcThe Miri Conjob Bot-2826/+4314
2023-12-12Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-12-12Improve an error involving attribute values.Nicholas Nethercote-62/+87
Attribute values must be literals. The error you get when that doesn't hold is pretty bad, e.g.: ``` unexpected expression: 1 + 1 ``` You also get the same error if the attribute value is a literal, but an invalid literal, e.g.: ``` unexpected expression: "foo"suffix ``` This commit does two things. - Changes the error message to "attribute value must be a literal", which gives a better idea of what the problem is and how to fix it. It also no longer prints the invalid expression, because the carets below highlight it anyway. - Separates the "not a literal" case from the "invalid literal" case. Which means invalid literals now get the specific error at the literal level, rather than at the attribute level.
2023-12-12Auto merge of #118742 - lcnr:infer-var-cleanup, r=compiler-errorsbors-106/+51
refactor infer var storage cleanup the code, discovered while working on #118725
2023-12-11Remove scalar fn and tighten the BiOp Ty assertionsCelina G. Val-24/+12
2023-12-12Add xcoff supportKai Luo-1/+1
2023-12-12Make ConstKind and TyKind CopyMichael Goulet-5/+4
2023-12-12Simplify some Copy impls in rustc_type_irMichael Goulet-55/+11
2023-12-11Wesley is not on vacationWesley Wiser-1/+1
All good things...
2023-12-11Fix doc commentCelina G. Val-1/+1
2023-12-11Fix BinOp ty assertion and `fn_sig` for closuresCelina G. Val-12/+167
Also added a few more util methods to TyKind to check for specific types.
2023-12-12Coroutine variant fields can be uninitializedTomasz Miąsko-4/+58
Wrap coroutine variant fields in MaybeUninit to indicate that they might be uninitialized. Otherwise an uninhabited field will make the entire variant uninhabited and introduce undefined behaviour. The analogous issue in the prefix of coroutine layout was addressed by 6fae7f807146e400fa2bbd1c44768d9bcaa57c4c.
2023-12-11Monomorphize args while building Instance bodyCelina G. Val-1/+5
2023-12-11update debug providers to match new RawVec capacity fieldThe 8472-3/+11
2023-12-11add comment to RawVec::cap fieldThe 8472-0/+5
2023-12-11add more niches to rawvecThe 8472-24/+66
2023-12-11Auto merge of #117962 - weihanglo:debug-name-table, r=wesleywiserbors-3/+73
fix: stop emitting `.debug_pubnames` and `.debug_pubtypes` A continuation of #94181. Fixes #48762 MCP can be found in <https://github.com/rust-lang/compiler-team/issues/688>. `.debug_pubnames` and `.debug_pubtypes` are poorly designed and people seldom use them. However, they take a considerable portion of size in the final binary. This tells LLVM stop emitting those sections on DWARFv4 or lower. DWARFv5 use `.debug_names` which is more concise in size and performant for name lookup. Some other no-really-useful personal notes: <details><summary>Details</summary> <p> ## Pepole saying they are not useful * https://github.com/rust-lang/rust/issues/48762 * https://rust-lang.zulipchat.com/#narrow/stream/317568-t-compiler.2Fwg-debugging/topic/investigating.20debuginfo.20size/near/342713604 * `DwarfCompileUnit::hasDwarfPubSections()` — https://github.com/llvm/llvm-project/blob/f633f325a1b808d33ca9653ed373353549ddcde6/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp#L1477-L1494 * clang default to no debug name table when no option provided — https://github.com/llvm/llvm-project/blob/f633f325a1b808d33ca9653ed373353549ddcde6/clang/lib/Frontend/CompilerInvocation.cpp#L1819-L1824 * GCC explicitly says GDB doesn't use pub sections (`TARGET_WANT_DEBUG_PUB_SECTIONS` only be true on Darwin) — https://github.com/gcc-mirror/gcc/blob/5d2a360f0a541646abb11efdbabc33c6a04de7ee/gcc/target.def#L6985-L6990 and https://github.com/bminor/binutils-gdb/blob/319b460545dc79280e2904dcc280057cf71fb753/gold/dwarf_reader.h#L424-L427 * Probably the only place that makes use of pub section in lldb — https://github.com/llvm/llvm-project/blob/725115d7bba2faf3d0c21442f4661dea77b8a77c/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp#L2117-L2135 * "The -gsplit-dwarf option requires -ggnu-pubnames." — https://github.com/gcc-mirror/gcc/blob/5d2a360f0a541646abb11efdbabc33c6a04de7ee/gcc/opts.cc#L1205 * LLVM: Always emit `.debug_names` with dwarf 5 for Apple platforms — https://reviews.llvm.org/D118754 </p> </details>
2023-12-11Remove redundant special case for resume argumentTomasz Miąsko-7/+0
The special case is subsumed by the check for always live locals that follows it.
2023-12-11End locals' live range before suspending coroutineTomasz Miąsko-1/+27
State transforms retains storage statements for locals that are not stored inside a coroutine. It ensures those locals are live when resuming by inserting StorageLive as appropriate. It forgot to end the storage of those locals when suspending, which is fixed here. While the end of live range is implicit when executing return, it is nevertheless useful for inliner which would otherwise extend the live range beyond return.
2023-12-11refactor: only check dwarf version when emitting dwarfWeihang Lo-2/+8
2023-12-11remove some redundant clonesMatthias Krüger-4/+4
2023-12-11Auto merge of #118838 - matthiaskrgr:rollup-8kwzpho, r=matthiaskrgrbors-2606/+2989
Rollup of 8 pull requests Successful merges: - #118620 (resolve: Use `def_kind` query to cleanup some code) - #118647 (dump bootstrap shims) - #118726 (Do not parenthesize exterior struct lit inside match guards) - #118818 (llvm-wrapper: adapt for LLVM API change) - #118822 (Extract exhaustiveness into its own crate) - #118826 (Edit target doc template to remove email) - #118827 (Update table for linker-plugin-lto docs) - #118835 (Fix again `rustc_codegen_gcc` tests) r? `@ghost` `@rustbot` modify labels: rollup