summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-07-12Auto merge of #113602 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum 1.71.0bors-43/+37
[stable] 1.71.0 release, backports This PR adds a last-minute backport of: - #112343: Prevent emitting `missing_docs` for `pub extern crate` - no beta/mainline PR -- dropping empty section from relnotes
2023-07-11Drop empty sections from release notesMark Rousskov-15/+0
2023-07-11Add regression test for #112308Guillaume Gomez-26/+31
2023-07-11Prevent emitting `missing_docs` for `pub extern crate`Guillaume Gomez-2/+6
2023-07-10Auto merge of #113541 - Mark-Simulacrum:stable-next, r=Mark-Simulacrumbors-1/+144
[stable] Prepare 1.71.0 stable release r? `@Mark-Simulacrum`
2023-07-10Prepare 1.71.0 stable releaseMark Rousskov-1/+144
2023-07-08Auto merge of #113483 - Mark-Simulacrum:beta-backport, r=Mark-Simulacrumbors-39/+217
[beta] backport This PR backports: - #113334: Revert the lexing of `c"…"` string literals - #113231: Fix `dropping_copy_types` lint from linting in match-arm with side-effects - #112794: Fix linker failures when #[global_allocator] is used in a dependency r? `@Mark-Simulacrum`
2023-07-08Downgrade addr2lineMark Rousskov-13/+20
This prevents #113238 from hitting stable while we sort out options for avoiding it. The downgrade is expected to not affect any users on stable, since it primarily affects tier 3 targets.
2023-07-08Fix linker failures when #[global_allocator] is used in a dependencybjorn3-2/+38
2023-07-08Fix dropping_copy_types lint from linting in match-arm with side-effectsUrgau-1/+39
2023-07-08Revert the lexing of c_str_literalsLeón Orell Valerian Liehr-23/+96
2023-07-08Add regression testLeón Orell Valerian Liehr-0/+24
2023-07-06Auto merge of #113417 - flip1995:clippy_beta_backport, r=Manishearthbors-51/+164
[beta] Clippy beta backport Backported PRs: - https://github.com/rust-lang/rust-clippy/pull/10813 - https://github.com/rust-lang/rust-clippy/pull/10865 - https://github.com/rust-lang/rust-clippy/pull/10873 - https://github.com/rust-lang/rust-clippy/pull/10992 Those address bugs, that were either introduced with 1.71 and that we would like to address before they get into stable or bugs that were introduced in 1.70 and that we would like to be fixed in 1.71 already. Detailed arguments for the backports of those PRs are in the PRs (mostly). r? `@Mark-Simulacrum`
2023-07-06Ignore in-proc-macros itemsblyxyas-1/+2
2023-07-06Move redundant_clone to nurseryAlex Macleod-33/+35
2023-07-06Auto merge of #10865 - Centri3:let_with_type_underscore_tracing, r=Jarchobors-10/+65
[`let_with_type_underscore`]: Don't emit on locals from procedural macros closes #10498 changelog: [`let_with_type_underscore`]: Don't emit on locals from procedural macros
2023-07-06[`default_constructed_unit_structs`]: do not lint type aliasesy21-7/+62
2023-06-24Auto merge of #113000 - Mark-Simulacrum:beta-backport, r=Mark-Simulacrumbors-48/+201
[beta] backport This PR backports: - #112684: Disable alignment checks on i686-pc-windows-msvc - #112581: [rustdoc] Fix URL encoding of % sign - #112312: Update to LLVM 16.0.5 - #112266: Fix type-inference regression in #112225 - #112062: Make struct layout not depend on unsizeable tail r? `@Mark-Simulacrum`
2023-06-24Add test case for unsizing with nicheWesley Wiser-0/+30
2023-06-24disable some layout optimizations for unsizable structsThe 8472-42/+48
2023-06-24Make struct layout not depend on unsizeable tailLukas Markeffsky-2/+31
2023-06-24Fix type-inference regression in #112225Arpad Borsos-1/+65
The type inference of argument-position closures and async blocks regressed in 1.70 as the evaluation order of async blocks changed, as they are not implicitly wrapped in an identity-function anymore. Fixes #112225 by making sure the evaluation order stays the same as it used to.
2023-06-24Update to LLVM 16.0.5Nikita Popov-1/+1
2023-06-24Fix URL encoding of % sign in Rust Doc.TumoiYorozu-2/+0
2023-06-24Update compiler/rustc_mir_transform/src/check_alignment.rsWesley Wiser-0/+1
2023-06-24Disable alignment checks on i686-pc-windows-msvcBen Kimock-0/+25
2023-06-08Auto merge of #112421 - weihanglo:update-beta-cargo, r=weihanglobors-0/+0
[beta-1.71] cargo backport 1 commits in 64fb38c97ac4d3a327fc9032c862dd28c8833b17..cfd3bbd8fe4fd92074dfad04b7eb9a923646839f 2023-05-23 18:53:23 +0000 to 2023-06-08 08:44:47 +0000 - [beta-1.70] backport rust-lang/cargo#12234 (rust-lang/cargo#12242) r? `@ghost`
2023-06-08[beta-1.71] cargo backportWeihang Lo-0/+0
2023-06-04Auto merge of #112246 - Mark-Simulacrum:beta-next, r=Mark-Simulacrumbors-421/+381
[beta] backports + stage0 bump This bumps the beta branch to use 1.70 as the bootstrap compiler, and backports: * https://github.com/rust-lang/rust/pull/112070 r? `@Mark-Simulacrum`
2023-06-03add FIXMElcnr-0/+5
2023-06-03add testslcnr-0/+78
2023-06-03unique borrows are mutating useslcnr-19/+7
2023-06-03Bump to released 1.70 stableMark Rousskov-402/+291
2023-05-29Auto merge of #112066 - Mark-Simulacrum:beta-next, r=Mark-Simulacrumbors-42/+65
[beta] 1.71.0 branch * Swap out CURRENT_RUSTC_VERSION markers * Bump CI channel * Backport https://github.com/rust-lang/rust/pull/112026 r? `@Mark-Simulacrum`
2023-05-29Exclude Rvalue::AddressOf for raw pointer deref alignment checksBen Kimock-0/+8
2023-05-29Add a test for misaligned pointer derefs inside addr_of!Ben Kimock-0/+15
2023-05-29Switch to beta channelMark Rousskov-1/+1
2023-05-29Swap out CURRENT_RUSTC_VERSION to 1.71.0Mark Rousskov-41/+41
2023-05-27Auto merge of #112025 - matthiaskrgr:rollup-j693v67, r=matthiaskrgrbors-94/+141
Rollup of 6 pull requests Successful merges: - #108630 (Fix docs for `alloc::realloc`) - #109084 (rustc driver: Remove argument 0 before at-expansion to prevent ICE) - #111181 (fix(parse): return unpected when current token is EOF) - #111656 (Use an unbounded lifetime in `String::leak`.) - #111946 (rustdoc: Add `ItemTemplate` trait and related functions to avoid repetitively wrapping existing functions) - #112018 (Clean up usage of `cx.tcx` when `tcx` is already set into a variable) r? `@ghost` `@rustbot` modify labels: rollup
2023-05-27Rollup merge of #112018 - GuillaumeGomez:cleanup-tcx, r=notriddleMatthias Krüger-43/+39
Clean up usage of `cx.tcx` when `tcx` is already set into a variable I discovered a few cases where `cx.tcx` (and equivalents) was used whereas `tcx` was already stored into a variable. In those cases, better to just use `tcx` directly. r? `@notriddle`
2023-05-27Rollup merge of #111946 - nicklimmm:askama-item-template-trait, r=GuillaumeGomezMatthias Krüger-42/+61
rustdoc: Add `ItemTemplate` trait and related functions to avoid repetitively wrapping existing functions Context: https://github.com/rust-lang/rust/pull/111430#discussion_r1200672507 This trait will be used extensively in performing migrations to Askama templates (tracking issue: https://github.com/rust-lang/rust/issues/108868)
2023-05-27Rollup merge of #111656 - finnbear:string_leak_unbounded_lifetime, r=AmanieuMatthias Krüger-2/+2
Use an unbounded lifetime in `String::leak`. Using `'a` instead of `'static` is predicted to make the process of making `String` generic over an allocator easier/less of a breaking change. See: - https://github.com/rust-lang/rust/pull/109814#issuecomment-1550164195 - https://github.com/rust-lang/rust/pull/109814#issuecomment-1550250163 ACP: https://github.com/rust-lang/libs-team/issues/109
2023-05-27Rollup merge of #111181 - bvanjoi:fix-issue-111148, r=davidtwcoMatthias Krüger-1/+13
fix(parse): return unpected when current token is EOF close https://github.com/rust-lang/rust/issues/111148 #111148 panic occurred because [FatalError.raise()](https://github.com/bvanjoi/rust/blob/master/compiler/rustc_parse/src/parser/mod.rs#LL540C3-L540C3) was encountered which caused by `Eof` and `Pound`(the last token) had same span, when parsing `#` in `fn a<<i<Y<w<>#`. <img width="825" alt="image" src="https://user-images.githubusercontent.com/30187863/236612589-9e2c6a0b-18cd-408c-b636-c12a51cbcf1c.png"> There are a few ways to solve this problem: - Change the action assign for [self.last_unexpected_token_span](https://github.com/rust-lang/rust/blob/master/compiler/rustc_parse/src/parser/diagnostics.rs#L592), for example, if current token is `Eof`, then return Error directly. - Avoid triggering the `FatalError` when the current token is `Eof`. I have chosen the second option because executing `expected_one_of_not_found` when the token is `Eof` but not in `ediable` seems reasonable.
2023-05-27Rollup merge of #109084 - dekrain:fix-panic-arg0-expansion, r=petrochenkovMatthias Krüger-5/+24
rustc driver: Remove argument 0 before at-expansion to prevent ICE Under Unix-based operating systems, when I execute rustc by setting argv0 to ``@/dev/null`,` it will expand command-line arguments from this file, leading to an empty arglist, which then triggers an ICE by trying to remove first argument. The panic message is this: ``` thread 'main' panicked at 'range start index 1 out of range for slice of length 0', compiler/rustc_driver/src/lib.rs:972:17 ``` My fix is to remove the first argument before expanding arguments. <details> <summary>Full backtrace</summary> ```sh % (exec -a `@/dev/null` `rustup which rustc`) thread 'main' panicked at 'range start index 1 out of range for slice of length 0', compiler/rustc_driver/src/lib.rs:972:17 stack backtrace: 0: 0x7fcec776659a - std::backtrace_rs::backtrace::libunwind::trace::h595f06c70adcc478 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7fcec776659a - std::backtrace_rs::backtrace::trace_unsynchronized::h177a0149c76cdde9 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7fcec776659a - std::sys_common::backtrace::_print_fmt::hc0701fd2c3530c58 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/sys_common/backtrace.rs:65:5 3: 0x7fcec776659a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd4cd115d8750fd6c at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7fcec77c839e - core::fmt::write::h93e2f5923c7eca08 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/fmt/mod.rs:1213:17 5: 0x7fcec7756be5 - std::io::Write::write_fmt::h8162dbb45f0b9e62 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/io/mod.rs:1682:15 6: 0x7fcec7766365 - std::sys_common::backtrace::_print::h1835ef8a8f9066da at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/sys_common/backtrace.rs:47:5 7: 0x7fcec7766365 - std::sys_common::backtrace::print::hcb5e6388b9235f41 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/sys_common/backtrace.rs:34:9 8: 0x7fcec776912f - std::panicking::default_hook::{{closure}}::h9c084969ccf9a722 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:267:22 9: 0x7fcec7768e6b - std::panicking::default_hook::h68fa2ba3c3c6c12f at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:286:9 10: 0x7fcecaab56e4 - <rustc_driver[f4ad927b3c57833d]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[d16e85342ea223d9]::ops::function::FnOnce<(&core[d16e85342ea223d9]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0} 11: 0x7fcec776996a - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h4e6ced11e07d8b24 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/alloc/src/boxed.rs:2002:9 12: 0x7fcec776996a - std::panicking::rust_panic_with_hook::h8d5c434518ef298c at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:692:13 13: 0x7fcec77696e9 - std::panicking::begin_panic_handler::{{closure}}::hf33414f5dabf6faf at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:579:13 14: 0x7fcec7766a4c - std::sys_common::backtrace::__rust_end_short_backtrace::hc50389427413bb75 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/sys_common/backtrace.rs:137:18 15: 0x7fcec77693f2 - rust_begin_unwind at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:575:5 16: 0x7fcec77c4d43 - core::panicking::panic_fmt::h2de7a7938f816de8 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:64:14 17: 0x7fcec77cb492 - core::slice::index::slice_start_index_len_fail_rt::h0c87d85ce11d10f6 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/slice/index.rs:53:5 18: 0x7fcec77cb416 - core::slice::index::slice_start_index_len_fail::h504609f2a6b168d1 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/slice/index.rs:41:9 19: 0x7fceca0eca1f - rustc_driver[f4ad927b3c57833d]::handle_options 20: 0x7fceca0e037f - <rustc_driver[f4ad927b3c57833d]::RunCompiler>::run 21: 0x7fceca0dfd0d - <core[d16e85342ea223d9]::panic::unwind_safe::AssertUnwindSafe<rustc_driver[f4ad927b3c57833d]::main::{closure#0}> as core[d16e85342ea223d9]::ops::function::FnOnce<()>>::call_once 22: 0x7fceca17ce89 - rustc_driver[f4ad927b3c57833d]::main 23: 0x564f5f008a87 - rustc_main[f164605d1302e295]::main 24: 0x564f5f008973 - std[3da461b304582a2c]::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()> 25: 0x564f5f008969 - <std[3da461b304582a2c]::rt::lang_start<()>::{closure#0} as core[d16e85342ea223d9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 26: 0x7fcec774795c - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h699977d052768608 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/ops/function.rs:287:13 27: 0x7fcec774795c - std::panicking::try::do_call::h4e121e623c70f903 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:483:40 28: 0x7fcec774795c - std::panicking::try::hf9d919e062bc178a at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:447:19 29: 0x7fcec774795c - std::panic::catch_unwind::h7a7b12272684cb97 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panic.rs:140:14 30: 0x7fcec774795c - std::rt::lang_start_internal::{{closure}}::hd96b0eb4844b8762 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/rt.rs:148:48 31: 0x7fcec774795c - std::panicking::try::do_call::h1af1f88f4f92a22c at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:483:40 32: 0x7fcec774795c - std::panicking::try::hf20d7abea7f0f097 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:447:19 33: 0x7fcec774795c - std::panic::catch_unwind::hb0e084c3a9c042e4 at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panic.rs:140:14 34: 0x7fcec774795c - std::rt::lang_start_internal::hca9d5c7277f5b67c at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/rt.rs:148:20 35: 0x564f5f008ab7 - main 36: 0x7fcec74a1790 - <unknown> 37: 0x7fcec74a184a - __libc_start_main 38: 0x564f5f00899e - <unknown> 39: 0x0 - <unknown> error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md note: rustc 1.68.0 (2c8cc3432 2023-03-06) running on x86_64-unknown-linux-gnu query stack during panic: end of query stack ``` </details> I also checked if I can trigger a similar problem by passing empty argument list to `execve`, but at least under Linux, it seems to always insert an empty first argument if there are none.
2023-05-27Rollup merge of #108630 - overlookmotel:realloc-docs-fix, r=AmanieuMatthias Krüger-1/+2
Fix docs for `alloc::realloc` Fixes #108546. Corrects the docs for `alloc::realloc` to bring the safety constraints into line with `Layout::from_size_align_unchecked`'s constraints.
2023-05-27Auto merge of #111006 - Mark-Simulacrum:relnotes, r=Mark-Simulacrumbors-0/+136
1.70.0 release notes r? `@cuviper` `@rust-lang/release`
2023-05-271.70.0 release notesMark Rousskov-0/+136
2023-05-27Fix ICE caused by at-expanding argument 0 instead of removing it earlydekrain-5/+24
2023-05-27Auto merge of #110975 - Amanieu:panic_count, r=joshtriplettbors-86/+149
Rework handling of recursive panics This PR makes 2 changes to how recursive panics works (a panic while handling a panic). 1. The panic count is no longer used to determine whether to force an immediate abort. This allows code like the following to work without aborting the process immediately: ```rust struct Double; impl Drop for Double { fn drop(&mut self) { // 2 panics are active at once, but this is fine since it is caught. std::panic::catch_unwind(|| panic!("twice")); } } let _d = Double; panic!("once"); ``` Rustc already generates appropriate code so that any exceptions escaping out of a `Drop` called in the unwind path will immediately abort the process. 2. Any panics while the panic hook is executing will force an immediate abort. This is necessary to avoid potential deadlocks like #110771 where a panic happens while holding the backtrace lock. We don't even try to print the panic message in this case since the panic may have been caused by `Display` impls. Fixes #110771
2023-05-27Add support for nested panics to miriAmanieu d'Antras-32/+53