about summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2023-09-05Rollup merge of #115563 - krasimirgg:llvm-18-bitcodereader, r=nikicMatthias Krüger-0/+4
llvm-wrapper: adapt for LLVM API change No functional changes intended. Adapts the wrapper for https://github.com/llvm/llvm-project/commit/bbe8cd13335300958b04db5318c31ff52714f96f. Found by our experimental rust + llvm @ HEAD CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/22055#018a6495-8dd9-41df-9381-5e7b0009ce0a/274-575
2023-09-05Rollup merge of #115540 - cjgillot:custom-debuginfo, r=oli-obkMatthias Krüger-2/+57
Support debuginfo for custom MIR.
2023-09-05Rollup merge of #115536 - RalfJung:interpreter-privacy, r=oli-obkMatthias Krüger-246/+331
interpret: make MemPlace, Place, Operand types private to the interpreter Outside the interpreter, only the typed versions should be used.
2023-09-05Rollup merge of #115523 - mojave2:improve-tokenstream, r=petrochenkovMatthias Krüger-11/+7
improve `AttrTokenStream` Improve the performance of `AttrTokenStream::to_tokenstream` method
2023-09-05llvm-wrapper: adapt for LLVM API changeKrasimir Georgiev-0/+4
No functional changes intended. Adapts the wrapper for https://github.com/llvm/llvm-project/commit/bbe8cd13335300958b04db5318c31ff52714f96f. Found by our experimental rust + llvm @ HEAD CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/22055#018a6495-8dd9-41df-9381-5e7b0009ce0a/274-575
2023-09-05Auto merge of #115553 - matthiaskrgr:rollup-c0045hz, r=matthiaskrgrbors-35/+165
Rollup of 5 pull requests Successful merges: - #115353 (Emit error instead of ICE when optimized MIR is missing) - #115488 (Take `&mut Results` in `ResultsVisitor`) - #115492 (Allow `large_assignments` for Box/Arc/Rc initialization) - #115519 (Don't ICE on associated type projection without feature gate in new solver) - #115534 (Expose more information with DefId in smir) r? `@ghost` `@rustbot` modify labels: rollup
2023-09-05Rollup merge of #115534 - ouz-a:smir_def, r=oli-obkMatthias Krüger-1/+20
Expose more information with DefId in smir Currently `Debug` for `DefId` doesn't provide enough information, this changes so that we get `usize` of the `DefId` and the name of it. r? `@oli-obk`
2023-09-05Rollup merge of #115519 - compiler-errors:next-solver-assoc-ice, r=lcnrMatthias Krüger-1/+15
Don't ICE on associated type projection without feature gate in new solver Self-explanatory, we should avoid ICEs when the feature gate is not enabled. Continue to ICE when the feature gate *is* enabled, though. Fixes #115500
2023-09-05Rollup merge of #115492 - Enselic:large-box-move, r=oli-obkMatthias Krüger-10/+91
Allow `large_assignments` for Box/Arc/Rc initialization Does the `stop linting in box/arc initialization` task of #83518. r? `@oli-obk` who is E-mentor.
2023-09-05Rollup merge of #115488 - Jarcho:mut_result_visitor, r=oli-obkMatthias Krüger-20/+20
Take `&mut Results` in `ResultsVisitor` This fixes a small oversight from #108293.
2023-09-05Rollup merge of #115353 - Enselic:no-optimized-mir, r=oli-obkMatthias Krüger-3/+19
Emit error instead of ICE when optimized MIR is missing Closes #51388
2023-09-05Auto merge of #115531 - RalfJung:read_via_copy, r=scottmcmbors-12/+11
read_via_copy: don't prematurely optimize away the read Always do the read to ensure consistent UB error messages in const-eval/Miri. r? `@scottmcm`
2023-09-05Auto merge of #115467 - compiler-errors:assoc-ty-object-safety, r=oli-obkbors-0/+9
Do not require associated types with Self: Sized to uphold bounds when confirming object candidate RPITITs and associated types that have `Self: Sized` bounds are opted out of the `dyn Trait` well-formedness check that happens during confirmation. This ensures that we can actually *use* `dyn Trait`s that have associated types that, e.g., have GATs and RPITITs and other naughty things as long as those are opted-out of object safety via a `Self: Sized` bound. Fixes #115464 This seems like a natural part of https://github.com/rust-lang/rust/pull/112319#issuecomment-1592574451, and I don't think needs re-litigation. r? `@oli-obk`
2023-09-04read_via_copy: don't prematurely optimize away the readRalf Jung-12/+11
2023-09-04provide more useful info for DefId Debugouz-a-1/+20
2023-09-04interpret: make MemPlace, Place, Operand types private to the interpreterRalf Jung-246/+331
2023-09-04Add help to allow lint for the implied by suggestionUrgau-0/+3
2023-09-04improve `AttrTokenStream`mojave2-11/+7
2023-09-04Add OnceHelp lint level (same as OnceNote, except for help)Urgau-4/+14
2023-09-04Auto merge of #115513 - Urgau:normalize-msg-after-translate, r=petrochenkovbors-1/+7
Don't forget to normalize the translated message This PR adds a missing call to `normalize_whitespace` after translating an label. Fixes https://github.com/rust-lang/rust/issues/115498
2023-09-04Auto merge of #115391 - saethlin:depkind-discrim, r=nnethercotebors-1/+47
Encode DepKind as u16 The derived Encodable/Decodable impls serialize/deserialize as a varint, which results in a lot of code size around the encoding/decoding of these types which isn't justified: The full range of values here is rather small but doesn't quite fit in to a `u8`. Growing _all_ serialized `DepKind` to 2 bytes costs us on average 1% size in the incr comp dep graph, which I plan to recoup in https://github.com/rust-lang/rust/pull/110050 by taking advantage of the unused bits in all the serialized `DepKind`. r? `@nnethercote`
2023-09-03Encode DepKind as u16Ben Kimock-1/+47
2023-09-03Auto merge of #115518 - matthiaskrgr:rollup-vksprou, r=matthiaskrgrbors-4/+0
Rollup of 5 pull requests Successful merges: - #115279 (RangeFull: Remove parens around .. in documentation snippet) - #115318 (Reference uplifted clippy lints' rustc name in the release notes) - #115445 (remove some unused crate deps) - #115489 (Use std::io::Error::is_interrupted everywhere) - #115512 (Command::spawn: Fix STARTUPINFOW.cb being initialized with the address of size_of) r? `@ghost` `@rustbot` modify labels: rollup
2023-09-03Don't ICE on associated type projection without feature gateMichael Goulet-1/+15
2023-09-03Rollup merge of #115445 - klensy:less-deps, r=Mark-SimulacrumMatthias Krüger-4/+0
remove some unused crate deps
2023-09-03Auto merge of #115270 - sebastiantoh:issue-105479, r=Nadrierilbors-37/+39
Add note on non-exhaustiveness when matching on str and nested non-exhaustive enums Fixes https://github.com/rust-lang/rust/issues/105479 r? `@Nadrieril`
2023-09-03Don't forget to normalize the translated messageUrgau-1/+7
2023-09-03Rollup merge of #115478 - gurry:115462-exprfield-no-warn, r=compiler-errorsGuillaume Gomez-2/+16
Emit unused doc comment warnings for pat and expr fields Fixes #115462
2023-09-03Improve clarity of diagnostic message on non-exhaustive matchesSebastian Toh-2/+2
2023-09-03Auto merge of #115361 - compiler-errors:param, r=cjgillotbors-129/+145
Don't manually compute param indices when adding implicit `Sized` and `ConstParamHasTy` We can just use resolve_bound_vars to compute these indices faithfully. This also makes the code easier to support where clauses on `non_lifetime_binders` (like `where for<T: Debug> ...`, etc, which I've got a [WIP implementation of](https://github.com/rust-lang/rust/compare/master...compiler-errors:rust:non-lifetime-binder-where-clauses)). r? `@cjgillot`
2023-09-03Auto merge of #115470 - ericmarkmartin:stable-prov, r=oli-obkbors-7/+28
add stable provenance r? `@spastorino` implements rust-lang/project-stable-mir#22
2023-09-03Allow `large_assignments` for Box/Arc/Rc initializationMartin Nordholts-10/+91
Does the `stop linting in box/arc initialization` task of 83518.
2023-09-03Auto merge of #115441 - catandcoder:master, r=workingjubileebors-1/+1
fix the repetitive word
2023-09-03Fix code that now emits unused doc comment warning for expr fieldGurinder Singh-2/+2
2023-09-03Emit unused doc comment warnings for pat and expr fieldsGurinder Singh-0/+14
2023-09-02Take `&mut Results` in `ResultsVisitor`Jason Newcomb-20/+20
2023-09-02Auto merge of #115429 - compiler-errors:assoc-ct-lt-fallthrough, r=cjgillotbors-34/+29
Fall through when resolving elided assoc const lifetimes `@QuineDot` makes a good point in https://github.com/rust-lang/rust/issues/115010#issuecomment-1702127634 that we probably should not accept *more* code due to #115011 even though that code will eventually become a forbid-warning in a few versions (https://github.com/rust-lang/rust/issues/115010#issuecomment-1701598067). Fall through when walking thru the `AnonymousWarnToStatic` (renamed to `AnonymousWarn`) rib so that we can resolve as a fresh lifetime like we did before.
2023-09-02Auto merge of #115469 - matthiaskrgr:rollup-25ybx39, r=matthiaskrgrbors-4/+206
Rollup of 7 pull requests Successful merges: - #114349 (rustc_llvm: Link to `zlib` on dragonfly and solaris) - #114845 (Add alignment to the NPO guarantee) - #115427 (kmc-solid: Fix `is_interrupted`) - #115443 (feat(std): Stabilize 'os_str_bytes' feature) - #115444 (Create a SMIR visitor) - #115449 (Const-stabilize `is_ascii`) - #115456 (Add spastorino on vacation) r? `@ghost` `@rustbot` modify labels: rollup
2023-09-02add stable provenanceEric Mark Martin-7/+28
2023-09-02Rollup merge of #115444 - oli-obk:smir_visitor, r=spastorinoMatthias Krüger-3/+202
Create a SMIR visitor r? ``@spastorino`` Doesn't have tests or examples yet, but I think we could land it and implement it for the rest of the types.
2023-09-02Rollup merge of #114349 - inferiorhumanorgans:dragonfly-link-libz, r=cuviperMatthias Krüger-1/+4
rustc_llvm: Link to `zlib` on dragonfly and solaris On native builds `llvm-config` picks up `zlib` and this gets pased into the rust build tools, but on cross builds `llvm-config` is explicitly ignored as it contains information for the host system and cannot be trusted to be accurate for the target system. Both DragonFly and Solaris contain `zlib` in the base system, so this is both a safe assumption and required for a successful cross build unless `zlib` support is disabled in LLVM. This is more or less in the same vein as rust-lang#75713 and rust-lang#75655.
2023-09-02Do not require associated types with Self: Sized to uphold bounds when ↵Michael Goulet-6/+6
confirming object candidate
2023-09-02RPITITs are considered object-safe, they're always on Self:Sized methodsMichael Goulet-0/+9
2023-09-02Auto merge of #115286 - saethlin:detangler, r=petrochenkovbors-12/+98
Skip rendering metadata strings from include_str!/include_bytes! The const rendering code in rustdoc completely ignores consts from expansions, but the compiler was rendering all consts. So some consts (namely those from `include_bytes!`) were rendered then ignored. Most of the diff here is from moving `print_const_expr` from rustdoc into `rustc_hir_pretty` so that it can be used in rustdoc and when building rmeta files.
2023-09-02Auto merge of #115422 - Zoxc:cache-once-lock, r=cjgillotbors-21/+21
Use `OnceLock` for `SingleCache` This uses `OnceLock` for `SingleCache` instead of `Lock<Option<T>>` so lookups are lock-free. r? `@cjgillot`
2023-09-02Signed-off-by: cui fliter <imcusg@gmail.com>cui fliter-1/+1
remove the repetitive word Signed-off-by: cui fliter <imcusg@gmail.com>
2023-09-01Reuse const rendering from rustdoc in rmeta encodingBen Kimock-12/+98
2023-09-01Rollup merge of #115447 - LegNeato:patch-2, r=oli-obkMatthias Krüger-0/+2
Add comment so pub items are not removed As suggested in https://github.com/rust-lang/rust/pull/115393, add a comment so someone doesn't clean these up.
2023-09-01Rollup merge of #115446 - klensy:fixup-stable-version, r=cuviperMatthias Krüger-1/+1
fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized and (later) moved to beta See: https://github.com/rust-lang/rust/pull/114562#issuecomment-1669424749 https://github.com/rust-lang/rust/pull/115056#issuecomment-1686316608 https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/1.2E72.2E0/near/387695644 Should be backported to beta too.
2023-09-01Rollup merge of #115425 - thechampagne:master, r=oli-obkMatthias Krüger-2/+2
remove unnecessary heap allocation