]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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 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 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 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 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 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

17 months agoCollect backtraces for delayed span-bugs too
Michael Goulet [Sat, 31 Dec 2022 01:56:59 +0000 (01:56 +0000)]
Collect backtraces for delayed span-bugs too

17 months agoAuto merge of #105855 - arcnmx:rust-analyzer-2022-12, r=lnicola
bors [Mon, 9 Jan 2023 21:14:32 +0000 (21:14 +0000)]
Auto merge of #105855 - arcnmx:rust-analyzer-2022-12, r=lnicola

:arrow_up: rust-analyzer

Updates rust-analyzer to https://github.com/rust-lang/rust-analyzer/commit/368e0bb32f1178cf162c2ce5f7e10b7ae211eb26

This is a continuation/replacement of #105834, close that if this is chosen instead.

17 months ago:arrow_up: rust-analyzer
arcnmx [Mon, 9 Jan 2023 18:36:22 +0000 (10:36 -0800)]
:arrow_up: rust-analyzer

Merge commit '368e0bb32f1178cf162c2ce5f7e10b7ae211eb26'

17 months agoAdd issue number to FIXMEs
Tyler Mandry [Mon, 9 Jan 2023 18:23:50 +0000 (13:23 -0500)]
Add issue number to FIXMEs

17 months agoAuto merge of #106637 - fee1-dead-contrib:rollup-ticvmsd, r=fee1-dead
bors [Mon, 9 Jan 2023 18:20:00 +0000 (18:20 +0000)]
Auto merge of #106637 - fee1-dead-contrib:rollup-ticvmsd, r=fee1-dead

Rollup of 10 pull requests

Successful merges:

 - #105292 (Change a commit_if_ok call to probe)
 - #105655 (Remove invalid case for mutable borrow suggestion)
 - #106047 (Fix ui constant tests for big-endian platforms)
 - #106061 (Enable Shadow Call Stack for Fuchsia on AArch64)
 - #106164 (Move `check_region_obligations_and_report_errors` to `TypeErrCtxt`)
 - #106291 (Fix incorrect suggestion for extra `&` in pattern)
 - #106389 (Simplify some canonical type alias names)
 - #106468 (Use FxIndexSet when updating obligation causes in `adjust_fulfillment_errors_for_expr_obligation`)
 - #106549 (Use fmt named parameters in rustc_borrowck)
 - #106614 (error-code docs improvements (No. 2))

Failed merges:

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

17 months agoAssert defining anchor is set in take_opaque_types
Michael Goulet [Mon, 9 Jan 2023 18:14:28 +0000 (18:14 +0000)]
Assert defining anchor is set in take_opaque_types

17 months agoDelete unused polymorphization code
Nilstrieb [Thu, 1 Dec 2022 21:00:19 +0000 (22:00 +0100)]
Delete unused polymorphization code

17 months agoUse newtype for unused generic parameters
Nilstrieb [Thu, 1 Dec 2022 17:57:53 +0000 (18:57 +0100)]
Use newtype for unused generic parameters

17 months agorustdoc: merge common CSS for `a`
Michael Howell [Mon, 9 Jan 2023 18:09:19 +0000 (11:09 -0700)]
rustdoc: merge common CSS for `a`

17 months agoreview comment
Michael Goulet [Mon, 9 Jan 2023 18:07:34 +0000 (18:07 +0000)]
review comment

17 months agohack: don't normalize xform_ret_ty for trait/object candidates unless needed
Michael Goulet [Mon, 9 Jan 2023 06:53:11 +0000 (06:53 +0000)]
hack: don't normalize xform_ret_ty for trait/object candidates unless needed

17 months agoAdd lookup_probe_for_diagnostic
Michael Goulet [Sun, 8 Jan 2023 22:54:05 +0000 (22:54 +0000)]
Add lookup_probe_for_diagnostic

17 months agoConsider method return type for various method suggestions
Michael Goulet [Sun, 8 Jan 2023 22:31:47 +0000 (22:31 +0000)]
Consider method return type for various method suggestions

17 months agoNo need to take opaques in check_type_bounds
Michael Goulet [Sat, 24 Dec 2022 21:30:15 +0000 (21:30 +0000)]
No need to take opaques in check_type_bounds

17 months agoUnconditionally normalize xform_ret_ty in probe
Michael Goulet [Sun, 8 Jan 2023 22:15:22 +0000 (22:15 +0000)]
Unconditionally normalize xform_ret_ty in probe

17 months agoCheck impl's where clauses in consider_impl_candidate in experimental solver
Michael Goulet [Tue, 3 Jan 2023 03:43:11 +0000 (03:43 +0000)]
Check impl's where clauses in consider_impl_candidate in experimental solver

17 months agoAccept old spelling of Fuchsia target triples
David Koloski [Mon, 9 Jan 2023 15:22:08 +0000 (10:22 -0500)]
Accept old spelling of Fuchsia target triples

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.

17 months agoAuto merge of #13848 - ian-h-chamberlain:feature/color-compiler-diagnostics, r=ian...
bors [Mon, 9 Jan 2023 17:07:35 +0000 (17:07 +0000)]
Auto merge of #13848 - ian-h-chamberlain:feature/color-compiler-diagnostics, r=ian-h-chamberlain

Colorize `cargo check` diagnostics in VSCode via text decorations

Fixes #13648

![colored-rustc-diagnostics](https://user-images.githubusercontent.com/11131775/209479884-10eef8ca-37b4-4aae-88f7-3591ac01b25e.gif)

Use ANSI control characters to display text decorations matching the VScode terminal theme, and strip them out when providing text content for rustc diagnostics.

This adds the small [`anser`](https://www.npmjs.com/package/anser) library (MIT license, no dependencies) to parse the control codes, and it also supports HTML output so it should be fairly easy to switch to a rendered HTML/webview implementation in the future

I also updated the default `cargo check` command to use the rendered ANSI diagnostics, although I'm not sure if it makes sense to put this kind of thing behind a feature flag, or whether it might have any issues on Windows (as I believe ANSI codes are not used for colorization there)?

17 months agoAdd docs for `colorDiagnosticOutput` capability
Ian Chamberlain [Mon, 9 Jan 2023 16:44:38 +0000 (11:44 -0500)]
Add docs for `colorDiagnosticOutput` capability

17 months agoUse experimental capability to enable color codes
Ian Chamberlain [Wed, 4 Jan 2023 17:04:45 +0000 (12:04 -0500)]
Use experimental capability to enable color codes

17 months agoStrip colors before matching preview diagnostics
Ian Chamberlain [Tue, 3 Jan 2023 15:49:47 +0000 (10:49 -0500)]
Strip colors before matching preview diagnostics

17 months agoUpdate docs to include note about ANSI diagnostics
Ian Chamberlain [Sun, 25 Dec 2022 18:52:42 +0000 (13:52 -0500)]
Update docs to include note about ANSI diagnostics