about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-10-07Rollup merge of #130479 - ↵Jubilee-2/+5
onur-ozkan:llvm-bitcode-linker-multiple-candidates, r=Kobzol skip in-tree compiler build for llvm-bitcode-linker if ci-rustc is on Similar to https://github.com/rust-lang/rust/issues/108767, resolves the `multiple candidates` problem for ci-rustc. See https://github.com/rust-lang/rust/pull/122709#issuecomment-2355436227 for more context. Blocker for #122709.
2024-10-07bump rustc_tools_util versionRalf Jung-4/+4
2024-10-07rustdoc: improve `<wbr>`-insertion for SCREAMING_CAMEL_CASEMichael Howell-1/+5
2024-10-07Update booksrustbot-0/+0
2024-10-07Remove dead codeGuillaume Gomez-115/+1
2024-10-07Migrate `emit-to-stdout` to new run-makeclubby789-4/+3
Co-authored-by: Oneirical <manchot@videotron.ca> Co-authored-by: Chris Denton <chris@chrisdenton.dev>
2024-10-07Add stdio configuring to run-make Rustcclubby789-0/+24
2024-10-07Test for issue 23600clubby789-1/+0
2024-10-08add knownEngines lldb-dapkouhe3-0/+20
2024-10-07rustdoc: docs for search deduplication (#1850)Michael Howell-3/+73
2024-10-07Auto merge of #131354 - matthiaskrgr:rollup-hprnng2, r=matthiaskrgrbors-95/+15
Rollup of 4 pull requests Successful merges: - #131331 (Revert "warn_old_master_branch" check) - #131344 (Avoid `&Lrc<T>` in various places) - #131346 (Restrict `ignore-mode-*` directives) - #131353 (Add documentation for `runtest::check_rustdoc_test_option` method) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-07Rollup merge of #131353 - GuillaumeGomez:check_rustdoc_test_option, r=jieyouxuMatthias Krüger-0/+4
Add documentation for `runtest::check_rustdoc_test_option` method r? `@jieyouxu`
2024-10-07Rollup merge of #131346 - jieyouxu:prune-invalid-directives, r=ZalatharMatthias Krüger-21/+3
Restrict `ignore-mode-*` directives This is only used by coverage test suites where the same sources get run under different coverage modes. Restrict `ignore-mode-<coverage_mode>` to only coverage modes.
2024-10-07Rollup merge of #131344 - nnethercote:ref-Lrc, r=compiler-errorsMatthias Krüger-6/+7
Avoid `&Lrc<T>` in various places Seeing `&Lrc<T>` is a bit suspicious, and `&T` or `Lrc<T>` is often better. r? `@oli-obk`
2024-10-07Rollup merge of #131331 - onur-ozkan:131296, r=KobzolMatthias Krüger-68/+1
Revert "warn_old_master_branch" check See https://github.com/rust-lang/rust/issues/131296#issuecomment-2395486918. Reverts https://github.com/rust-lang/rust/pull/130121 and https://github.com/rust-lang/rust/pull/129584. Fixes https://github.com/rust-lang/rust/issues/131296 and https://github.com/rust-lang/rust/issues/131324.
2024-10-07Add documentation for `runtest::check_rustdoc_test_option` methodGuillaume Gomez-0/+4
2024-10-07Revise test naming advice to discourage using issue numbers alone许杰友 Jieyou Xu (Joe)-8/+14
But accept test names that include non-prefix issue number.
2024-10-07Auto merge of #131235 - ↵bors-76/+72
codemountains:rename-nestedmetaitem-to-metaitemlnner, r=nnethercote Rename `NestedMetaItem` to `MetaItemInner` Fixes #131087 r? `@nnethercote`
2024-10-07Document `bootstrap` integration with `rustc-perf` (#2005)Jakub Beránek-31/+49
2024-10-07building: Update instructions for ./x setup editorKajetan Puchalski-40/+56
2024-10-07Remove valgrind test suite from opt-dist许杰友 Jieyou Xu (Joe)-1/+0
2024-10-07Remove valgrind test suite support from bootstrap许杰友 Jieyou Xu (Joe)-8/+0
2024-10-07Remove valgrind test suite and support from compiletest许杰友 Jieyou Xu (Joe)-95/+29
2024-10-07[Testing 2/2] Revise revisions docs (#2089)许杰友 Jieyou Xu (Joe)-268/+262
Co-authored-by: nora <48135649+Noratrieb@users.noreply.github.com>
2024-10-07Rename nested_meta to meta_item_innercodemountains-8/+7
2024-10-07Prune invalid `ignore-mode-*` directives许杰友 Jieyou Xu (Joe)-21/+3
These are only valid for coverage test modes.
2024-10-07Avoid another `&Lrc<..>` in a return value.Nicholas Nethercote-0/+1
2024-10-07Convert `Option<&Lrc<T>>` return types to `Option<&T>`.Nicholas Nethercote-6/+6
It's simpler and more concise.
2024-10-07[Testing 1/2] Revise testing chapters excluding the directives chapter (#2088)许杰友 Jieyou Xu (Joe)-1043/+1406
2024-10-06Auto merge of #128651 - folkertdev:naked-asm-macro-v2, r=Amanieubors-1/+1
add `naked_asm!` macro for use in `#[naked]` functions tracking issue: https://github.com/rust-lang/rust/issues/90957 Adds the `core::arch::naked_asm` macro, to be used in `#[naked]` functions, but providing better error messages and a place to explain the restrictions on assembly in naked functions. This PR does not yet require that the `naked_asm!` macro is used inside of `#[naked]` functions: - the `asm!` macro can still be used in `#[naked]` functions currently, with the same restrictions and error messages as before. - the `naked_asm!` macro can be used outside of `#[naked]` functions. It has not yet been decided whether that should be allowed long-term. In this PR, the parsing code of `naked_asm!` now enforces the restrictions on assembly in naked functions, with the exception of checking that the `noreturn` option is specified. It also has not currently been decided if `noreturn` should be implicit or not. This PR looks large because it touches a bunch of tests. The code changes are mostly straightforward I think: we now have 3 flavors of assembly macro, and that information must be propagated through the parsing code and error messages. cc `@Lokathor` r? `@Amanieu`
2024-10-06Use external stack in borrowck DFSChayim Refael Friedman-58/+67
Because damnit, it can crash r-a. Why do people make this stupid DFSes anyway (I get it, it's easier until it blows).
2024-10-06various fixes for `naked_asm!` implementationFolkert de Vries-1/+1
- fix for divergence - fix error message - fix another cranelift test - fix some cranelift things - don't set the NORETURN option for naked asm - fix use of naked_asm! in doc comment - fix use of naked_asm! in run-make test - use `span_bug` in unreachable branch
2024-10-07fix: Do not consider mutable usage of deref to `*mut T` as deref_mutShoyu Vanilla-1/+37
2024-10-06disallow `asm!` in `#[naked]` functionsFolkert de Vries-2/+2
also disallow the `noreturn` option, and infer `naked_asm!` as `!`
2024-10-06implement `naked_asm` macroFolkert-2/+2
2024-10-06Revert "Rollup merge of #129584 - lolbinarycat:old-upstream-warning, ↵onur-ozkan-46/+1
r=albertlarsan68" This reverts commit 776187d2c9a42dc07452ae36a8b765d66bd8e2ca, reversing changes made to 7d015575ada1de8a4627fcdea416194a57a175c2.
2024-10-06Revert "Auto merge of #130121 - ↵onur-ozkan-47/+25
lolbinarycat:bootstrap-warn-old-upstream-worktree, r=albertlarsan68" This reverts commit 507c05bead4026ed8841512095b4218119eb479f, reversing changes made to 0609062a91c8f445c3e9a0de57e402f9b1b8b0a7.
2024-10-06Rename NestedMetaItem to MetaItemInnercodemountains-72/+69
2024-10-06Auto merge of #131259 - ↵bors-112/+111
ismailarilik:handle-potential-query-instability-lint-for-librustdoc, r=notriddle Handle `librustdoc` cases of `rustc::potential_query_instability` lint This PR removes `#![allow(rustc::potential_query_instability)]` line from [`src/librustdoc/lib.rs`](https://github.com/rust-lang/rust/blob/master/src/librustdoc/lib.rs#L23) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors. A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447 r? `@compiler-errors`
2024-10-06Auto merge of #131320 - matthiaskrgr:rollup-tom15b3, r=matthiaskrgrbors-16/+98
Rollup of 5 pull requests Successful merges: - #129392 (Do not consider match/let/ref of place that evaluates to `!` to diverge, disallow coercions from them too) - #131279 (update "build/host" symlink comment) - #131312 (On function and method calls in patterns, link to the book) - #131315 (bootstrap: add `std_features` config) - #131316 (Fix typo in primitive_docs.rs) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-06Rollup merge of #131315 - shrirambalaji:issue-129599-fix-shrirambalaji, ↵Matthias Krüger-13/+48
r=onur-ozkan bootstrap: add `std_features` config Adding support for a std-features config under the rust section in config.toml during bootstrap. This allows rustc devs to build with specific feature flags for local development.
2024-10-06Rollup merge of #131279 - onur-ozkan:remove-host-symlink, r=NoratriebMatthias Krüger-1/+1
update "build/host" symlink comment It's needed and can't be removed, so make it clear where it's needed.
2024-10-06Rollup merge of #129392 - ↵Matthias Krüger-2/+49
compiler-errors:raw-ref-op-doesnt-diverge-but-more, r=lcnr Do not consider match/let/ref of place that evaluates to `!` to diverge, disallow coercions from them too Fixes #117288. This PR implements a heuristic which disables two things that are currently being performed on the HIR when we have **expressions that involve place-like expressions that point to `!`**. Specifically, it will (in certain cases explained below): ### (1.) Disable the `NeverToAny` coercion we implicitly insert for `!`. Which fixes this inadvertent, sneaky unsoundness: ``` unsafe { let x: *const ! = &0 as *const u8 as *const !; let _: () = *x; } ``` which is UB because currently rust emits an *implicit* NeverToAny coercion even though we really shouldn't be, since there's no read of the value pointed by `x`. ### (2.) Disable the logic which considers expression which evaluate to `!` to diverge, which affects the type returned by the containing block. Which fixes this unsoundness: ``` fn make_up_a_value<T>() -> T { unsafe { let x: *const ! = &0 as *const u8 as *const !; let _ = *x; } } ``` We disable these two operations **if** the expression is a place-like expression (locals, statics, field projections, index operations, and deref operations), and if the parent expression is either: (1.) the LHS of an assignment (2.) AddrOf (3.) A match or let **unless** all of the *patterns consitute a read*, which is explained below: And finally, a pattern currently is considered to constitute a read **unless** it is a wildcard, or an OR pattern. An OR pattern is considered to constitute a read if all of its subpatterns constitute a read, to remain as conservative as possible in cases like `_ | subpat` or `subpat | _`. All other patterns are considered currently to constitute a read. Specifically, because `NeverToAny` is a coercion performed on a *value* and not a *place*, `Struct { .. }` on a `!` type must be a coercion currently, and we currently rely on this behavior to allow us to perform coercions like `let _: i32 = x;` where `x: !`. This is already considered UB by [miri](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=daf3a2246433fe43fdc07d1389c276c9), but also means it does not affect the preexisting UB in this case: ``` let Struct { .. } = *never_ptr; ``` Even though it's likely up for debate since we're not actually reading any data out of the struct, it almost certainly causes inference changes which I do *NOT* want to fix in this PR.
2024-10-06Auto merge of #131075 - mrkajetanp:bootstrap-editors, r=Kobzolbors-80/+193
bootstrap: Consolidate editor setup into ./x setup editor & add support for vim, emacs & helix Add support for automatically setting up the recommended LSP config for Vim (coc-nvim), Emacs (eglot) and Helix. Additionally, refactor setup.rs to make it easier to add support for more editors in the future. As suggested, r? `@jieyouxu`
2024-10-06Handle `librustdoc` cases of `rustc::potential_query_instability` lintismailarilik-112/+111
2024-10-06Auto merge of #3936 - YohDeadfall:rust-analyzer-conf, r=RalfJungbors-39/+87
Added rust-analyzer instructions for Helix That pull request adds information on how to configure Helix to use `rust-analyzer`, and moves the existing configuration to the `src/etc` directory as it's in the `rust` repository. Not adding instructions for other IDE because there's a link leading to the how-to for `rustc`.
2024-10-06tweak the hintRalf Jung-8/+3
2024-10-06bootstrap: add `std_features` configShriram Balaji-13/+48
bootstrap: add std_features to config.example fix: use BTreeSet for std-features; add unit tests * fix formatting of string in front of std_features * rename `std_features` to `std-features` in config.toml fix: remove space before std-features in config.toml fix: remove explicit .into_iter conversion bootstrap: add details for rust.std-features in config.example.toml Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com> fix: remove `Option<T>` from `rust_std_features` fix: move default rust_std_features to config fix: make std_features CI rustc incompatible
2024-10-06Enable sanitizers for loongarch64-unknown-*WANG Rui-0/+5
2024-10-06Auto merge of #130540 - veera-sivarajan:fix-87525, r=estebankbors-6/+12
Add a Lint for Pointer to Integer Transmutes in Consts Fixes #87525 This PR adds a MirLint for pointer to integer transmutes in const functions and associated consts. The implementation closely follows this comment: https://github.com/rust-lang/rust/pull/85769#issuecomment-880969112. More details about the implementation can be found in the comments. Note: This could break some sound code as mentioned by RalfJung in https://github.com/rust-lang/rust/pull/85769#issuecomment-886491680: > ... technically const-code could transmute/cast an int to a ptr and then transmute it back and that would be correct -- so the lint will deny some sound code. Does not seem terribly likely though. References: 1. https://doc.rust-lang.org/std/mem/fn.transmute.html 2. https://doc.rust-lang.org/reference/items/associated-items.html#associated-constants