about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-11-13Try Mode::ToolRustcLaurențiu Nicola-6/+6
2023-11-10Allow rustc_private for RustAnalyzerLaurențiu Nicola-2/+1
2023-11-10Drop anymap license exceptionLaurențiu Nicola-1/+0
2023-11-08Merge commit '3b7c7f97e4a7bb253a8d398ee4f8346f6cf2817b' into sync-from-raLaurențiu Nicola-2056/+14887
2023-11-08Auto merge of #117484 - Zalathar:tests, r=cjgillotbors-2385/+435
coverage: Unify `tests/coverage-map` and `tests/run-coverage` into `tests/coverage` Ever since the introduction of the `coverage-map` suite, it's been awkward to have to manage two separate coverage test directories containing dozens of mostly-identical files. However, those two suites were separate for good reasons. They have very different requirements (since only one of them requires actually running the test program), running only one suite is noticeably faster than running both, and having separate suites allows them to be blessed separately if desired. So while unifying them was an obvious idea, actually doing so was non-trivial. --- Nevertheless, this PR finds a way to merge the two suites into one directory while retaining almost all of the developer-experience benefits of having two suites. This required non-trivial implementations of `Step`, but the end result works very smoothly. --- The first 5 commits are a copy of #117340, which has been closed in favour of this PR.
2023-11-08Auto merge of #117692 - matthiaskrgr:rollup-umaf5pr, r=matthiaskrgrbors-252/+334
Rollup of 4 pull requests Successful merges: - #113925 (Improve diagnostic for const ctors in array repeat expressions) - #116399 (Small changes w/ `query::Erase<_>`) - #117625 (Fix some clippy perf lints) - #117655 (Method suggestion code tweaks) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-08Rollup merge of #117655 - compiler-errors:method-tweaks, r=estebankMatthias Krüger-198/+178
Method suggestion code tweaks I was rummaging around the method suggestion code after https://github.com/rust-lang/rust/pull/117006#discussion_r1384153722 and saw a few things to simplify. This is two unrelated commits, both in the same file. Review them separately, if you'd like. r? estebank
2023-11-08Rollup merge of #117625 - nnethercote:clippy-perf, r=cuviperMatthias Krüger-20/+14
Fix some clippy perf lints `@matthiaskrgr` gave me the output of a clippy run with perf lints enabled. This PR fixes ones that I thought were worth fixing. r? `@cuviper`
2023-11-08Rollup merge of #116399 - WaffleLapkin:erase_small_things, r=cjgillotMatthias Krüger-6/+16
Small changes w/ `query::Erase<_>` r? `@cjgillot` cc `@Zoxc`
2023-11-08Rollup merge of #113925 - clubby789:const-ctor-repeat, r=estebankMatthias Krüger-28/+126
Improve diagnostic for const ctors in array repeat expressions Fixes #113912
2023-11-08rustdoc: minor changes suggested by clippy perf lints.Nicholas Nethercote-12/+10
2023-11-07Auto merge of #15849 - HKalbasi:fix-sync, r=HKalbasibors-11/+31
Update rustc dependencies Except `rustc_parse_format` that was broken by upstream.
2023-11-07Auto merge of #117672 - lqd:ci-gcc-lld, r=Kobzolbors-1/+7
ci: bump gcc on dist x64 linux builder to 9.5 Support for `-fuse-ld=lld` was added in GCC 9, so this PR bumps gcc to the latest 9.x release, to prepare for switching to LLD. `-Clinker-flavor=gnu-lld-cc -Clink-self-contained=+linker` will require our CI's GCC to understand `-fuse-ld=lld` when bootstrapping in a future where `x86_64-unknown-linux-gnu` is using `rust-lld` by default.
2023-11-08rustc: minor changes suggested by clippy perf lints.Nicholas Nethercote-8/+4
2023-11-08update rustc dependencieshkalbasi-11/+31
2023-11-07Add an explanation for `transmute_unchecked`Maybe Waffle-0/+9
2023-11-07Auto merge of #117680 - matthiaskrgr:rollup-kgaa4ma, r=matthiaskrgrbors-39/+127
Rollup of 4 pull requests Successful merges: - #115485 (Format macro const literals with pretty printer) - #117616 (warn when using an unstable feature with -Ctarget-feature) - #117639 (Update books) - #117675 (llvm-wrapper: Remove include of non-existant Vectorize.h) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-07Rollup merge of #117675 - zmodem:vectorize_h, r=durin42Matthias Krüger-1/+0
llvm-wrapper: Remove include of non-existant Vectorize.h LLVM recently removed the header: https://github.com/llvm/llvm-project/commit/2400c54c37d5afdfec016b9a71f161ac10a49b31 It only contained a declaration of `createLoadStoreVectorizerPass()`, which Rust doesn't reference.
2023-11-07Rollup merge of #117639 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/reference 4 commits in 16fd3c06d9e558dae2d52000818274ae70c9e90a..cd8193e972f61b92117095fc73b67af767b4d6bc 2023-11-04 17:19:39 UTC to 2023-10-30 16:04:52 UTC - Guarantee that raw pointer conversions preserve slice element count (rust-lang/reference#1417) - some asm block flags also mean there can be no fences (rust-lang/reference#1413) - Guarantee `char` layout (rust-lang/reference#1401) - Doc: Add the RISC-V stabilized target features (rust-lang/reference#1415) ## rust-lang/rust-by-example 3 commits in 6709beeb7d0fbc5ffc91ac4893a24434123b9bfa..311b84962016b28c75525c86e7b3f49fd9101a39 2023-10-31 18:32:09 UTC to 2023-10-31 18:30:39 UTC - Fixed explanation mistake in comment (rust-lang/rust-by-example#1761) - Fix typos (rust-lang/rust-by-example#1759) - docs(9.2): fix typo (rust-lang/rust-by-example#1754) ## rust-lang/rustc-dev-guide 6 commits in b0ee9ec8fa59a6c7620165e061f4747202377a62..77dbe5782b2488af3bb489ad702eaff438f465bf 2023-11-06 16:14:34 UTC to 2023-10-29 17:16:02 UTC - add a new type system invariant (rust-lang/rustc-dev-guide#1822) - Update some outdated descriptions of coverage instrumentation (rust-lang/rustc-dev-guide#1809) - Add some documentation for unsizing (rust-lang/rustc-dev-guide#1817) - Bibliography: fixing author of "You Can't Spell Trust Without Rust" (rust-lang/rustc-dev-guide#1815) - remove change-id from sample build configuration (rust-lang/rustc-dev-guide#1813) - Update name of "active" features to "unstable" (rust-lang/rustc-dev-guide#1814)
2023-11-07Rollup merge of #117616 - RalfJung:unstable-target-features, r=compiler-errorsMatthias Krüger-23/+70
warn when using an unstable feature with -Ctarget-feature Setting or unsetting the wrong target features can cause ABI incompatibility (https://github.com/rust-lang/rust/issues/116344, https://github.com/rust-lang/rust/issues/116558). We need to carefully audit features for their ABI impact before stabilization. I just learned that we currently accept arbitrary unstable features on stable and if they are in the list of Rust target features, even unstable, then we don't even warn about that!1 That doesn't seem great, so I propose we introduce a warning here. This has an obvious loophole via `-Ctarget-cpu`. I'm not sure how to best deal with that, but it seems better to fix what we can and think about the other cases later, maybe once we have a better idea for how to resolve the general mess that are ABI-affecting target features.
2023-11-07Rollup merge of #115485 - DaniPopes:rustdoc-macro-consts, r=jackh726,fmeaseMatthias Krüger-15/+57
Format macro const literals with pretty printer Fixes #115295
2023-11-07add note to remember to update a url when bumping to gcc 10.1.0Rémy Rakic-0/+6
2023-11-07Auto merge of #117617 - Urgau:bump-libc-0.2.150, r=Mark-Simulacrumbors-3/+3
Bump libc dependency This bumps the `libc` crate to version 0.2.150 which includes https://github.com/rust-lang/libc/pull/3410 which will help remove the old and deprecated check-cfg syntax. Extracted from https://github.com/rust-lang/rust/pull/117612
2023-11-07manually bless a wasm-only testRalf Jung-0/+6
2023-11-07llvm-wrapper: Remove include of non-existant Vectorize.hHans Wennborg-1/+0
2023-11-07Auto merge of #115904 - notriddle:notriddle/preload-bold, r=GuillaumeGomezbors-1/+0
rustdoc: stop preloading Source Serif 4 Bold According to #91170, italic fonts are not preloaded because they're rarely used, but bold fonts are. This seems to be true of bold Source Code Pro and bold Fira Sans, but bold and italic Source Serif Pro seem to be equally heavily used. This is, I assume, the result of using Fira Sans Bold and Source Code Bold headings, so you only get bold Serif text when the doc author uses strong `**` emphasis (or within certain kinds of tooltip, which shouldn't be preloaded because they only show up long after the page is loaded). To check this, run these two commands in the browser console to measure how much they're used. The measurement is extremely rough, but it gets the idea across: the two styles are about equally popular. // count bold elements Array.prototype.slice.call(document.querySelectorAll("*")).filter(x => { const y = document.defaultView.getComputedStyle(x); return y.fontFamily.indexOf("Source Serif 4") !== -1 && y.fontWeight > 400 }).length // count italic elements Array.prototype.slice.call(document.querySelectorAll("*")).filter(x => { const y = document.defaultView.getComputedStyle(x); return y.fontFamily.indexOf("Source Serif 4") !== -1 && y.fontStyle == "italic" }).length | URL | Bold | Italic | |--------------|-----:|-------:| | [std] | 2 | 9 | | [Vec] | 8 | 89 | | [regex] | 33 | 17 | | [test_suite] | 0 | 0 | [std]: https://doc.rust-lang.org/nightly/std/index.html [Vec]: https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html [regex]: https://docs.rs/regex/1.9.5/regex/index.html [test_suite]: https://docs.rs/test-suite/3.2.9/test_suite/
2023-11-07ci: bump gcc on dist x64 linux builder to 9.5Rémy Rakic-1/+1
Support for `-fuse-ld=lld` was added in GCC 9
2023-11-07Auto merge of #117297 - clubby789:fn-trait-missing-paren, r=TaKO8Kibors-0/+73
Give a better diagnostic for missing parens in Fn* bounds Fixes #108109 It would be nice to try and recover here, but I'm not sure it's worth the effort, especially as the bounds on the recovered function would be incorrect.
2023-11-07Auto merge of #117229 - matthewjasper:thir-unsafeck-fixes, r=cjgillotbors-85/+489
Thir unsafeck fixes - Recognise thread local statics in THIR unsafeck - Add suggestion for unsafe_op_in_unsafe_fn - Fix unsafe checking of let expressions
2023-11-07Auto merge of #117610 - compiler-errors:object-hmm, r=aliemjaybors-14/+64
Only instantiate binder during dyn's built-in trait candidate probe once See UI test for demonstration of the issue. This was "caused" by #117131, but only because we're using the `normalize_param_env` (which has been augmented with a projection clause used to normalize GATs) which features non-lifetime bound vars in it. Fixes #117602 technically, though that's also fixed by #117542. r? types
2023-11-07Auto merge of #15843 - roife:master, r=lnicolabors-1/+1
minor: correct a typo in a comment in base-db/lib.rs
2023-11-07fix: correct a typo in a comment in base-db/lib.rsroife-1/+1
2023-11-07Auto merge of #117418 - compiler-errors:better_error_body, r=oli-obkbors-29/+59
Build a better MIR body when errors are encountered Doesn't really have much of an effect on its own, but it does lead to a less confusing phony MIR body being generated when an error is detected during THIR/MIR/match building. This was quite confusing when I hacked `-Zunpretty=mir` to emit `mir_built` rather than `instance_mir`. This coincidentually also fixes #117413, but not as generally as #117416. cc `@Nadrieril`
2023-11-07Rework print_disambiguation_helpMichael Goulet-113/+93
2023-11-07Yeet MethodCallComponentsMichael Goulet-90/+90
2023-11-07Auto merge of #117006 - estebank:issue-69512, r=compiler-errorsbors-0/+138
When not finding assoc fn on type, look for builder fn When we have a resolution error when looking at a fully qualified path on a type, look for all associated functions on inherent impls that return `Self` and mention them to the user. ``` error[E0599]: no function or associated item named `new` found for struct `TcpStream` in the current scope --> tests/ui/resolve/fn-new-doesnt-exist.rs:4:28 | 4 | let stream = TcpStream::new(); | ^^^ function or associated item not found in `TcpStream` | note: if you're trying to build a new `TcpStream` consider using one of the following associated functions: TcpStream::connect TcpStream::connect_timeout --> /home/gh-estebank/rust/library/std/src/net/tcp.rs:156:5 | 156 | pub fn connect<A: ToSocketAddrs>(addr: A) -> io::Result<TcpStream> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 172 | pub fn connect_timeout(addr: &SocketAddr, timeout: Duration) -> io::Result<TcpStream> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` Fix #69512.
2023-11-07When not finding assoc fn on type, look for builder fnEsteban Küber-0/+138
When we have a resolution error when looking at a fully qualified path on a type, look for all associated functions on inherent impls that return `Self` and mention them to the user. Fix #69512.
2023-11-07coverage: Register `test::Coverage` as the test suite for `tests/coverage`Zalathar-8/+12
This restores the ability to run a coverage test by specifying its path, e.g. `./x.py test tests/coverage/if.rs`. This runs the test in both modes.
2023-11-07coverage: Migrate `tests/coverage-map` into `tests/coverage`Zalathar-2764/+5
2023-11-07coverage: Migrate `tests/run-coverage` into `tests/coverage`Zalathar-9/+7
2023-11-07coverage: Set up a macro for declaring unified coverage test suitesZalathar-0/+53
2023-11-07coverage: Add `./x.py test coverage`, an alias for `coverage-map` and ↵Zalathar-0/+51
`run-coverage`
2023-11-07coverage: Give each coverage test mode a separate output directoryZalathar-2/+12
When multiple test modes share the same test directory, this will allow them to avoid interfering with each others' files and timestamps.
2023-11-07coverage: Copy all remaining run-coverage tests into coverage-mapZalathar-1/+392
These multi-file tests were not copied over in #114843 because they weren't working, but it turns out that they just need the correct crate-type.
2023-11-07coverage: Copy all remaining coverage-map tests into run-coverageZalathar-0/+308
2023-11-07coverage: Flatten `coverage-map/status-quo/` into its parent directoryZalathar-1/+1
2023-11-07coverage: Remove `tests/coverage-map/if.rs`Zalathar-24/+0
There is another test named `if.rs` in `tests/coverage-map/status-quo/`, so this test stands in the way of flattening that directory into its parent. Fortunately both tests are more-or-less equivalent, so removing this one is fine.
2023-11-07coverage: Use `-Copt-level=2` by default in run-coverage testsZalathar-16/+34
This is a step towards being able to unify the two coverage test directories. There are two tests that require adjustment: - `overflow.rs` requires an explicit `-Coverflow-checks=yes` - `sort_groups.rs` is sensitive to provably unused instantiations
2023-11-07Auto merge of #117511 - gurry:117406-err-packed-structs, r=compiler-errorsbors-1/+290
Emit explanatory note for move errors in packed struct derives Derive expansions for packed structs with non-`Copy` fields cause move errors because they prefer copying over borrowing since borrowing the fields of a packed struct can result in unaligned access. This underlying cause of the errors, however, is not apparent to the user. This PR adds a diagnostic note to make it clear to the user (the new note is on the second last line): ``` tests/ui/derives/deriving-with-repr-packed-move-errors.rs:13:16 | 12 | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)] | ----- in this derive macro expansion 13 | struct StructA(String); | ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait | = note: `#[derive(Debug)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) ``` Fixes #117406 Partially addresses #110777
2023-11-06Build a better MIR body when errors are encounteredMichael Goulet-29/+59