Commit Graph

214709 Commits

Author SHA1 Message Date
mejrs
372ac9c1a2
Translate Overlap eagerly 2023-01-11 14:40:13 -08:00
mejrs
3d260fa63c
Some cleanup, oops 2023-01-11 14:40:10 -08:00
mejrs
8476c517c0
Don't recommend if let if let else works 2023-01-11 14:40:07 -08:00
mejrs
31c20210b9
Migrate pattern matching 2023-01-11 14:40:02 -08:00
mejrs
ef33072890
Migrate usefulness.rs 2023-01-11 14:39:59 -08:00
mejrs
5d2b9a9ed0
Migrate deconstruct_pat.rs 2023-01-11 14:39:49 -08:00
mejrs
519b1abd19
Translate const_to_pat.rs 2023-01-11 14:39:27 -08:00
bors
ef4046e4f3 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
2023-01-11 17:01:44 +00:00
nils
9aeef61820
Rollup merge of #106717 - klensy:typo, r=lcnr
fix typo LocalItemId -> ItemLocalId
2023-01-11 17:30:58 +01:00
nils
80c535f15c
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
Autolabel and ping wg for changes to new solver

r? ```@lcnr```
2023-01-11 17:30:57 +01:00
nils
082ff0f08d
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
2023-01-11 17:30:56 +01:00
nils
9a820f7397
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```
2023-01-11 17:30:56 +01:00
nils
6e0c404f76
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.
2023-01-11 17:30:55 +01:00
nils
c962b07ed3
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.
2023-01-11 17:30:54 +01:00
nils
73476554e9
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
Improve fluent error messages

These have been really frustrating me while migrating diagnostics.
2023-01-11 17:30:54 +01:00
nils
16938915a4
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```
2023-01-11 17:30:53 +01:00
nils
0681a9652e
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]:🧵: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]:🧵: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_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:🧵: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:🧵: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:🧵: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:🧵: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_start
                       at ./library/std/src/sys/unix/thread.rs:108:17
           115: start_thread
           116: clone
```
2023-01-11 17:30:53 +01:00
klensy
cce2f5f772 fix typo LocalItemId -> ItemLocalId 2023-01-11 15:45:52 +03:00
Boxy
d031befe79 a 2023-01-11 12:02:14 +00:00
bors
b22c152958 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 !
2023-01-11 11:17:22 +00:00
Albert Larsan
40ba0e84d5
Change src/test to tests in source files, fix tidy and tests 2023-01-11 09:32:13 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bors
8ecaad85f6 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.
2023-01-11 08:50:38 +00:00
Kyle Huey
aca2f88d1e 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
2023-01-10 22:35:10 -08:00
bors
ca855e6e42 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
2023-01-11 05:19:55 +00:00
Yuki Okushi
a804980913
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.
2023-01-11 14:18:59 +09:00
Yuki Okushi
8248f1d50a
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`
2023-01-11 14:18:58 +09:00
Yuki Okushi
2c946bc303
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`
2023-01-11 14:18:58 +09:00
Yuki Okushi
c2d1cac36b
Rollup merge of #106671 - tmiasko:opt-bool, r=wesleywiser
Change flags with a fixed default value from Option<bool> to bool
2023-01-11 14:18:57 +09:00
Yuki Okushi
0e92e1dd99
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>
2023-01-11 14:18:57 +09:00
Yuki Okushi
feca61e5eb
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.
2023-01-11 14:18:56 +09:00
Yuki Okushi
80c3ec84a6
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.
2023-01-11 14:18:56 +09:00
Yuki Okushi
8f57062970
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`).
2023-01-11 14:18:55 +09:00
Yuki Okushi
e078d82711
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.
2023-01-11 14:18:55 +09:00
Yuki Okushi
f547c4b33a
Rollup merge of #106642 - albertlarsan68:test-106062, r=JohnTitor
Add test for #106062

Add a regression test for #106062

Closes #106062
2023-01-11 14:18:54 +09:00
Yuki Okushi
397013dc44
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`
2023-01-11 14:18:54 +09:00
Yuki Okushi
b0ffc113a4
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`
2023-01-11 14:18:53 +09:00
Yuki Okushi
12b124283c
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](b7cdb635c4/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.
2023-01-11 14:18:53 +09:00
Yuki Okushi
8d7a06aece
Rollup merge of #105194 - tmiasko:cleanup-kinds, r=davidtwco
Add comment to cleanup_kinds

based on the original commit message 1ae7ae0c1c
2023-01-11 14:18:52 +09:00
Michael Goulet
7c2d48bcc2 Add compiler-errors to some trait system notification groups 2023-01-11 00:32:52 +00:00
bors
bf7ea0d11b 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`
2023-01-10 22:49:23 +00:00
Guillaume Gomez
36c9b49c14 Remove unneeded ItemId::Primitive variant 2023-01-10 18:30:37 +01:00
Guillaume Gomez
719f545831 Add GUI test for item declaration block scrolling 2023-01-10 18:27:42 +01:00
Guillaume Gomez
0399a636e6 Fix scrolling for item declaration block 2023-01-10 18:27:42 +01:00
Guillaume Gomez
2214c6d194 Fix invalid files array re-creation in rustdoc-gui tester 2023-01-10 18:16:43 +01:00
Pietro Albini
e491b080b3
update release notes for 1.66.1 2023-01-10 17:28:38 +01:00
Pietro Albini
4f40eee2bc
bump Cargo submodule to fix CVE-2022-46176 2023-01-10 17:28:37 +01:00
yukang
f7bc68bb4e use with_capacity in read read_to_string 2023-01-11 00:19:27 +08:00
Pietro Albini
04acc1d9dc
disable fast submodule checkout due to spurious ci failures 2023-01-10 16:33:16 +01:00
Tomasz Miąsko
72f8d6a659 Change type of box_noalias to bool 2023-01-10 10:14:59 +01:00