summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-04-09allow the test bat files in tidyPietro Albini-0/+3
2024-04-09bump version to 1.77.2Pietro Albini-1/+1
2024-04-09Update ninja on WindowsNilstrieb-1/+1
Errors started showing up, and I read somewhere that this might be because of old ninja versions. This ninja version is indeed *ancient*. ``` multiple outputs aren't (yet?) supported by depslog; bring this up on the mailing list if it affects you ```
2024-03-26Prepare 1.77.1Mark Rousskov-1/+1
2024-03-26Fix heading anchors in doc pages.Eric Huss-0/+22
2024-03-26[stable-1.77] cargo backportWeihang Lo-0/+0
2024-03-17Switch channel to stableMark Rousskov-1/+1
2024-03-14add a test for rust-lang/rust-clippy#12181y21-0/+24
2024-03-14[`unconditional_recursion`]: compare by types instead of `DefId`sy21-39/+82
2024-03-14fix: ICE when array index exceeds usizegranddaifuku-0/+6
2024-03-14Added msrv to threadlocal initializerQuinn Sinclair-2/+18
2024-03-14Fixed FP for `thread_local_initializer_can_be_made_const` for `os_local`Quinn Sinclair-21/+71
`os_local` impl of `thread_local` — regardless of whether it is const and unlike other implementations — includes an `fn __init(): EXPR`. Existing implementation of the lint checked for the presence of said function and whether the expr can be made const. Because for `os_local` we always have an `__init()`, it triggers for const implementations. The solution is to check whether the `__init()` function is already const. If it is `const`, there is nothing to do. Otherwise, we verify that we can make it const. Co-authored-by: Alejandra González <blyxyas@gmail.com>
2024-03-04Improve wording of static_mut_refObei Sideg-6/+6
Rename `static_mut_ref` lint to `static_mut_refs`. (cherry picked from commit 408eeae59d35cbcaab2cfb345d24373954e74fc5)
2024-02-28[beta-1.77.0] backport cargoWeihang Lo-0/+0
2024-02-16Update cargoWeihang Lo-0/+0
2024-02-15Update LLVM submoduleNikita Popov-0/+0
(cherry picked from commit 7e1897cea0718043a776dba53281f69a1e97230a)
2024-02-14Require that SELECT_XCODE is set.Eric Huss-3/+1
Allowing the Xcode version to "float" based on whatever default GitHub selects creates an unreliable environment. When GitHub changes the default, we can have multiple jobs in the same run using different versions as it rolls out across machines. It can also cause oscillation between runs as different machines are used. It also causes unpredictable timing when the updates happen. This change helps ensure that the version that is used is pinned. The downside is that it requires manually bumping the version, and the risk that if we take too long, older Xcodes will be removed and that will break the build. (cherry picked from commit 4ce1f1cffc7c63928cac447afe8010e6daaa42d6)
2024-02-14Downgrade Xcode from the default (15.0) to 14.3.1.Eric Huss-3/+4
This seems to fix two sporadic errors that have been appearing in CI. One is an issue with cmake being unable to verify that cmake is able to build a simple test program. The other is a `invalid r_symbolnum` linking error when trying to build one of cranelift's tests. This is intended as a temporary fix until we can figure out how to resolve those issues. (cherry picked from commit 4fd3cf96a1db7771ef4f332b9eb1ad17fa0fd091)
2024-02-13CI: Use ninja on apple buildersEric Huss-4/+5
(cherry picked from commit 2aebe6c302088dcd75ae18f40b40f6860c505450)
2024-02-13Correct paths for hexagon-unknown-none-elf platform docBrian Cain-8/+9
Update the library paths to correctly refer to libdemo{1,2}_hexagon and switch to the release build instead. Update references to libstandalone to the specific G0/PIC archive instead. (cherry picked from commit 647a4536572ed51e15989ab82504df99aa9cc3bc)
2024-02-12Auto merge of #120821 - ehuss:fix-c-str-lit-bootstrap, r=Mark-Simulacrumbors-417/+318
[Beta 1.77] Fix bootstrapping from 1.76 Due to the timing of the revert for stabilization of c_str_literal (https://github.com/rust-lang/rust/pull/119528 which reverted in 1.76) and trait_upcasting (https://github.com/rust-lang/rust/pull/120269 which reverted in 1.76), which happened after https://github.com/rust-lang/rust/pull/119211 (Bump stage0 to 1.76 beta), this resulted in some of the feature attributes not being restored which are needed to be able to bootstrap from 1.76. This restores those features. This also includes a stage0 bump to the just released stable. This is necessary because stage0 was currently pointing at an old beta which did not contain the reverts. Fixes #120810
2024-02-08Bump to released 1.76 stableEric Huss-416/+317
2024-02-08[Beta 1.77] Fix bootstrapping from 1.76Eric Huss-1/+1
2024-02-07[beta-1.77.0] backport cargoWeihang Lo-0/+0
2024-02-03Bump channel to betaMark Rousskov-1/+1
2024-02-01Auto merge of #120447 - lnicola:sync-from-ra, r=lnicolabors-2796/+1391
Subtree update of `rust-analyzer` r? ghost
2024-01-31Rollup merge of #120501 - GuillaumeGomez:glob-reexport-attr-merge-bugfix, ↵Nadrieril-1/+19
r=notriddle rustdoc: Correctly handle attribute merge if this is a glob reexport Fixes #120487. The regression was introduced in https://github.com/rust-lang/rust/pull/113091. Only non-glob reexports should have been impacted. cc `````@Nemo157````` r? `````@notriddle`````
2024-01-31Rollup merge of #120490 - nnethercote:Diagnostic-hashing, r=estebankNadrieril-2/+15
Don't hash lints differently to non-lints. `Diagnostic::keys`, which is used for hashing and equating diagnostics, has a surprising behaviour: it ignores children, but only for lints. This was added in #88493 to fix some duplicated diagnostics, but it doesn't seem necessary any more. This commit removes the special case and only four tests have changed output, with additional errors. And those additional errors aren't exact duplicates, they're just similar. For example, in src/tools/clippy/tests/ui/same_name_method.rs we currently have this error: ``` error: method's name is the same as an existing method in a trait --> $DIR/same_name_method.rs:75:13 | LL | fn foo() {} | ^^^^^^^^^^^ | note: existing `foo` defined here --> $DIR/same_name_method.rs:79:9 | LL | impl T1 for S {} | ^^^^^^^^^^^^^^^^ ``` and with this change we also get this error: ``` error: method's name is the same as an existing method in a trait --> $DIR/same_name_method.rs:75:13 | LL | fn foo() {} | ^^^^^^^^^^^ | note: existing `foo` defined here --> $DIR/same_name_method.rs:81:9 | LL | impl T2 for S {} | ``` I think printing this second argument is reasonable, possibly even preferable to hiding it. And the other cases are similar. r? `@estebank`
2024-01-31Rollup merge of #120207 - onur-ozkan:120202-fix, r=clubby789Nadrieril-6/+8
check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test Fixes a logical bug in `profile_user_dist` test (explained in #120202).
2024-01-31Auto merge of #120358 - tmandry:bump-fuchsia-8c-tests, r=Mark-Simulacrumbors-5/+11
Bump Fuchsia, build tests, and use 8 core bots - Build Fuchsia on 8 cores instead of 16 - Skip building cranelift for Fuchsia - Bump Fuchsia (includes building tests) This includes a change to the upstream build_fuchsia_from_rust_ci script that builds a minimal set of tests, to improve coverage on this builder. This would have caught https://github.com/rust-lang/rust-clippy/issues/11952 and #119593. See prior discussion on #119400 about building on 8 cores instead of 16. This PR combines changes from that and #119399, plus clean up. r? `@Mark-Simulacrum`
2024-01-31Auto merge of #120346 - petrochenkov:ownodes, r=oli-obkbors-5/+3
hir: Refactor getters for owner nodes
2024-01-31Don't hash lints differently to non-lints.Nicholas Nethercote-2/+15
`Diagnostic::keys`, which is used for hashing and equating diagnostics, has a surprising behaviour: it ignores children, but only for lints. This was added in #88493 to fix some duplicated diagnostics, but it doesn't seem necessary any more. This commit removes the special case and only four tests have changed output, with additional errors. And those additional errors aren't exact duplicates, they're just similar. For example, in src/tools/clippy/tests/ui/same_name_method.rs we currently have this error: ``` error: method's name is the same as an existing method in a trait --> $DIR/same_name_method.rs:75:13 | LL | fn foo() {} | ^^^^^^^^^^^ | note: existing `foo` defined here --> $DIR/same_name_method.rs:79:9 | LL | impl T1 for S {} | ^^^^^^^^^^^^^^^^ ``` and with this change we also get this error: ``` error: method's name is the same as an existing method in a trait --> $DIR/same_name_method.rs:75:13 | LL | fn foo() {} | ^^^^^^^^^^^ | note: existing `foo` defined here --> $DIR/same_name_method.rs:81:9 | LL | impl T2 for S {} | ^^^^^^^^^^^^^^^^ ``` I think printing this second argument is reasonable, possibly even preferable to hiding it. And the other cases are similar.
2024-01-30rustdoc: Correctly handle attribute merge if this is a glob reexportGuillaume Gomez-1/+19
2024-01-30check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` testonur-ozkan-6/+8
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-01-30Rollup merge of #120434 - fmease:revert-speeder, r=petrochenkovGuillaume Gomez-38/+3
Revert outdated version of "Add the wasm32-wasi-preview2 target" An outdated version of #119616 was merged in rollup #120309. This reverts those changes to enable #119616 to “retain the intended diff” after a rebase. ```@rylev``` has agreed that this would be the cleanest approach with respect to the history. Unblocks #119616. r? ```@petrochenkov``` or compiler or libs
2024-01-30Rollup merge of #120342 - oli-obk:track_errors6, r=nnethercoteGuillaume Gomez-17/+1
Remove various `has_errors` or `err_count` uses follow up to https://github.com/rust-lang/rust/pull/119895 r? `@nnethercote` since you recently did something similar. There are so many more of these, but I wanted to get a PR out instead of growing the commit list indefinitely. The commits all work on their own and can be reviewed commit by commit.
2024-01-30Rollup merge of #117906 - GuillaumeGomez:improve-crate-name-hover, ↵Guillaume Gomez-4/+2
r=fmease,notriddle Improve display of crate name when hovered Currently when we hover the crate name, the background is stuck to the version and to the logo (when there is one): ![Screenshot from 2023-11-14 11-42-39](https://github.com/rust-lang/rust/assets/3050060/717190cd-483d-45a1-a462-e9ba342d4376) ![Screenshot from 2023-11-14 11-43-19](https://github.com/rust-lang/rust/assets/3050060/23f8bc9b-1304-4f91-ae1e-96bc508e9da6) I find it very unpleasant so I reduced the padding size and increased the margin (left and top) to keep the same positioning but not making it stuck anymore: ![Screenshot from 2024-01-29 20-40-11](https://github.com/rust-lang/rust/assets/3050060/82cf266c-7f99-4a46-a62b-ebe2445f52be) ![Screenshot from 2024-01-29 20-48-01](https://github.com/rust-lang/rust/assets/3050060/e7097c10-6e09-4bdc-a37f-070b6dac671d) [online docs](https://rustdoc.crud.net/imperio/improve-crate-name-hover/std/index.html) r? `@notriddle`
2024-01-30hir: Remove `hir::Map::{owner,expect_owner}`Vadim Petrochenkov-2/+2
2024-01-30hir: Add non-optional `hir_owner_nodes` for real `OwnerId`sVadim Petrochenkov-3/+1
2024-01-30hir: Simplify `hir_owner_nodes` queryVadim Petrochenkov-1/+1
The query accept arbitrary DefIds, not just owner DefIds. The return can be an `Option` because if there are no nodes, then it doesn't matter whether it's due to NonOwner or Phantom. Also rename the query to `opt_hir_owner_nodes`.
2024-01-30Rollup merge of #120488 - nnethercote:diag-lifetimes, r=oli-obkGuillaume Gomez-1/+1
Diagnostic lifetimes cleanups Some diagnostic simplifications. r? `@oli-obk`
2024-01-30Rollup merge of #120467 - rustbot:docs-update, r=ehussGuillaume Gomez-0/+0
Update books ## rust-lang/edition-guide 1 commits in bbffb074e16bef89772818b400b6c76a65eac126..baafacc6d8701269dab1e1e333f3547fb54b5a59 2024-01-18 18:44:06 UTC to 2024-01-18 18:44:06 UTC - Update c-string literal stabilization release number. (rust-lang/edition-guide#289) ## rust-embedded/book 1 commits in 3f9df2b9885c6741365da2e12ed6662cd0e827d6..2e95fc2fd31d669947e993aa07ef10dc9828bee7 2024-01-29 07:19:07 UTC to 2024-01-29 07:19:07 UTC - Mention generics in "optimizing dependencies" (rust-embedded/book#366) ## rust-lang/reference 3 commits in 8c77e8be9da1a9c70545556218d563c8d061f1fd..a0b119535e7740f68494c4f0582f7ad008b00ccd 2024-01-27 19:22:06 UTC to 2024-01-27 16:43:49 UTC - Update C-String literals to reject NUL (rust-lang/reference#1450) - pure asm blocks must terminate (rust-lang/reference#1442) - String literal expressions (rust-lang/reference#1452) ## rust-lang/rust-by-example 4 commits in ddf5cb0e6ee54ba2dd84c8ca3e1314120014e20d..179256a445d6144f5f371fdefb993f48f33978b0 2024-01-22 12:21:42 UTC to 2024-01-20 23:10:42 UTC - Updated first sentence of "parsing a string" in string.md (rust-lang/rust-by-example#1805) - Update the rustdoc example to match best practice (rust-lang/rust-by-example#1804) - Add reference to crates.io error handling crates (rust-lang/rust-by-example#1803) - fix(str.md): avoid misunderstanding that there were only two string types (rust-lang/rust-by-example#1802) ## rust-lang/rustc-dev-guide 15 commits in 4af29d1a7f64f88a36539662c6a84fe1fbe6cde1..ec287e332777627185be4798ad22599ffe7b84aa 2024-01-28 22:45:18 UTC to 2024-01-15 17:44:49 UTC - Upgrade actions to use Node.js v20 (rust-lang/rustc-dev-guide#1863) - Fix some links (rust-lang/rustc-dev-guide#1865) - Add link in salsa (rust-lang/rustc-dev-guide#1866) - Clarify what rt.rs is. (rust-lang/rustc-dev-guide#1876) - update link to rustc dependencies (rust-lang/rustc-dev-guide#1869) - Followup to #1862 (rust-lang/rustc-dev-guide#1864) - Clarify debugging graph dependency (rust-lang/rustc-dev-guide#1862) - Get diagnostics directly in `rustc-driver-getting-diagnostics` example (rust-lang/rustc-dev-guide#1857) - Update examples (rust-lang/rustc-dev-guide#1856) - Add a perf. bot command and a link to its help page (rust-lang/rustc-dev-guide#1855) - Add some explanations for frequently used rustbot commands (rust-lang/rustc-dev-guide#1849) - update some of the diagnostic translations info (rust-lang/rustc-dev-guide#1711) - Document unsafety checking (rust-lang/rustc-dev-guide#1847) - Remove outdated references to `-Z dump-mir-spanview` (rust-lang/rustc-dev-guide#1853) - update old bootstrap docs (rust-lang/rustc-dev-guide#1852)
2024-01-30Rollup merge of #120439 - seqre-contrib:moving-ui-tests, r=nnethercoteGuillaume Gomez-2/+5
Move UI issue tests to subdirectories I've moved issue tests numbered 1920, 3668, 5997, 23302, 32122, 40510, 57741, 71676, and 76077 to relevant better-named subdirectories (tracking issue #73494). The issues were chosen by having the highest number of files per issue. I adjusted the `ISSUES_ENTRY_LIMIT` because `tidy` was shouting at me.
2024-01-30Rollup merge of #120403 - seqre-contrib:pre-vendored-message, r=onur-ozkanGuillaume Gomez-1/+10
Add instructions of how to use pre-vendored 'rustc-src' This PR closes #110163. I had to move the URL to the left, making it not aligned as it is three lines above, but the tidy check would yell at me otherwise. If that's not acceptable, I'd love some suggestions on how to make it better. One question: in the original issue (https://github.com/rust-lang/rust/issues/110163#issuecomment-1502647562), it was suggested to mention how to download specific commit tarballs; however, it was said it's not documented anywhere, so I did not include that yet. If there is a want to have that, I'd gladly amend the commit.
2024-01-30Rollup merge of #120250 - chadnorvell:rustdoc-xss, r=notriddleGuillaume Gomez-1/+9
rustdoc: Prevent JS injection from localStorage It turns out that you can execute arbitrary JavaScript on the rustdocs settings page. Here's how: 1. Open `settings.html` on a rustdocs site. 2. Set "preferred light theme" to "dark" to initialize the corresponding localStorage value. 3. Plant a payload by executing this in your browser's dev console: ``Object.keys(localStorage).forEach(key=>localStorage.setItem(key,`javascript:alert()//*/javascript:javascript:"/*'/*\`/*--></noscript></title></textarea></style></template></noembed></script><html " onmouseover=/*&lt;svg/*/onload=alert()onload=alert()//><svg onload=alert()><svg onload=alert()>*/</style><script>alert()</script><style>`));`` 4. Refresh the page -- you should see an alert. This could be particularly dangerous if rustdocs are deployed on a domain hosting some other application. Malicious code could circumvent `same-origin` policies and do mischievous things with user data. This change ensures that only defined themes can actually be selected (arbitrary strings from localStorage will not be written to the document), and for good measure sanitizes the theme name.
2024-01-30Rollup merge of #120172 - onur-ozkan:add-more-tests, r=Mark-SimulacrumGuillaume Gomez-11/+63
bootstrap: add more unit tests self-explanatory
2024-01-30Remove the lifetime from `DiagnosticArgValue`.Nicholas Nethercote-1/+1
Because it's almost always static. This makes `impl IntoDiagnosticArg for DiagnosticArgValue` trivial, which is nice. There are a few diagnostics constructed in `compiler/rustc_mir_build/src/check_unsafety.rs` and `compiler/rustc_mir_transform/src/errors.rs` that now need symbols converted to `String` with `to_string` instead of `&str` with `as_str`, but that' no big deal, and worth it for the simplifications elsewhere.
2024-01-29Move multiple UI issue tests to subdirectoriesMarek 'seqre' Grzelak-2/+5
Issue tests numbered 1920, 3668, 5997, 23302, 32122, 40510, 57741, 71676, and 76077 were moved to relevant better-named subdirectories. ISSUES_ENTRY_LIMIT was adjusted to match new number of files and FIXME note was expanded.
2024-01-29Improve display of crate name when hoveredGuillaume Gomez-4/+2
2024-01-29rustdoc: Prevent JS injection from localStorageChad Norvell-1/+9