Commit graph

224992 commits

Author SHA1 Message Date
Pietro Albini
4ea77cf902
update release notes for 1.72.1 2023-07-31 12:44:27 +02:00
jyn
8f395dfeb7
Revert "Fix x test lint-docs when download-rustc is enabled"
This was not the correct fix. The problem was two-fold:
- `download-rustc` didn't respect `llvm.assertions`
- `rust-dev` was missing a bump to `download-ci-llvm-stamp`

The first is fixed in this PR and the latter was fixed a while ago. Revert this change to avoid breaking `rpath = false`.
2023-07-31 12:44:25 +02:00
Deadbeef
dc78a89f53
do not use stringly typed diagnostics 2023-07-31 12:44:24 +02:00
Deadbeef
e274006ce5
suspicious_double_ref_op: don't lint on .borrow() 2023-07-31 12:44:23 +02:00
Michael Goulet
382ae1917e
Don't use can_eq in derive suggestion for missing method 2023-07-31 12:44:22 +02:00
ekusiadadus
06c8b43559
Revert "fix: 🐛 etc/bash_complettion -> src/etc/... to avoid copy error"
This reverts commit 08ce68b6a6.
2023-07-31 12:44:20 +02:00
Camille GILLOT
efcd08eb35
Substitute types before checking compatibility. 2023-07-31 12:44:19 +02:00
bors
8ede3aae28 Auto merge of #113602 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[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-12 03:31:10 +00:00
Mark Rousskov
20f5748a95 Drop empty sections from release notes 2023-07-11 21:47:22 -04:00
Guillaume Gomez
d412f06eff Add regression test for #112308 2023-07-11 21:45:29 -04:00
Guillaume Gomez
288476298b Prevent emitting missing_docs for pub extern crate 2023-07-11 21:45:29 -04:00
bors
7bb61853ad Auto merge of #113541 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] Prepare 1.71.0 stable release

r? `@Mark-Simulacrum`
2023-07-10 15:07:21 +00:00
Mark Rousskov
9df351b1c1 Prepare 1.71.0 stable release 2023-07-10 10:45:24 -04:00
bors
01b5c40dc1 Auto merge of #113483 - Mark-Simulacrum:beta-backport, r=Mark-Simulacrum
[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-08 23:20:14 +00:00
Mark Rousskov
df2ddb75bf Downgrade addr2line
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-08 10:58:48 -04:00
bjorn3
b1fcea06f4 Fix linker failures when #[global_allocator] is used in a dependency 2023-07-08 09:43:19 -04:00
Urgau
971831da24 Fix dropping_copy_types lint from linting in match-arm with side-effects 2023-07-08 09:42:55 -04:00
León Orell Valerian Liehr
dedc4550ba Revert the lexing of c_str_literals 2023-07-08 09:32:30 -04:00
León Orell Valerian Liehr
892a91f531 Add regression test 2023-07-08 09:32:24 -04:00
bors
f06c1b82f2 Auto merge of #113417 - flip1995:clippy_beta_backport, r=Manishearth
[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-06 21:48:13 +00:00
blyxyas
8cde275446
Ignore in-proc-macros items 2023-07-06 19:43:58 +02:00
Alex Macleod
cbadffc158
Move redundant_clone to nursery 2023-07-06 19:42:56 +02:00
bors
f25839a64d
Auto merge of #10865 - Centri3:let_with_type_underscore_tracing, r=Jarcho
[`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 19:40:54 +02:00
y21
490cd94817
[default_constructed_unit_structs]: do not lint type aliases 2023-07-06 19:37:59 +02:00
bors
dbf31f17d0 Auto merge of #113000 - Mark-Simulacrum:beta-backport, r=Mark-Simulacrum
[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-24 17:24:00 +00:00
Wesley Wiser
f8052fca83 Add test case for unsizing with niche 2023-06-24 10:18:47 -04:00
The 8472
f667eebd94 disable some layout optimizations for unsizable structs 2023-06-24 10:18:47 -04:00
Lukas Markeffsky
4f237bf5ae Make struct layout not depend on unsizeable tail 2023-06-24 10:18:47 -04:00
Arpad Borsos
d1aad9ea76 Fix type-inference regression in #112225
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-24 10:18:37 -04:00
Nikita Popov
ec910f4194 Update to LLVM 16.0.5 2023-06-24 10:18:30 -04:00
TumoiYorozu
613630d02f Fix URL encoding of % sign in Rust Doc. 2023-06-24 10:18:17 -04:00
Wesley Wiser
c516249c84 Update compiler/rustc_mir_transform/src/check_alignment.rs 2023-06-24 10:17:57 -04:00
Ben Kimock
8881d01b3f Disable alignment checks on i686-pc-windows-msvc 2023-06-24 10:17:57 -04:00
bors
78a6ac0a86 Auto merge of #112421 - weihanglo:update-beta-cargo, r=weihanglo
[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 16:33:53 +00:00
Weihang Lo
27a6bdd8a0
[beta-1.71] cargo backport 2023-06-08 12:06:30 +01:00
bors
4e8c9e8e37 Auto merge of #112246 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[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-04 06:52:23 +00:00
lcnr
8bc8defeee add FIXME 2023-06-03 12:17:58 -04:00
lcnr
6aba7e8c43 add tests 2023-06-03 12:17:53 -04:00
lcnr
29b922d523 unique borrows are mutating uses 2023-06-03 12:17:46 -04:00
Mark Rousskov
769f6cc24c Bump to released 1.70 stable 2023-06-03 12:17:13 -04:00
bors
eff24c06d8 Auto merge of #112066 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[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-29 19:57:03 +00:00
Ben Kimock
f4e937955c Exclude Rvalue::AddressOf for raw pointer deref alignment checks 2023-05-29 10:35:23 -04:00
Ben Kimock
3af6f2eeef Add a test for misaligned pointer derefs inside addr_of! 2023-05-29 10:35:23 -04:00
Mark Rousskov
fe18edca5e Switch to beta channel 2023-05-29 10:34:01 -04:00
Mark Rousskov
d302f61b8a Swap out CURRENT_RUSTC_VERSION to 1.71.0 2023-05-29 10:33:37 -04:00
bors
cca7ee5811 Auto merge of #112025 - matthiaskrgr:rollup-j693v67, r=matthiaskrgr
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-27 20:27:23 +00:00
Matthias Krüger
9f5dce7d75
Rollup merge of #112018 - GuillaumeGomez:cleanup-tcx, r=notriddle
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-27 20:40:29 +02:00
Matthias Krüger
9a4fce978d
Rollup merge of #111946 - nicklimmm:askama-item-template-trait, r=GuillaumeGomez
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-27 20:40:29 +02:00
Matthias Krüger
5a4c04cc2c
Rollup merge of #111656 - finnbear:string_leak_unbounded_lifetime, r=Amanieu
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-27 20:40:29 +02:00
Matthias Krüger
97fae38bf9
Rollup merge of #111181 - bvanjoi:fix-issue-111148, r=davidtwco
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-27 20:40:28 +02:00