]> git.lizzy.rs Git - rust.git/log
rust.git
17 months agoRollup merge of #106733 - DebugSteven:revert-104552-warn-newer-x, r=jyn514
Matthias Krüger [Thu, 12 Jan 2023 05:52:39 +0000 (06:52 +0100)]
Rollup merge of #106733 - DebugSteven:revert-104552-warn-newer-x, r=jyn514

Revert "warn newer available version of the x tool"

Reverts rust-lang/rust#104552

Running the x executable directly created an [issue](https://github.com/rust-lang/rust/issues/106469) here. There are other options for warning a user that a newer version of x exists in the issue's discussion as well.

r? `@jyn514`

17 months agoRollup merge of #106732 - durin42:dmitrig-arrayref-ctor, r=nikic
Matthias Krüger [Thu, 12 Jan 2023 05:52:38 +0000 (06:52 +0100)]
Rollup merge of #106732 - durin42:dmitrig-arrayref-ctor, r=nikic

rustc_llvm: replace llvm::makeArrayRef with ArrayRef constructors.

LLVM upstream has deprecated llvm::makeArrayRef and will remove it.

17 months agoRollup merge of #106702 - estebank:trait-bounds, r=compiler-errors
Matthias Krüger [Thu, 12 Jan 2023 05:52:38 +0000 (06:52 +0100)]
Rollup merge of #106702 - estebank:trait-bounds, r=compiler-errors

Conserve cause of `ImplDerivedObligation` in E0599

CC #86377.

17 months agoRollup merge of #106676 - oli-obk:tait_test, r=dtolnay
Matthias Krüger [Thu, 12 Jan 2023 05:52:37 +0000 (06:52 +0100)]
Rollup merge of #106676 - oli-obk:tait_test, r=dtolnay

Test that we cannot use trait impl methods arguments as defining uses

Addresses https://github.com/rust-lang/rust/issues/63063#issuecomment-1360053614

r? `@dtolnay`

17 months agoRollup merge of #106638 - RalfJung:realstd, r=thomcc
Matthias Krüger [Thu, 12 Jan 2023 05:52:37 +0000 (06:52 +0100)]
Rollup merge of #106638 - RalfJung:realstd, r=thomcc

std tests: use __OsLocalKeyInner from realstd

This is basically the same as https://github.com/rust-lang/rust/pull/100201, but for __OsLocalKeyInner:

Some std tests are failing in Miri on Windows because [this static](https://github.com/rust-lang/rust/blob/a377893da2cd7124e5a18c7116cbb70e16dd5541/library/std/src/sys/windows/thread_local_key.rs#L234-L239) is getting duplicated, and Miri does not handle that properly -- Miri does not support this magic `.CRT$XLB` linker section, but instead just looks up this particular hard-coded static in the standard library. This PR lets the test suite use the std static instead of having its own copy.

Fixes https://github.com/rust-lang/miri/issues/2754
r? `@thomcc`

17 months agoRollup merge of #106596 - estebank:verbose-e0271, r=compiler-errors
Matthias Krüger [Thu, 12 Jan 2023 05:52:36 +0000 (06:52 +0100)]
Rollup merge of #106596 - estebank:verbose-e0271, r=compiler-errors

Hide more of long types in E0271

Fix #40186.

17 months agoRollup merge of #106532 - compiler-errors:dyn-star-to-dyn, r=jackh726
Matthias Krüger [Thu, 12 Jan 2023 05:52:35 +0000 (06:52 +0100)]
Rollup merge of #106532 - compiler-errors:dyn-star-to-dyn, r=jackh726

Allow codegen to unsize `dyn*` to `dyn`

`dyn* Trait` is just another type that implements `Trait`, so we should be able to unsize `&dyn* Trait` into `&dyn Trait` perfectly fine, same for `Box` and other unsizeable types.

Fixes #106488

17 months agoRollup merge of #106309 - compiler-errors:prefer-non-err-candidates, r=oli-obk
Matthias Krüger [Thu, 12 Jan 2023 05:52:34 +0000 (06:52 +0100)]
Rollup merge of #106309 - compiler-errors:prefer-non-err-candidates, r=oli-obk

Prefer non-`[type error]` candidates during selection

Fixes #102130
Fixes #106351

r? types

note: Alternatively we could filter out error where-clauses during param-env construction? But we still need to filter out impls with errors during `match_impl`, I think.

17 months agoRollup merge of #106167 - yanchen4791:issue-105544-fix, r=oli-obk
Matthias Krüger [Thu, 12 Jan 2023 05:52:34 +0000 (06:52 +0100)]
Rollup merge of #106167 - yanchen4791:issue-105544-fix, r=oli-obk

Fix invalid syntax and incomplete suggestion in impl Trait parameter type suggestions for E0311

Fixes #105544

The problems: The suggestion given for E0311 has invalid syntax when the synthetic type parameter is used for Trait type in function declaration:
```rust
fn foo(d: impl Sized) -> impl Sized
```
instead of explicitly specified like the following:
```rust
fn foo<T: Sized>(d: T) -> impl Sized
```
In addition to the syntax error, the suggestions given for E0311 are not complete when multiple elided lifetimes are involved in lifetime bounds, not all involved parameters are given the named lifetime in the suggestions. For the following test case:
```
fn foo(d: impl Sized, p: &mut ()) -> impl Sized + '_ {
    (d, p)
}
```
a good suggestion should add the lifetime 'a to both d and p, instead of d only:
```
fn foo<'a>(d: impl Sized + 'a, p: &'a mut ()) -> impl Sized + '_ {
    (d, p)
}
```

The Solution: Fix the syntax problem in the suggestions when synthetic type parameter is used, and also add lifetimes for all involved parameters.

17 months agoAuto merge of #106537 - fmease:recover-where-clause-before-tuple-struct-body, r=estebank
bors [Thu, 12 Jan 2023 02:16:16 +0000 (02:16 +0000)]
Auto merge of #106537 - fmease:recover-where-clause-before-tuple-struct-body, r=estebank

Recover from where clauses placed before tuple struct bodies

Open to any suggestions regarding the phrasing of the diagnostic.

Fixes #100790.
`@rustbot` label A-diagnostics
r? diagnostics

17 months agoAuto merge of #106743 - matthiaskrgr:rollup-q5dpxms, r=matthiaskrgr
bors [Wed, 11 Jan 2023 23:05:58 +0000 (23:05 +0000)]
Auto merge of #106743 - matthiaskrgr:rollup-q5dpxms, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #106620 (Detect struct literal needing parentheses)
 - #106622 (Detect out of bounds range pattern value)
 - #106703 (Note predicate span on `ImplDerivedObligation`)
 - #106705 (Report fulfillment errors in new trait solver)
 - #106726 (Fix some typos in code comments.)
 - #106734 (Deny having src/test exisiting in tidy)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

17 months agoFix invalid syntax in impl Trait parameter type suggestions for E0311
yanchen4791 [Mon, 26 Dec 2022 23:43:31 +0000 (15:43 -0800)]
Fix invalid syntax in impl Trait parameter type suggestions for E0311

17 months agoTest that we cannot use trait impl methods arguments as defining uses
Oli Scherer [Tue, 10 Jan 2023 11:23:58 +0000 (11:23 +0000)]
Test that we cannot use trait impl methods arguments as defining uses

17 months agoHide more of long types in E0271
Esteban Küber [Sun, 8 Jan 2023 18:41:09 +0000 (18:41 +0000)]
Hide more of long types in E0271

Fix #40186.

17 months agoRollup merge of #106734 - albertlarsan68:deny-src-tests-in-tidy, r=Nilstrieb
Matthias Krüger [Wed, 11 Jan 2023 20:08:10 +0000 (21:08 +0100)]
Rollup merge of #106734 - albertlarsan68:deny-src-tests-in-tidy, r=Nilstrieb

Deny having src/test exisiting in tidy

Fixes #106724

17 months agoRollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
Matthias Krüger [Wed, 11 Jan 2023 20:08:09 +0000 (21:08 +0100)]
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb

Fix some typos in code comments.

17 months agoRollup merge of #106705 - compiler-errors:new-solver-err-properly, r=lcnr
Matthias Krüger [Wed, 11 Jan 2023 20:08:09 +0000 (21:08 +0100)]
Rollup merge of #106705 - compiler-errors:new-solver-err-properly, r=lcnr

Report fulfillment errors in new trait solver

Causes fewer ICEs when testing the new solver :smile:

17 months agoRollup merge of #106703 - compiler-errors:impl-derived-span, r=estebank
Matthias Krüger [Wed, 11 Jan 2023 20:08:08 +0000 (21:08 +0100)]
Rollup merge of #106703 - compiler-errors:impl-derived-span, r=estebank

Note predicate span on `ImplDerivedObligation`

Seems obvious to point out the where-clause that introduces the `ImplDerivedObligation` :)

r? `@estebank`

17 months agoRollup merge of #106622 - estebank:issue-68972, r=davidtwco
Matthias Krüger [Wed, 11 Jan 2023 20:08:07 +0000 (21:08 +0100)]
Rollup merge of #106622 - estebank:issue-68972, r=davidtwco

Detect out of bounds range pattern value

Fix #68972.

17 months agoRollup merge of #106620 - estebank:issue-82051, r=davidtwco
Matthias Krüger [Wed, 11 Jan 2023 20:08:07 +0000 (21:08 +0100)]
Rollup merge of #106620 - estebank:issue-82051, r=davidtwco

Detect struct literal needing parentheses

Fix #82051.

17 months agoFilter impl and where-clause candidates that reference errors
Michael Goulet [Sun, 1 Jan 2023 23:48:10 +0000 (23:48 +0000)]
Filter impl and where-clause candidates that reference errors

17 months agoReuse ErrorGuaranteed during relation
Michael Goulet [Fri, 30 Dec 2022 21:51:12 +0000 (21:51 +0000)]
Reuse ErrorGuaranteed during relation

17 months agoAuto merge of #106660 - saethlin:destprop-move-codegen, r=tmiasko
bors [Wed, 11 Jan 2023 19:56:44 +0000 (19:56 +0000)]
Auto merge of #106660 - saethlin:destprop-move-codegen, r=tmiasko

Add a regression test for argument copies with DestinationPropagation

This example, as a codegen test: https://github.com/rust-lang/rust/pull/105813#issuecomment-1367947793

r? `@tmiasko`

17 months agoAllow codegen to unsize dyn* to dyn
Michael Goulet [Fri, 6 Jan 2023 08:47:35 +0000 (08:47 +0000)]
Allow codegen to unsize dyn* to dyn

17 months agoNote predicate span on ImplDerivedObligation
Michael Goulet [Wed, 11 Jan 2023 03:21:11 +0000 (03:21 +0000)]
Note predicate span on ImplDerivedObligation

17 months agoTweak output
Esteban Küber [Wed, 11 Jan 2023 04:11:06 +0000 (04:11 +0000)]
Tweak output

17 months agoConserve cause of `ImplDerivedObligation` in E0599
Esteban Küber [Wed, 11 Jan 2023 03:07:14 +0000 (03:07 +0000)]
Conserve cause of `ImplDerivedObligation` in E0599

CC #86377.

17 months agokeep --wrapper-version argument in x
DebugSteven [Wed, 11 Jan 2023 19:13:35 +0000 (12:13 -0700)]
keep --wrapper-version argument in x

17 months agoDeny having src/test exisiting in tidy
Albert Larsan [Wed, 11 Jan 2023 18:25:33 +0000 (18:25 +0000)]
Deny having src/test exisiting in tidy

17 months agoRevert "warn newer available version of the x tool"
J Haigh [Wed, 11 Jan 2023 18:11:56 +0000 (11:11 -0700)]
Revert "warn newer available version of the x tool"

17 months agoReport fulfillment errors in new trait solver
Michael Goulet [Wed, 11 Jan 2023 03:54:46 +0000 (03:54 +0000)]
Report fulfillment errors in new trait solver

17 months agoAuto merge of #106730 - Nilstrieb:rollup-f7p8dsa, r=Nilstrieb
bors [Wed, 11 Jan 2023 17:01:44 +0000 (17:01 +0000)]
Auto merge of #106730 - Nilstrieb:rollup-f7p8dsa, r=Nilstrieb

Rollup of 9 pull requests

Successful merges:

 - #106321 (Collect and emit proper backtraces for `delay_span_bug`s)
 - #106397 (Check `impl`'s `where` clauses in `consider_impl_candidate` in experimental solver)
 - #106427 (Improve fluent error messages)
 - #106570 (add tests for div_duration_* functions)
 - #106648 (Polymorphization cleanup)
 - #106664 (Remove unnecessary lseek syscall when using std::fs::read)
 - #106709 (Disable "split dwarf inlining" by default.)
 - #106715 (Autolabel and ping wg for changes to new solver)
 - #106717 (fix typo LocalItemId -> ItemLocalId)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

17 months agoparser: recover from where clauses placed before tuple struct bodies
León Orell Valerian Liehr [Fri, 6 Jan 2023 16:47:21 +0000 (17:47 +0100)]
parser: recover from where clauses placed before tuple struct bodies

17 months agoDetect struct literal needing parentheses
Esteban Küber [Mon, 9 Jan 2023 05:29:54 +0000 (05:29 +0000)]
Detect struct literal needing parentheses

Fix #82051.

17 months agoDetect out of bounds range pattern value
Esteban Küber [Mon, 9 Jan 2023 07:10:17 +0000 (07:10 +0000)]
Detect out of bounds range pattern value

Fix #68972.

17 months agoRollup merge of #106717 - klensy:typo, r=lcnr
nils [Wed, 11 Jan 2023 16:30:58 +0000 (17:30 +0100)]
Rollup merge of #106717 - klensy:typo, r=lcnr

fix typo LocalItemId -> ItemLocalId

17 months agoRollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
nils [Wed, 11 Jan 2023 16:30:57 +0000 (17:30 +0100)]
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr

Autolabel and ping wg for changes to new solver

r? ```@lcnr```

17 months agoRollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
nils [Wed, 11 Jan 2023 16:30:56 +0000 (17:30 +0100)]
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco

Disable "split dwarf inlining" by default.

This matches clang's behavior and makes split-debuginfo behave as expected (i.e. actually split the debug info).

Fixes #106592

17 months agoRollup merge of #106664 - chenyukang:yukang/fix-106597-remove-lseek, r=cuviper
nils [Wed, 11 Jan 2023 16:30:56 +0000 (17:30 +0100)]
Rollup merge of #106664 - chenyukang:yukang/fix-106597-remove-lseek, r=cuviper

Remove unnecessary lseek syscall when using std::fs::read

Fixes #106597
r? ```@bjorn3```

17 months agoRollup merge of #106648 - Nilstrieb:poly-cleanup, r=compiler-errors
nils [Wed, 11 Jan 2023 16:30:55 +0000 (17:30 +0100)]
Rollup merge of #106648 - Nilstrieb:poly-cleanup, r=compiler-errors

Polymorphization cleanup

Split out of #106233

Use a newtype instead of a bitset directly. This makes the code way easier to read and easier to adapt for future changes.

17 months agoRollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
nils [Wed, 11 Jan 2023 16:30:54 +0000 (17:30 +0100)]
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor

add tests for div_duration_* functions

Per https://github.com/rust-lang/rust/issues/63139#issuecomment-817070719

this adds unit tests for the functions that will hopefully effectively demonstrate that `div_duration` is ready to be stabilized.

17 months agoRollup merge of #106427 - mejrs:translation_errors, r=davidtwco
nils [Wed, 11 Jan 2023 16:30:54 +0000 (17:30 +0100)]
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco

Improve fluent error messages

These have been really frustrating me while migrating diagnostics.

17 months agoRollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
nils [Wed, 11 Jan 2023 16:30:53 +0000 (17:30 +0100)]
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr

Check `impl`'s `where` clauses in `consider_impl_candidate` in experimental solver

Check impl's nested predicates as part of the recursive evaluate in `consider_impl_candidate`.

<sub>Unless, for some reason, these are intentionally **not** checked here -- in which case, I really don't understand where they're being checked...<sub>

r? ```@lcnr```

17 months agoRollup merge of #106321 - compiler-errors:delayed-bug-backtrace, r=Nilstrieb
nils [Wed, 11 Jan 2023 16:30:53 +0000 (17:30 +0100)]
Rollup merge of #106321 - compiler-errors:delayed-bug-backtrace, r=Nilstrieb

Collect and emit proper backtraces for `delay_span_bug`s

This is a follow-up to #106317, which addresses this comment (https://github.com/rust-lang/rust/issues/106267#issuecomment-1367507507) which notes that `delay_span_bug`s' backtraces are nonsense.

Captures and emits the backtrace of the delayed span bug when it's *created*, rather than using the backtrace of the place where delayed bugs are flushed.

---

To test, I delayed a span bug during HIR typeck, specifically in `typeck_with_fallback`...

Before, note `flush_delayed` on frame 18. This is at the end of the compilation session, far from where the bug is being delayed.

```
error: internal compiler error: test
 --> /home/ubuntu/test.rs:1:1
  |
1 | fn main() {}
  | ^^^^^^^^^
  |
  = note: delayed at compiler/rustc_hir_typeck/src/lib.rs:196:14

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1634:13
stack backtrace:
   0:     0x7f9c3ec69dd1 - std::backtrace_rs::backtrace::libunwind::trace::h26056f81198c6594
                               at /home/ubuntu/rust2/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f9c3ec69dd1 - std::backtrace_rs::backtrace::trace_unsynchronized::hacfb345a0c6d5bb1
                               at /home/ubuntu/rust2/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f9c3ec69dd1 - std::sys_common::backtrace::_print_fmt::h18ea6016ac8030f3
                               at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f9c3ec69dd1 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he35dde201d0c2d09
                               at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f9c3ecee308 - core::fmt::write::h094ad263467a053c
                               at /home/ubuntu/rust2/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f9c3ec8aaf1 - std::io::Write::write_fmt::hd47b4e2324b4d9b7
                               at /home/ubuntu/rust2/library/std/src/io/mod.rs:1682:15
   6:     0x7f9c3ec69bfa - std::sys_common::backtrace::_print::h43044162653a17fc
                               at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f9c3ec69bfa - std::sys_common::backtrace::print::hc8605da258fa5aeb
                               at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f9c3ec4db87 - std::panicking::default_hook::{{closure}}::h9e37f23f75122a15
   9:     0x7f9c3ec4d97b - std::panicking::default_hook::h602873a063f84da2
                               at /home/ubuntu/rust2/library/std/src/panicking.rs:286:9
  10:     0x7f9c3f6672b2 - <alloc[48d7b30605060536]::boxed::Box<dyn for<'a, 'b> core[672e3947e150d6c6]::ops::function::Fn<(&'a core[672e3947e150d6c6]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[672e3947e150d6c6]::marker::Send + core[672e3947e150d6c6]::marker::Sync> as core[672e3947e150d6c6]::ops::function::Fn<(&core[672e3947e150d6c6]::panic::panic_info::PanicInfo,)>>::call
                               at /home/ubuntu/rust2/library/alloc/src/boxed.rs:2002:9
  11:     0x7f9c3f6672b2 - rustc_driver[f5b6d32d8905ecdd]::DEFAULT_HOOK::{closure#0}::{closure#0}
                               at /home/ubuntu/rust2/compiler/rustc_driver/src/lib.rs:1204:17
  12:     0x7f9c3ec4e0d3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hfd13333ca953ae8e
                               at /home/ubuntu/rust2/library/alloc/src/boxed.rs:2002:9
  13:     0x7f9c3ec4e0d3 - std::panicking::rust_panic_with_hook::h45753e10264ebe7e
                               at /home/ubuntu/rust2/library/std/src/panicking.rs:692:13
  14:     0x7f9c422a1aa3 - std[3330b4673efabfce]::panicking::begin_panic::<rustc_errors[1b15f4e7e49d1fd5]::ExplicitBug>::{closure#0}
                               at /home/ubuntu/rust2/library/std/src/panicking.rs:608:9
  15:     0x7f9c422a1a46 - std[3330b4673efabfce]::sys_common::backtrace::__rust_end_short_backtrace::<std[3330b4673efabfce]::panicking::begin_panic<rustc_errors[1b15f4e7e49d1fd5]::ExplicitBug>::{closure#0}, !>
                               at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:137:18
  16:     0x7f9c3f63a996 - std[3330b4673efabfce]::panicking::begin_panic::<rustc_errors[1b15f4e7e49d1fd5]::ExplicitBug>
                               at /home/ubuntu/rust2/library/std/src/panicking.rs:607:12
  17:     0x7f9c4227a496 - std[3330b4673efabfce]::panic::panic_any::<rustc_errors[1b15f4e7e49d1fd5]::ExplicitBug>
                               at /home/ubuntu/rust2/library/std/src/panic.rs:61:5
  18:     0x7f9c4227cdf7 - <rustc_errors[1b15f4e7e49d1fd5]::HandlerInner>::flush_delayed::<alloc[48d7b30605060536]::vec::Vec<rustc_errors[1b15f4e7e49d1fd5]::diagnostic::Diagnostic>, &str, rustc_errors[1b15f4e7e49d1fd5]::ExplicitBug>
                               at /home/ubuntu/rust2/compiler/rustc_errors/src/lib.rs:1634:13
  19:     0x7f9c422498cf - <rustc_errors[1b15f4e7e49d1fd5]::Handler>::flush_delayed
                               at /home/ubuntu/rust2/compiler/rustc_errors/src/lib.rs:1225:9

[ FRAMES INTENTIONALLY OMITTED ]

  44:     0x7f9c3f6f3584 - <std[3330b4673efabfce]::thread::Builder>::spawn_unchecked_::<rustc_interface[947706ead88047d0]::util::run_in_thread_pool_with_globals<rustc_interface[947706ead88047d0]::interface::run_compiler<core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>, rustc_driver[f5b6d32d8905ecdd]::run_compiler::{closure#1}>::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#1}
                               at /home/ubuntu/rust2/library/std/src/thread/mod.rs:549:30
  45:     0x7f9c3f6f3584 - <<std[3330b4673efabfce]::thread::Builder>::spawn_unchecked_<rustc_interface[947706ead88047d0]::util::run_in_thread_pool_with_globals<rustc_interface[947706ead88047d0]::interface::run_compiler<core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>, rustc_driver[f5b6d32d8905ecdd]::run_compiler::{closure#1}>::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#1} as core[672e3947e150d6c6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
                               at /home/ubuntu/rust2/library/core/src/ops/function.rs:250:5
  46:     0x7f9c3ec81968 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he8b26fc22c6f51ec
                               at /home/ubuntu/rust2/library/alloc/src/boxed.rs:1988:9
  47:     0x7f9c3ec81968 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5cf9cbe75a8c3ddc
                               at /home/ubuntu/rust2/library/alloc/src/boxed.rs:1988:9
  48:     0x7f9c3ec5f99c - std::sys::unix::thread::Thread::new::thread_start::h2d6dd4455e97d031
                               at /home/ubuntu/rust2/library/std/src/sys/unix/thread.rs:108:17
  49:     0x7f9c37c69609 - start_thread
  50:     0x7f9c3ead0133 - clone
  51:                0x0 - <unknown>
```

After, note `typeck_with_fallback` on the 5th frame, that's where we *actually* need to be pointed to:

```
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: test
 --> /home/ubuntu/test.rs:1:1
  |
1 | fn main() {}
  | ^^^^^^^^^
  |
  = note: delayed at    0: <rustc_errors::HandlerInner>::emit_diagnostic
                       at ./compiler/rustc_errors/src/lib.rs:1279:29
             1: <rustc_errors::HandlerInner>::delay_span_bug::<rustc_span::span_encoding::Span, &str>
                       at ./compiler/rustc_errors/src/lib.rs:1553:9
             2: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, &str>
                       at ./compiler/rustc_errors/src/lib.rs:995:9
             3: <rustc_session::session::Session>::delay_span_bug::<rustc_span::span_encoding::Span, &str>
                       at ./compiler/rustc_session/src/session.rs:600:9
             4: rustc_hir_typeck::typeck_with_fallback::<rustc_hir_typeck::typeck::{closure#0}>::{closure#0}
                       at ./compiler/rustc_hir_typeck/src/lib.rs:196:5
             5: rustc_hir_typeck::typeck_with_fallback::<rustc_hir_typeck::typeck::{closure#0}>
                       at ./compiler/rustc_hir_typeck/src/lib.rs:185:36
             6: rustc_hir_typeck::typeck
                       at ./compiler/rustc_hir_typeck/src/lib.rs:166:9

[ FRAMES INTENTIONALLY OMITTED ]

           108: std::panicking::try::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, core::panic::unwind_safe::AssertUnwindSafe<<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1}::{closure#0}>>
                       at ./library/std/src/panicking.rs:447:19
           109: std::panic::catch_unwind::<core::panic::unwind_safe::AssertUnwindSafe<<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1}::{closure#0}>, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
                       at ./library/std/src/panic.rs:140:14
           110: <std::thread::Builder>::spawn_unchecked_::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1}
                       at ./library/std/src/thread/mod.rs:549:30
           111: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
                       at ./library/core/src/ops/function.rs:250:5
           112: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at ./library/alloc/src/boxed.rs:1988:9
           113: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at ./library/alloc/src/boxed.rs:1988:9
           114: std::sys::unix::thread::Thread::new::thread_start
                       at ./library/std/src/sys/unix/thread.rs:108:17
           115: start_thread
           116: clone
```

17 months agorustc_llvm: replace llvm::makeArrayRef with ArrayRef constructors.
Dmitri Gribenko [Wed, 11 Jan 2023 15:39:01 +0000 (10:39 -0500)]
rustc_llvm: replace llvm::makeArrayRef with ArrayRef constructors.

LLVM upstream has deprecated llvm::makeArrayRef and will remove it.

17 months agoFix some typos in code comments.
Cedric [Wed, 11 Jan 2023 15:46:14 +0000 (16:46 +0100)]
Fix some typos in code comments.

17 months agoAdd a regression test for argument copies with DestinationPropagation
Ben Kimock [Tue, 10 Jan 2023 01:56:38 +0000 (20:56 -0500)]
Add a regression test for argument copies with DestinationPropagation

17 months agofix typo LocalItemId -> ItemLocalId
klensy [Wed, 11 Jan 2023 12:45:52 +0000 (15:45 +0300)]
fix typo LocalItemId -> ItemLocalId

17 months agoa
Boxy [Wed, 11 Jan 2023 12:02:14 +0000 (12:02 +0000)]
a

17 months agoAuto merge of #106458 - albertlarsan68:move-tests, r=jyn514
bors [Wed, 11 Jan 2023 11:17:22 +0000 (11:17 +0000)]
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514

Move src/test to the root

See MCP at rust-lang/compiler-team#573

There may be more changes needed.

The first commit is just the move of the files:
You can check that the first commit did not do anything else than renames by running
```
git diff --diff-filter=r -M100% <rust-lang remote>/master <first commit hash>
```
The output should be empty, because the filter excludes renames, and the match threshold for qualifying a rename is 100%.

The second one is mostly a "find and replace" of `src/test` to `tests` and whatever is needed to make CI pass.

What is left to do:
---

- [x] Move directory
- [ ] Change references to `src/test`
    - [x] Change references in-tree
    - [ ] Change references in submodules / out-of-tree docs
- [x] Make CI pass:
    - [x] Fix tidy
    - [x] Fix tests
    - [x] Bless tests if needed (shouldn't normally)
- [ ] Merge it !

17 months agoChange `src/test` to `tests` in source files, fix tidy and tests
Albert Larsan [Thu, 5 Jan 2023 08:45:44 +0000 (09:45 +0100)]
Change `src/test` to `tests` in source files, fix tidy and tests

17 months agoMove /src/test to /tests
Albert Larsan [Thu, 5 Jan 2023 08:13:28 +0000 (09:13 +0100)]
Move /src/test to /tests

17 months agoAuto merge of #105919 - uweigand:s390x-stack-overflow, r=Nilstrieb
bors [Wed, 11 Jan 2023 08:50:38 +0000 (08:50 +0000)]
Auto merge of #105919 - uweigand:s390x-stack-overflow, r=Nilstrieb

Fix stack overflow in recursive AST walk in early lint

The src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs test case added to verify https://github.com/rust-lang/rust/issues/74564 still crashes with a stack overflow on s390x-ibm-linux.

Symptom is a very deep recursion in compiler/rustc_lint/src/early.rs:
    fn visit_expr(&mut self, e: &'a ast::Expr) {
        self.with_lint_attrs(e.id, &e.attrs, |cx| {
            lint_callback!(cx, check_expr, e);
            ast_visit::walk_expr(cx, e);
        })
    }
(where walk_expr recursively calls back into visit_expr).  The crash happens at a nesting depth of over 17000 stack frames when using the default 8 MB stack size on s390x.

This patch fixes the problem by adding a ensure_sufficient_stack call to the with_lint_attrs routine (which also should take care of all the other mutually recursive visitors here).

Fixes part of https://github.com/rust-lang/rust/issues/105383.

17 months agoDisable "split dwarf inlining" by default.
Kyle Huey [Wed, 11 Jan 2023 06:34:09 +0000 (22:34 -0800)]
Disable "split dwarf inlining" by default.

This matches clang's behavior and makes split-debuginfo behave as expected (i.e. actually split the debug info).

Fixes #106592

17 months agoAuto merge of #106708 - JohnTitor:rollup-xcmg5yv, r=JohnTitor
bors [Wed, 11 Jan 2023 05:19:55 +0000 (05:19 +0000)]
Auto merge of #106708 - JohnTitor:rollup-xcmg5yv, r=JohnTitor

Rollup of 14 pull requests

Successful merges:

 - #105194 (Add comment to cleanup_kinds)
 - #106521 (remove E0280)
 - #106628 (Remove unneeded ItemId::Primitive variant)
 - #106635 (std sync tests: better type name, clarifying comment)
 - #106642 (Add test for #106062)
 - #106645 ([RFC 2397] Initial implementation)
 - #106653 (Fix help docs for -Zallow-features)
 - #106657 (Remove myself from rust-lang/rust reviewers)
 - #106662 (specialize impl of `ToString` on `bool`)
 - #106669 (create helper function for `rustc_lint_defs::Level` and remove it's duplicated code)
 - #106671 (Change flags with a fixed default value from Option<bool> to bool)
 - #106689 (Fix invalid files array re-creation in rustdoc-gui tester)
 - #106690 (Fix scrolling for item declaration block)
 - #106698 (Add compiler-errors to some trait system notification groups)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

17 months agoRollup merge of #106698 - compiler-errors:notify-mr-errs, r=Mark-Simulacrum
Yuki Okushi [Wed, 11 Jan 2023 05:18:59 +0000 (14:18 +0900)]
Rollup merge of #106698 - compiler-errors:notify-mr-errs, r=Mark-Simulacrum

Add compiler-errors to some trait system notification groups

I care about these areas of the compiler.

17 months agoRollup merge of #106690 - GuillaumeGomez:item-declaration-scrolling, r=notriddle
Yuki Okushi [Wed, 11 Jan 2023 05:18:58 +0000 (14:18 +0900)]
Rollup merge of #106690 - GuillaumeGomez:item-declaration-scrolling, r=notriddle

Fix scrolling for item declaration block

Fixes https://github.com/rust-lang/rust/issues/105580.

The `contain: layout` was the issue here and the bug was actually on both mobile and desktop.

r? `@notriddle`

17 months agoRollup merge of #106689 - GuillaumeGomez:rustdoc-gui-files-array, r=notriddle
Yuki Okushi [Wed, 11 Jan 2023 05:18:58 +0000 (14:18 +0900)]
Rollup merge of #106689 - GuillaumeGomez:rustdoc-gui-files-array, r=notriddle

Fix invalid files array re-creation in rustdoc-gui tester

It fixes the error <code>expected `runTest` first argument to be a string</code>:

```
{
  file_name: {
    file_name: '/home/imperio/rust/rust/src/test/rustdoc-gui/type-declation-overflow.goml',
    output: 'type-declation-overflow... FAILED\n' +
      '...'
  },
  output: Error: expected `runTest` first argument to be a string
      at runTest (/home/imperio/rust/rust/node_modules/browser-ui-test/src/index.js:591:15)
      at runTests (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:144:26)
      at main (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:278:15)
} Error: expected `runTest` first argument to be a string
    at runTest (/home/imperio/rust/rust/node_modules/browser-ui-test/src/index.js:591:15)
    at runTests (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:144:26)
    at main (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:278:15)
```

The problem was that I concatenated two arrays of object whereas `files` is supposed to be an array of string.

r? `@notriddle`

17 months agoRollup merge of #106671 - tmiasko:opt-bool, r=wesleywiser
Yuki Okushi [Wed, 11 Jan 2023 05:18:57 +0000 (14:18 +0900)]
Rollup merge of #106671 - tmiasko:opt-bool, r=wesleywiser

Change flags with a fixed default value from Option<bool> to bool

17 months agoRollup merge of #106669 - ozkanonur:helper-function-for-lint-level, r=Nilstrieb
Yuki Okushi [Wed, 11 Jan 2023 05:18:57 +0000 (14:18 +0900)]
Rollup merge of #106669 - ozkanonur:helper-function-for-lint-level, r=Nilstrieb

create helper function for `rustc_lint_defs::Level` and remove it's duplicated code

Signed-off-by: ozkanonur <work@onurozkan.dev>
17 months agoRollup merge of #106662 - Ezrashaw:specialize-bool-tostring, r=cuviper
Yuki Okushi [Wed, 11 Jan 2023 05:18:56 +0000 (14:18 +0900)]
Rollup merge of #106662 - Ezrashaw:specialize-bool-tostring, r=cuviper

specialize impl of `ToString` on `bool`

Fixes #106611

Specialize `bool`s `ToString` impl by copying it from `Display`. This is a significant optimization as we avoid lots of dynamic dispatch. AFAIK, this doesn't require a API Change Proposal as this doesn't regress existing code and can be undone without regressing code.

17 months agoRollup merge of #106657 - jyn514:review, r=Mark-Simulacrum
Yuki Okushi [Wed, 11 Jan 2023 05:18:56 +0000 (14:18 +0900)]
Rollup merge of #106657 - jyn514:review, r=Mark-Simulacrum

Remove myself from rust-lang/rust reviewers

I don't have time to both review and work on my foundation grant.

17 months agoRollup merge of #106653 - ehuss:allow-features-help, r=nilstrieb
Yuki Okushi [Wed, 11 Jan 2023 05:18:55 +0000 (14:18 +0900)]
Rollup merge of #106653 - ehuss:allow-features-help, r=nilstrieb

Fix help docs for -Zallow-features

The arguments for -Zallow-features are comma-separated (`parse_opt_comma_list`), not space separated (`parse_list`).

17 months agoRollup merge of #106645 - c410-f3r:rfc-2397-1, r=oli-obk
Yuki Okushi [Wed, 11 Jan 2023 05:18:55 +0000 (14:18 +0900)]
Rollup merge of #106645 - c410-f3r:rfc-2397-1, r=oli-obk

[RFC 2397] Initial implementation

cc #51992

Because of previous experiences where ppl didn't have the time to review large PRs (or any at all), the implementation of this feature will be delivered in small chunks to hopefully make things faster.

In this initial PR, only the attribute is being declared and gated with ordinary tests.

17 months agoRollup merge of #106642 - albertlarsan68:test-106062, r=JohnTitor
Yuki Okushi [Wed, 11 Jan 2023 05:18:54 +0000 (14:18 +0900)]
Rollup merge of #106642 - albertlarsan68:test-106062, r=JohnTitor

Add test for #106062

Add a regression test for #106062

Closes #106062

17 months agoRollup merge of #106635 - RalfJung:std-test-nits, r=thomcc
Yuki Okushi [Wed, 11 Jan 2023 05:18:54 +0000 (14:18 +0900)]
Rollup merge of #106635 - RalfJung:std-test-nits, r=thomcc

std sync tests: better type name, clarifying comment

Just resolving some confusion that I encountered while reading these tests.

r? `@thomcc`

17 months agoRollup merge of #106628 - GuillaumeGomez:rm-itemid-primitive, r=notriddle
Yuki Okushi [Wed, 11 Jan 2023 05:18:53 +0000 (14:18 +0900)]
Rollup merge of #106628 - GuillaumeGomez:rm-itemid-primitive, r=notriddle

Remove unneeded ItemId::Primitive variant

As I mentioned [here](https://github.com/rust-lang/rust/pull/106412#issuecomment-1371405115), I wondered if `ItemId::Primitive` was actually used for anything. Apparently, it seems so because removing it led to no changes as far as I and tests could see.

r? `@notriddle`

17 months agoRollup merge of #106521 - oskgo:remove-E0280, r=jackh726
Yuki Okushi [Wed, 11 Jan 2023 05:18:53 +0000 (14:18 +0900)]
Rollup merge of #106521 - oskgo:remove-E0280, r=jackh726

remove E0280

After looking at #61137 I tried my hand at E0280. I'm unable to find a reasonable example that emits the error. There are a couple of old examples that compile with the current compiler ([#26217](https://github.com/rust-lang/rust/issues/26217), [#42114](https://github.com/rust-lang/rust/issues/42114), [#27113](https://github.com/rust-lang/rust/issues/27113)) and there is a [bug with chalk](https://github.com/rust-lang/rust/blob/b7cdb635c4b973572307ad288466fba64533369c/src/test/ui/chalkify/bugs/async.rs) that makes it emit the error, with a couple more chalk bugs on zulip.

It seems like the error is supposed to be emitted from unfulfilled where bounds, of which two are related to borrow checking (error in where T: 'a or where 'a: 'b) and thus tend to emit errors like "lifetime may not live long enough" from borrow checking instead. The final case is with type equality constraints (where <T as Iterator>::Item == u32), which is unimplemented ([#20041](https://github.com/rust-lang/rust/issues/20041)). That such different problems are supposed to have the same error code also seems strange to me.

Since the error seems to only be emitted when using chalk I propose to remove it and replace it with an ICE instead. A crater run might be warranted.

Pinging `@jackh726` due to removal of chalk test that now ICEs.

17 months agoRollup merge of #105194 - tmiasko:cleanup-kinds, r=davidtwco
Yuki Okushi [Wed, 11 Jan 2023 05:18:52 +0000 (14:18 +0900)]
Rollup merge of #105194 - tmiasko:cleanup-kinds, r=davidtwco

Add comment to cleanup_kinds

based on the original commit message 1ae7ae0c1c7ed68c616273f245647afa47f3cbde

17 months agoAdd compiler-errors to some trait system notification groups
Michael Goulet [Wed, 11 Jan 2023 00:32:52 +0000 (00:32 +0000)]
Add compiler-errors to some trait system notification groups

17 months agoAuto merge of #106687 - pietroalbini:pa-cve-nightly, r=pietroalbini
bors [Tue, 10 Jan 2023 22:49:23 +0000 (22:49 +0000)]
Auto merge of #106687 - pietroalbini:pa-cve-nightly, r=pietroalbini

[nightly] Fix CVE-2022-46176

See https://blog.rust-lang.org/2023/01/10/cve-2022-46176.html

r? `@ghost`

17 months agoRemove unneeded ItemId::Primitive variant
Guillaume Gomez [Mon, 9 Jan 2023 11:09:32 +0000 (12:09 +0100)]
Remove unneeded ItemId::Primitive variant

17 months agoAdd GUI test for item declaration block scrolling
Guillaume Gomez [Tue, 10 Jan 2023 17:27:12 +0000 (18:27 +0100)]
Add GUI test for item declaration block scrolling

17 months agoFix scrolling for item declaration block
Guillaume Gomez [Tue, 10 Jan 2023 17:27:00 +0000 (18:27 +0100)]
Fix scrolling for item declaration block

17 months agoFix invalid files array re-creation in rustdoc-gui tester
Guillaume Gomez [Tue, 10 Jan 2023 17:16:43 +0000 (18:16 +0100)]
Fix invalid files array re-creation in rustdoc-gui tester

17 months agoupdate release notes for 1.66.1
Pietro Albini [Tue, 10 Jan 2023 12:08:25 +0000 (13:08 +0100)]
update release notes for 1.66.1

17 months agobump Cargo submodule to fix CVE-2022-46176
Pietro Albini [Tue, 10 Jan 2023 12:13:04 +0000 (13:13 +0100)]
bump Cargo submodule to fix CVE-2022-46176

17 months agouse with_capacity in read read_to_string
yukang [Tue, 10 Jan 2023 16:19:27 +0000 (00:19 +0800)]
use with_capacity in read read_to_string

17 months agodisable fast submodule checkout due to spurious ci failures
Pietro Albini [Tue, 10 Jan 2023 15:06:19 +0000 (16:06 +0100)]
disable fast submodule checkout due to spurious ci failures

17 months agoChange type of box_noalias to bool
Tomasz Miąsko [Fri, 6 Jan 2023 00:00:00 +0000 (00:00 +0000)]
Change type of box_noalias to bool

17 months agoChange type of mutable_noalias to bool
Tomasz Miąsko [Fri, 6 Jan 2023 00:00:00 +0000 (00:00 +0000)]
Change type of mutable_noalias to bool

17 months agoAdd comment to cleanup_kinds
Tomasz Miąsko [Sat, 3 Dec 2022 00:00:00 +0000 (00:00 +0000)]
Add comment to cleanup_kinds

based on the original commit message 1ae7ae0c1c7ed68c616273f245647afa47f3cbde

17 months agocreate helper function for `rustc_lint_defs::Level` and remove it's duplicated code...
ozkanonur [Tue, 10 Jan 2023 07:56:17 +0000 (10:56 +0300)]
create helper function for `rustc_lint_defs::Level` and remove it's duplicated code r=ozkanonur

Signed-off-by: ozkanonur <work@onurozkan.dev>
17 months agoAuto merge of #106607 - compiler-errors:be-more-accurate-abt-method-suggestions,...
bors [Tue, 10 Jan 2023 06:22:01 +0000 (06:22 +0000)]
Auto merge of #106607 - compiler-errors:be-more-accurate-abt-method-suggestions, r=oli-obk

Consider return type when giving various method suggestions

1. Fix a bug in method probe where we weren't normalizing `xform_ret_ty` for non-`impl` method candidates. This shouldn't affect happy-path code, since we only use `xform_ret_ty` when probing methods for diagnostics (I think).
2. Pass the return type expectation down to `lookup_probe`/`probe_for_name` usages in diagnostics. Added a few UI tests to gate against bad suggestions.
3. Make a `FnCtxt::lookup_probe_for_diagnostic` which properly passes down `IsSuggestion(true)`. Should help suppress other weird notes in some corner cases.

17 months agoAuto merge of #106656 - JohnTitor:rollup-rk2qltg, r=JohnTitor
bors [Tue, 10 Jan 2023 03:26:29 +0000 (03:26 +0000)]
Auto merge of #106656 - JohnTitor:rollup-rk2qltg, r=JohnTitor

Rollup of 9 pull requests

Successful merges:

 - #105034 (Add example for iterator_flatten)
 - #105708 (Enable atomic cas for bpf targets)
 - #106175 (Fix bad import suggestion with nested `use` tree)
 - #106204 (No need to take opaques in `check_type_bounds`)
 - #106387 (Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`")
 - #106636 (Accept old spelling of Fuchsia target triples)
 - #106639 (update Miri)
 - #106640 (update test for inductive canonical cycles)
 - #106647 (rustdoc: merge common CSS for `a`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

17 months agoimpl: specialize impl of `ToString` on `bool`
Ezra Shaw [Mon, 9 Jan 2023 09:21:21 +0000 (22:21 +1300)]
impl: specialize impl of `ToString` on `bool`

17 months agoremove E0280 and ICE instead
bowlerman [Fri, 6 Jan 2023 01:29:37 +0000 (02:29 +0100)]
remove E0280 and ICE instead

17 months agoAuto merge of #106495 - JohnTitor:issue-100772, r=compiler-errors
bors [Tue, 10 Jan 2023 00:22:16 +0000 (00:22 +0000)]
Auto merge of #106495 - JohnTitor:issue-100772, r=compiler-errors

Add regression test for #100772

Closes #100772
r? `@compiler-errors`
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
17 months ago[RFC 2397] Initial implementation
Caio [Mon, 9 Jan 2023 23:51:01 +0000 (20:51 -0300)]
[RFC 2397] Initial implementation

17 months agoRemove myself from rust-lang/rust reviewers
Joshua Nelson [Mon, 9 Jan 2023 23:39:04 +0000 (17:39 -0600)]
Remove myself from rust-lang/rust reviewers

I don't have time to both review and work on my foundation grant.

17 months agoRollup merge of #106647 - notriddle:notriddle/a, r=GuillaumeGomez
Yuki Okushi [Mon, 9 Jan 2023 23:05:37 +0000 (08:05 +0900)]
Rollup merge of #106647 - notriddle:notriddle/a, r=GuillaumeGomez

rustdoc: merge common CSS for `a`

17 months agoRollup merge of #106640 - lcnr:update-test, r=jackh726
Yuki Okushi [Mon, 9 Jan 2023 23:05:36 +0000 (08:05 +0900)]
Rollup merge of #106640 - lcnr:update-test, r=jackh726

update test for inductive canonical cycles

the previous test always resulted in a cycle :sweat_smile: cc https://github.com/rust-lang/chalk/pull/787.

I checked with #102713 and this is the only test which fails with that PR.

r? ``@jackh726``

17 months agoRollup merge of #106639 - RalfJung:miri, r=RalfJung
Yuki Okushi [Mon, 9 Jan 2023 23:05:36 +0000 (08:05 +0900)]
Rollup merge of #106639 - RalfJung:miri, r=RalfJung

update Miri

Notable PRs:
- https://github.com/rust-lang/miri/pull/2748
- https://github.com/rust-lang/miri/pull/2752

r? `@ghost`

17 months agoRollup merge of #106636 - djkoloski:accept_old_fuchsia_triple, r=tmandry
Yuki Okushi [Mon, 9 Jan 2023 23:05:35 +0000 (08:05 +0900)]
Rollup merge of #106636 - djkoloski:accept_old_fuchsia_triple, r=tmandry

Accept old spelling of Fuchsia target triples

The old spelling of Fuchsia target triples was changed in #106429 to add a proper vendor. Because the old spelling is widely used, some projects may need time to migrate their uses to the new triple spelling. The old spelling may eventually be removed altogether.

r? ``@tmandry``

17 months agoRollup merge of #106387 - jyn514:clippy, r=Mark-Simulacrum
Yuki Okushi [Mon, 9 Jan 2023 23:05:35 +0000 (08:05 +0900)]
Rollup merge of #106387 - jyn514:clippy, r=Mark-Simulacrum

Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`"

This reverts commit 9dfe50440e6d48bd2fd40a4b7b3992998e55eace. (Note: that merged as part of https://github.com/rust-lang/rust/pull/106305, but https://github.com/rust-lang/rust/pull/106305/ contains more commits than just 9dfe50440e6d48bd2fd40a4b7b3992998e55eace.)

Fixes `x clippy`. It turns out `clippy` was the only one using `tail_args` 🤦 sorry for not testing this earlier.

r? `@Mark-Simulacrum`

17 months agoRollup merge of #106204 - compiler-errors:no-take-opaques-in-compare, r=oli-obk
Yuki Okushi [Mon, 9 Jan 2023 23:05:34 +0000 (08:05 +0900)]
Rollup merge of #106204 - compiler-errors:no-take-opaques-in-compare, r=oli-obk

No need to take opaques in `check_type_bounds`

`InferCtxt` already has its defining use anchor set to err

r? ``@oli-obk``

17 months agoRollup merge of #106175 - compiler-errors:bad-import-sugg, r=oli-obk
Yuki Okushi [Mon, 9 Jan 2023 23:05:34 +0000 (08:05 +0900)]
Rollup merge of #106175 - compiler-errors:bad-import-sugg, r=oli-obk

Fix bad import suggestion with nested `use` tree

Fixes #105566
Fixes #105373

Ideally, we'd find some way to turn these into structured suggestions -- perhaps on a separate line as a different `use` statement, but I have no idea how to access the span for the whole `use` from this point in the import resolution code.

17 months agoRollup merge of #105708 - tomerze:enable-atomic-cas-bpf, r=nagisa
Yuki Okushi [Mon, 9 Jan 2023 23:05:33 +0000 (08:05 +0900)]
Rollup merge of #105708 - tomerze:enable-atomic-cas-bpf, r=nagisa

Enable atomic cas for bpf targets

It seems like LLVM now supports it.

https://reviews.llvm.org/D72184 - the PR in LLVM

17 months agoRollup merge of #105034 - HintringerFabian:improve_iterator_flatten_doc, r=cuviper
Yuki Okushi [Mon, 9 Jan 2023 23:05:32 +0000 (08:05 +0900)]
Rollup merge of #105034 - HintringerFabian:improve_iterator_flatten_doc, r=cuviper

Add example for iterator_flatten

Adds an Example to iterator_flatten
Fixes #82687

17 months agoFix help docs for -Zallow-features
Eric Huss [Mon, 9 Jan 2023 20:36:39 +0000 (12:36 -0800)]
Fix help docs for -Zallow-features