]> git.lizzy.rs Git - rust.git/log
rust.git
18 months agoremove no-op 'let _ = '
Ralf Jung [Sun, 4 Dec 2022 09:32:00 +0000 (10:32 +0100)]
remove no-op 'let _ = '

18 months agoAuto merge of #105121 - oli-obk:simpler-cheaper-dump_mir, r=nnethercote
bors [Sun, 4 Dec 2022 05:47:10 +0000 (05:47 +0000)]
Auto merge of #105121 - oli-obk:simpler-cheaper-dump_mir, r=nnethercote

Cheaper `dump_mir` take two

alternative to #105083

r? `@nnethercote`

18 months agoAuto merge of #104757 - camelid:consolidate-lints, r=GuillaumeGomez,jyn514,Manishearth
bors [Sun, 4 Dec 2022 02:56:45 +0000 (02:56 +0000)]
Auto merge of #104757 - camelid:consolidate-lints, r=GuillaumeGomez,jyn514,Manishearth

Consolidate rustdoc's lint passes into a single pass

This should improve performance and simplify the code.

r? `@GuillaumeGomez`

18 months agoAuto merge of #105217 - jyn514:submodule-fixes, r=bjorn3
bors [Sun, 4 Dec 2022 00:27:32 +0000 (00:27 +0000)]
Auto merge of #105217 - jyn514:submodule-fixes, r=bjorn3

Don't exit with an error if there are no changes to submodules

Fixes https://github.com/rust-lang/rust/issues/105215, which regressed in https://github.com/rust-lang/rust/pull/104865.

18 months agoAuto merge of #105218 - matthiaskrgr:rollup-8d3k08n, r=matthiaskrgr
bors [Sat, 3 Dec 2022 21:25:45 +0000 (21:25 +0000)]
Auto merge of #105218 - matthiaskrgr:rollup-8d3k08n, r=matthiaskrgr

Rollup of 9 pull requests

Successful merges:

 - #104199 (Keep track of the start of the argument block of a closure)
 - #105050 (Remove useless borrows and derefs)
 - #105153 (Create a hacky fail-fast mode that stops tests at the first failure)
 - #105164 (Restore `use` suggestion for `dyn` method call requiring `Sized`)
 - #105193 (Disable coverage instrumentation for naked functions)
 - #105200 (Remove useless filter in unused extern crate check.)
 - #105201 (Do not call fn_sig on non-functions.)
 - #105208 (Add AmbiguityError for inconsistent resolution for an import)
 - #105214 (update Miri)

Failed merges:

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

18 months agoAuto merge of #105212 - pietroalbini:pa-macos-xl, r=jyn514
bors [Sat, 3 Dec 2022 18:11:40 +0000 (18:11 +0000)]
Auto merge of #105212 - pietroalbini:pa-macos-xl, r=jyn514

Switch to the `macos-12-xl` builder

This PR switches us to the `macos-12-xl` builders, a more powerful builder pool managed by GitHub for us.

18 months agoRollup merge of #105214 - RalfJung:miri, r=RalfJung
Matthias Krüger [Sat, 3 Dec 2022 16:37:46 +0000 (17:37 +0100)]
Rollup merge of #105214 - RalfJung:miri, r=RalfJung

update Miri

r? `@ghost`

18 months agoRollup merge of #105208 - chenyukang:yukang/fix-105069, r=cjgillot
Matthias Krüger [Sat, 3 Dec 2022 16:37:45 +0000 (17:37 +0100)]
Rollup merge of #105208 - chenyukang:yukang/fix-105069, r=cjgillot

Add AmbiguityError for inconsistent resolution for an import

Fixes #105069
Fixes #83950

18 months agoRollup merge of #105201 - cjgillot:issue-105040, r=compiler-errors
Matthias Krüger [Sat, 3 Dec 2022 16:37:45 +0000 (17:37 +0100)]
Rollup merge of #105201 - cjgillot:issue-105040, r=compiler-errors

Do not call fn_sig on non-functions.

Fixes https://github.com/rust-lang/rust/issues/105040
Fixes https://github.com/rust-lang/rust/issues/89271

18 months agoRollup merge of #105200 - cjgillot:issue-104562, r=compiler-errors
Matthias Krüger [Sat, 3 Dec 2022 16:37:44 +0000 (17:37 +0100)]
Rollup merge of #105200 - cjgillot:issue-104562, r=compiler-errors

Remove useless filter in unused extern crate check.

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

18 months agoRollup merge of #105193 - tmiasko:naked-nocoverage, r=wesleywiser
Matthias Krüger [Sat, 3 Dec 2022 16:37:44 +0000 (17:37 +0100)]
Rollup merge of #105193 - tmiasko:naked-nocoverage, r=wesleywiser

Disable coverage instrumentation for naked functions

Fixes #105170.

18 months agoRollup merge of #105164 - compiler-errors:revert-import-filter, r=estebank
Matthias Krüger [Sat, 3 Dec 2022 16:37:43 +0000 (17:37 +0100)]
Rollup merge of #105164 - compiler-errors:revert-import-filter, r=estebank

Restore `use` suggestion for `dyn` method call requiring `Sized`

Add the suggestion back that I accidentally removed in 88f2140d8736329610a4c0bd8000e164c9170537 because I didn't understand that suggestion was actually useful...

Fixes #105159

18 months agoRollup merge of #105153 - oli-obk:fail_faster, r=compiler-errors
Matthias Krüger [Sat, 3 Dec 2022 16:37:42 +0000 (17:37 +0100)]
Rollup merge of #105153 - oli-obk:fail_faster, r=compiler-errors

Create a hacky fail-fast mode that stops tests at the first failure

This is useful for not having to wait until all 10k+ ui tests have finished running and then having to crawl through hundreds of failure reports.

You now only get the first report when you turn on that env var and no new tests are run at all

This works like a charm, but is obviously welded on very crudely

18 months agoRollup merge of #105050 - WaffleLapkin:uselessrefign, r=jyn514
Matthias Krüger [Sat, 3 Dec 2022 16:37:42 +0000 (17:37 +0100)]
Rollup merge of #105050 - WaffleLapkin:uselessrefign, r=jyn514

Remove useless borrows and derefs

They are nothing more than noise.
<sub>These are not all of them, but my clippy started crashing (stack overflow), so rip :(</sub>

18 months agoRollup merge of #104199 - SarthakSingh31:issue-97417-1, r=cjgillot
Matthias Krüger [Sat, 3 Dec 2022 16:37:41 +0000 (17:37 +0100)]
Rollup merge of #104199 - SarthakSingh31:issue-97417-1, r=cjgillot

Keep track of the start of the argument block of a closure

This removes a call to `tcx.sess.source_map()` from [compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs](https://github.com/rust-lang/rust/compare/master...SarthakSingh31:issue-97417-1?expand=1#diff-8406bbc0d0b43d84c91b1933305df896ecdba0d1f9269e6744f13d87a2ab268a) as required by #97417.

VsCode automatically applied `rustfmt` to the files I edited under `src/tools`. I can undo that if its a problem.

r? `@cjgillot`

18 months agoDon't exit with an error if there are no changes to submodules
Joshua Nelson [Sat, 3 Dec 2022 16:33:15 +0000 (10:33 -0600)]
Don't exit with an error if there are no changes to submodules

18 months agoupdate lockfile
Ralf Jung [Sat, 3 Dec 2022 15:30:56 +0000 (16:30 +0100)]
update lockfile

18 months agoAuto merge of #97485 - bjorn3:new_archive_writer, r=wesleywiser
bors [Sat, 3 Dec 2022 15:07:39 +0000 (15:07 +0000)]
Auto merge of #97485 - bjorn3:new_archive_writer, r=wesleywiser

Rewrite LLVM's archive writer in Rust

This allows it to be used by other codegen backends.

Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/1155

18 months agoswitch to the macos-12-xl builder
Pietro Albini [Sat, 3 Dec 2022 14:46:18 +0000 (15:46 +0100)]
switch to the macos-12-xl builder

18 months agofix #105069, Add AmbiguityError for inconsistent resolution for an import
yukang [Sat, 3 Dec 2022 13:18:37 +0000 (21:18 +0800)]
fix #105069, Add AmbiguityError for inconsistent resolution for an import

18 months agoMake sure all input archives are unmapped before persisting the output archive
bjorn3 [Sat, 3 Dec 2022 12:53:47 +0000 (12:53 +0000)]
Make sure all input archives are unmapped before persisting the output archive

18 months agoAuto merge of #2712 - RalfJung:rustup, r=RalfJung
bors [Sat, 3 Dec 2022 12:32:28 +0000 (12:32 +0000)]
Auto merge of #2712 - RalfJung:rustup, r=RalfJung

Rustup

18 months agoclippy
Ralf Jung [Sat, 3 Dec 2022 12:24:04 +0000 (13:24 +0100)]
clippy

18 months agoAuto merge of #105183 - GuillaumeGomez:merge-and-dedup-predicates, r=notriddle
bors [Sat, 3 Dec 2022 11:28:33 +0000 (11:28 +0000)]
Auto merge of #105183 - GuillaumeGomez:merge-and-dedup-predicates, r=notriddle

Merge generics and where predicates and prevent duplicates in where predicates

Part of #104886 (I didn't include bounds from parent trait yet as I think the PR is already big enough).

Also we'll need to run a perf check.

cc `@fmease` since you worked a bit on this.
r? `@notriddle`

18 months agoDo not call fn_sig on non-functions.
Camille GILLOT [Sat, 3 Dec 2022 09:32:29 +0000 (09:32 +0000)]
Do not call fn_sig on non-functions.

18 months agoRemove useless filter in unused extern crate check.
Camille GILLOT [Sat, 3 Dec 2022 09:23:03 +0000 (09:23 +0000)]
Remove useless filter in unused extern crate check.

18 months agoAuto merge of #105133 - oli-obk:promoted_def_ids, r=cjgillot
bors [Sat, 3 Dec 2022 08:17:46 +0000 (08:17 +0000)]
Auto merge of #105133 - oli-obk:promoted_def_ids, r=cjgillot

Ensure query backtraces work for `DefId`s created after ast lowering

r? `@cjgillot`

18 months agoAuto merge of #105196 - JohnTitor:rollup-8rxqnq6, r=JohnTitor
bors [Sat, 3 Dec 2022 05:24:35 +0000 (05:24 +0000)]
Auto merge of #105196 - JohnTitor:rollup-8rxqnq6, r=JohnTitor

Rollup of 7 pull requests

Successful merges:

 - #104903 (Use ocx.normalize in report_projection_error)
 - #105032 (improve doc of into_boxed_slice and impl From<Vec<T>> for Box<[T]>)
 - #105100 (Add missing intra-doc link)
 - #105181 (Don't add a note for implementing a trait if its inner type is erroneous)
 - #105182 (Rustdoc-Json: Don't inline foreign traits)
 - #105188 (Don't elide type information when printing E0308 with `-Zverbose`)
 - #105189 (rustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`)

Failed merges:

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

18 months agoRollup merge of #105189 - notriddle:notriddle/rustdoc-toggle-hideme, r=GuillaumeGomez
Yuki Okushi [Sat, 3 Dec 2022 03:51:30 +0000 (12:51 +0900)]
Rollup merge of #105189 - notriddle:notriddle/rustdoc-toggle-hideme, r=GuillaumeGomez

rustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`

18 months agoRollup merge of #105188 - compiler-errors:verbose-ty-err, r=TaKO8Ki
Yuki Okushi [Sat, 3 Dec 2022 03:51:30 +0000 (12:51 +0900)]
Rollup merge of #105188 - compiler-errors:verbose-ty-err, r=TaKO8Ki

Don't elide type information when printing E0308 with `-Zverbose`

When we pass `-Zverbose`, we kinda expect for all `_` to be replaced with more descriptive information, for example --

```
   = note: expected fn pointer `fn(_, u32)`
                 found fn item `fn(_, i32) {foo}`
```

Where `_` is the "identical" part of the fn signatures, now gets rendered as:

```
   = note: expected fn pointer `fn(i32, u32)`
                 found fn item `fn(i32, i32) {foo}`
```

18 months agoRollup merge of #105182 - aDotInTheVoid:rdj-no-foreign-traits, r=Enselic,GuillaumeGomez
Yuki Okushi [Sat, 3 Dec 2022 03:51:29 +0000 (12:51 +0900)]
Rollup merge of #105182 - aDotInTheVoid:rdj-no-foreign-traits, r=Enselic,GuillaumeGomez

Rustdoc-Json: Don't inline foreign traits

It wasn't done correctly, and [we want to move towards only having local items in the index, and making foreign items easier to resolved](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Rustdoc.20JSON.3A.20Include.20All.20Foreign.20Items.3F)

Fixes #105025. This means #105015 is included to test this

Fixes #105022

r? `@GuillaumeGomez`

18 months agoRollup merge of #105181 - bhbs:skip-note, r=estebank
Yuki Okushi [Sat, 3 Dec 2022 03:51:29 +0000 (12:51 +0900)]
Rollup merge of #105181 - bhbs:skip-note, r=estebank

Don't add a note for implementing a trait if its inner type is erroneous

Fix #105138

18 months agoRollup merge of #105100 - jhpratt:fix-docs, r=JohnTitor
Yuki Okushi [Sat, 3 Dec 2022 03:51:28 +0000 (12:51 +0900)]
Rollup merge of #105100 - jhpratt:fix-docs, r=JohnTitor

Add missing intra-doc link

Trivial change. This makes the plain text into inline code and makes it a link.

`@rustbot` label +A-docs

18 months agoRollup merge of #105032 - HintringerFabian:improve_docs, r=JohnTitor
Yuki Okushi [Sat, 3 Dec 2022 03:51:27 +0000 (12:51 +0900)]
Rollup merge of #105032 - HintringerFabian:improve_docs, r=JohnTitor

improve doc of into_boxed_slice and impl From<Vec<T>> for Box<[T]>

Improves description of `into_boxed_slice`, and adds example to `impl From<Vec<T>> for Box<[T]>`.
Fixes #98908

18 months agoRollup merge of #104903 - spastorino:consolidate-normalize-in-report_projection_error...
Yuki Okushi [Sat, 3 Dec 2022 03:51:27 +0000 (12:51 +0900)]
Rollup merge of #104903 - spastorino:consolidate-normalize-in-report_projection_error, r=lcnr

Use ocx.normalize in report_projection_error

r? `@lcnr`

cc `@compiler-errors`

18 months agoAuto merge of #105073 - weihanglo:update-cargo, r=weihanglo
bors [Sat, 3 Dec 2022 02:12:48 +0000 (02:12 +0000)]
Auto merge of #105073 - weihanglo:update-cargo, r=weihanglo

Update cargo

9 commits in e027c4b5d25af2119b1956fac42863b9b3242744..f6e737b1e3386adb89333bf06a01f68a91ac5306
2022-11-25 19:44:46 +0000 to 2022-12-02 20:21:24 +0000
- Refactor generate_targets into separate module (https://github.com/rust-lang/cargo/pull/11445)
- Improve file found in multiple build targets warning (https://github.com/rust-lang/cargo/pull/11299)
- Error when precise without -p flag (https://github.com/rust-lang/cargo/pull/11349)
- Improve strategy for selecting targets to be scraped for examples (https://github.com/rust-lang/cargo/pull/11430)
- Aware of compression ratio for unpack size limit (https://github.com/rust-lang/cargo/pull/11337)
- Add test for rustdoc-map generation when using sparse registries (https://github.com/rust-lang/cargo/pull/11403)
- Add error message when `cargo fix` on an empty repo (https://github.com/rust-lang/cargo/pull/11400)
- Store the sparse+ prefix in the SourceId for sparse registries (https://github.com/rust-lang/cargo/pull/11387)
- Update documentation for -Zrustdoc-scrape-examples in the Cargo Book (https://github.com/rust-lang/cargo/pull/11425)

18 months agoUpdate cargo
Weihang Lo [Sat, 3 Dec 2022 01:10:54 +0000 (01:10 +0000)]
Update cargo

9 commits in e027c4b5d25af2119b1956fac42863b9b3242744..f6e737b1e3386adb89333bf06a01f68a91ac5306
2022-11-25 19:44:46 +0000 to 2022-12-02 20:21:24 +0000
- Refactor generate_targets into separate module (rust-lang/cargo#11445)
- Improve file found in multiple build targets warning (rust-lang/cargo#11299)
- Error when precise without -p flag (rust-lang/cargo#11349)
- Improve strategy for selecting targets to be scraped for examples (rust-lang/cargo#11430)
- Aware of compression ratio for unpack size limit (rust-lang/cargo#11337)
- Add test for rustdoc-map generation when using sparse registries (rust-lang/cargo#11403)
- Add error message when `cargo fix` on an empty repo (rust-lang/cargo#11400)
- Store the sparse+ prefix in the SourceId for sparse registries (rust-lang/cargo#11387)
- Update documentation for -Zrustdoc-scrape-examples in the Cargo Book (rust-lang/cargo#11425)

18 months agoDon't add a note for implementing a trait if its inner type is erroneous
bhbs [Sat, 3 Dec 2022 00:06:47 +0000 (09:06 +0900)]
Don't add a note for implementing a trait if its inner type is erroneous

18 months agoMark naked functions as never inline in codegen_fn_attrs
Tomasz Miąsko [Fri, 2 Dec 2022 00:00:00 +0000 (00:00 +0000)]
Mark naked functions as never inline in codegen_fn_attrs

Use code generation attributes to ensure that naked functions are never
inline, replacing separate checks in MIR inliner and LLVM code
generation.

18 months agoDisable coverage instrumentation for naked functions
Tomasz Miąsko [Fri, 2 Dec 2022 00:00:00 +0000 (00:00 +0000)]
Disable coverage instrumentation for naked functions

18 months agoAuto merge of #105187 - matthiaskrgr:rollup-nxyxpko, r=matthiaskrgr
bors [Fri, 2 Dec 2022 23:00:48 +0000 (23:00 +0000)]
Auto merge of #105187 - matthiaskrgr:rollup-nxyxpko, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #105026 (v8a as default aarch64 target)
 - #105033 (sparc-struct-abi: work around new tail-call optimization)
 - #105144 (Document normalization methods `At::{normalize,query_normalize}`)
 - #105155 (rustdoc: clean up help and settings button CSS)
 - #105162 (Properly synthesize `FnSig` value during cycle)
 - #105163 (Check lifetime param count in `collect_trait_impl_trait_tys`)
 - #105185 (Move `normalize_fn_sig` to `TypeErrCtxt`)

Failed merges:

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

18 months agorustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`
Michael Howell [Fri, 2 Dec 2022 21:39:06 +0000 (14:39 -0700)]
rustdoc: clean up redundant CSS on `.rustdoc-toggle.hideme`

18 months agoDon't elide information when printing E0308 with Zverbose
Michael Goulet [Fri, 2 Dec 2022 21:01:34 +0000 (21:01 +0000)]
Don't elide information when printing E0308 with Zverbose

18 months agoDefine values and err as non mutable
Santiago Pastorino [Wed, 30 Nov 2022 15:59:22 +0000 (12:59 -0300)]
Define values and err as non mutable

18 months agoUse ocx.normalize in report_projection_error
Santiago Pastorino [Fri, 25 Nov 2022 15:35:49 +0000 (12:35 -0300)]
Use ocx.normalize in report_projection_error

18 months agoRollup merge of #105185 - compiler-errors:normalize_fn_sig-in-err-ctxt, r=lcnr
Matthias Krüger [Fri, 2 Dec 2022 20:22:50 +0000 (21:22 +0100)]
Rollup merge of #105185 - compiler-errors:normalize_fn_sig-in-err-ctxt, r=lcnr

Move `normalize_fn_sig` to `TypeErrCtxt`

r? `@lcnr`

18 months agoRollup merge of #105163 - compiler-errors:afit-lt-arity, r=jackh726
Matthias Krüger [Fri, 2 Dec 2022 20:22:50 +0000 (21:22 +0100)]
Rollup merge of #105163 - compiler-errors:afit-lt-arity, r=jackh726

Check lifetime param count in `collect_trait_impl_trait_tys`

We checked the type and const generics count, but not the lifetimes, which were handled in a different function.

Fixes #105154

18 months agoRollup merge of #105162 - compiler-errors:fn-sig-arity, r=cjgillot
Matthias Krüger [Fri, 2 Dec 2022 20:22:49 +0000 (21:22 +0100)]
Rollup merge of #105162 - compiler-errors:fn-sig-arity, r=cjgillot

Properly synthesize `FnSig` value during cycle

Get the arity correct when creating a `FnSig` type during `tcx.fn_sig` cycle recovery

Fixes #105152

18 months agoRollup merge of #105155 - notriddle:notriddle/flexbox-help-settings-buttons, r=Guilla...
Matthias Krüger [Fri, 2 Dec 2022 20:22:49 +0000 (21:22 +0100)]
Rollup merge of #105155 - notriddle:notriddle/flexbox-help-settings-buttons, r=GuillaumeGomez

rustdoc: clean up help and settings button CSS

The old version of this code specified a bunch of different numbers that had to line up just right to get the size it wanted. This version uses flexbox centering, specifies the font size, and lets the browser figure out the rest of the layout automatically.

Preview: http://notriddle.com/notriddle-rustdoc-demos/flexbox-help-settings-buttons/test_dingus/

18 months agoRollup merge of #105144 - compiler-errors:normalization-doc, r=lcnr
Matthias Krüger [Fri, 2 Dec 2022 20:22:48 +0000 (21:22 +0100)]
Rollup merge of #105144 - compiler-errors:normalization-doc, r=lcnr

Document normalization methods `At::{normalize,query_normalize}`

r? ``@lcnr``

18 months agoRollup merge of #105033 - durin42:llvm-16-dont-tail-call-me-bro, r=tmandry
Matthias Krüger [Fri, 2 Dec 2022 20:22:47 +0000 (21:22 +0100)]
Rollup merge of #105033 - durin42:llvm-16-dont-tail-call-me-bro, r=tmandry

sparc-struct-abi: work around new tail-call optimization

Upstream LLVM change https://reviews.llvm.org/D138741 introduced some new tail-call smarts for SPARC which broke some of the checks in this test. Rather than adjust the test expectations, we add an extra no-args function that can get tail-called or not without hurting the needs of the test.

r? ``@nikic``

18 months agoRollup merge of #105026 - oToToT:aarch64-v8a, r=davidtwco
Matthias Krüger [Fri, 2 Dec 2022 20:22:47 +0000 (21:22 +0100)]
Rollup merge of #105026 - oToToT:aarch64-v8a, r=davidtwco

v8a as default aarch64 target

After https://github.com/llvm/llvm-project/commit/8689f5e landed, LLVM takes the intersection of v8a and v8r as default. This commit brings back v8a support by explicitly specifying v8a in the feature list.

This should solve #97724.

p.s. a bit more context can also be found in https://github.com/llvm/llvm-project/issues/57904#issuecomment-1329555590.

18 months agoAuto merge of #104999 - saethlin:immediate-abort-inlining, r=thomcc
bors [Fri, 2 Dec 2022 20:07:23 +0000 (20:07 +0000)]
Auto merge of #104999 - saethlin:immediate-abort-inlining, r=thomcc

Adjust inlining attributes around panic_immediate_abort

The goal of `panic_immediate_abort` is to permit the panic runtime and formatting code paths to be optimized away. But while poking through some disassembly of a small program compiled with that option, I found that was not the case. Enabling LTO did address that specific issue, but enabling LTO is a steep price to pay for this feature doing its job.

This PR fixes that, by tweaking two things:
* All the slice indexing functions that we `const_eval_select` on get `#[inline]`. `objdump -dC` told me that originally some `_ct` functions could end up in an executable. I won't pretend to understand what's going on there.
* Normalize attributes across all `panic!` wrappers: use `inline(never) + cold` normally, and `inline` when `panic_immediate_abort` is enabled.

But also, with LTO and `panic_immediate_abort` enabled, this patch knocks ~709 kB out of the `.text` segment of `librustc_driver.so`. That is slightly surprising to me, my best theory is that this shifts some inlining earlier in compilation, enabling some subsequent optimizations. The size improvement of `librustc_driver.so` with `panic_immediate_abort` due to this patch is greater with LTO than without LTO, which I suppose backs up this theory.

I do not know how to test this. I would quite like to, because I think what this is solving was an accidental regression. This only works with `-Zbuild-std` which is a cargo flag, and thus can't be used in a rustc codegen test.

r? `@thomcc`

---

I do not seriously think anyone is going to use a compiler built with `panic_immediate_abort`, but I wanted a big complicated Rust program to try this out on, and the compiler is such.

18 months agoMove normalize_fn_sig to TypeErrCtxt
Michael Goulet [Fri, 2 Dec 2022 19:09:40 +0000 (19:09 +0000)]
Move normalize_fn_sig to TypeErrCtxt

18 months agoUpdate existing rustdoc tests
Guillaume Gomez [Fri, 2 Dec 2022 18:37:04 +0000 (19:37 +0100)]
Update existing rustdoc tests

18 months agoAdd rustdoc test for bounds de-duplication and merge
Guillaume Gomez [Fri, 2 Dec 2022 18:36:57 +0000 (19:36 +0100)]
Add rustdoc test for bounds de-duplication and merge

18 months agoMerge generics and where predicates and prevent duplicates in where predicates
Guillaume Gomez [Fri, 2 Dec 2022 18:36:20 +0000 (19:36 +0100)]
Merge generics and where predicates and prevent duplicates in where predicates

18 months agoMerge from rustc
Ralf Jung [Fri, 2 Dec 2022 17:16:08 +0000 (18:16 +0100)]
Merge from rustc

18 months agoPreparing for merge from rustc
Ralf Jung [Fri, 2 Dec 2022 17:14:53 +0000 (18:14 +0100)]
Preparing for merge from rustc

18 months agoAdd test for #105022
Nixon Enraght-Moony [Fri, 2 Dec 2022 17:05:37 +0000 (17:05 +0000)]
Add test for #105022

18 months agoAdd test for #105025
Nixon Enraght-Moony [Fri, 2 Dec 2022 17:03:35 +0000 (17:03 +0000)]
Add test for #105025

18 months agoRustdoc-Json: Don't include foreign traits
Nixon Enraght-Moony [Fri, 2 Dec 2022 16:58:10 +0000 (16:58 +0000)]
Rustdoc-Json: Don't include foreign traits

18 months agojsondoclint: Check `links` field
Nixon Enraght-Moony [Mon, 28 Nov 2022 14:41:07 +0000 (14:41 +0000)]
jsondoclint: Check `links` field

18 months agoUse zero based indexing for pass_count
Oli Scherer [Fri, 2 Dec 2022 15:55:02 +0000 (15:55 +0000)]
Use zero based indexing for pass_count

18 months agoRemove an impl and replace its only use with a method call
Oli Scherer [Fri, 2 Dec 2022 15:43:08 +0000 (15:43 +0000)]
Remove an impl and replace its only use with a method call

18 months agoAuto merge of #2710 - RalfJung:ptr-tracking-ice, r=oli-obk
bors [Fri, 2 Dec 2022 15:36:49 +0000 (15:36 +0000)]
Auto merge of #2710 - RalfJung:ptr-tracking-ice, r=oli-obk

fix ICE in pointer tracking

Fixes https://github.com/rust-lang/miri/issues/2709

18 months agoAuto merge of #104863 - nnethercote:reduce-lint-macros, r=cjgillot
bors [Fri, 2 Dec 2022 15:31:15 +0000 (15:31 +0000)]
Auto merge of #104863 - nnethercote:reduce-lint-macros, r=cjgillot

Reduce macro usage for lints

r? `@cjgillot`

18 months agoAuto merge of #2711 - RalfJung:btrack, r=RalfJung
bors [Fri, 2 Dec 2022 13:48:14 +0000 (13:48 +0000)]
Auto merge of #2711 - RalfJung:btrack, r=RalfJung

slight simplifications for borrow tracking

and some renaming for consistency

18 months agofix ICE in pointer tracking
Ralf Jung [Fri, 2 Dec 2022 13:31:56 +0000 (14:31 +0100)]
fix ICE in pointer tracking

18 months agorename some more types for consistency
Ralf Jung [Fri, 2 Dec 2022 13:44:41 +0000 (14:44 +0100)]
rename some more types for consistency

18 months agoslight simplifications for borrow tracking
Ralf Jung [Fri, 2 Dec 2022 13:43:05 +0000 (14:43 +0100)]
slight simplifications for borrow tracking

18 months agoAuto merge of #2708 - RalfJung:verbose-setup, r=RalfJung
bors [Fri, 2 Dec 2022 13:19:27 +0000 (13:19 +0000)]
Auto merge of #2708 - RalfJung:verbose-setup, r=RalfJung

forward verbosity to cargo setup

18 months agoWrite to temp file before renaming to the final name
bjorn3 [Fri, 2 Dec 2022 13:05:10 +0000 (13:05 +0000)]
Write to temp file before renaming to the final name

18 months agoforward verbosity to cargo setup
Ralf Jung [Fri, 2 Dec 2022 12:56:42 +0000 (13:56 +0100)]
forward verbosity to cargo setup

18 months agoAuto merge of #2697 - Vanille-N:borrow-tracking, r=RalfJung
bors [Fri, 2 Dec 2022 12:50:27 +0000 (12:50 +0000)]
Auto merge of #2697 - Vanille-N:borrow-tracking, r=RalfJung

Reorganizing `stacked_borrows` in anticipation of a different model

These commits reorganize all the code inside the former `stacked_borrows` module and extract the part that really is specific to Stacked Borrows inside the `borrow_tracker/stacked_borrows` submodule.
Everything not specific to SB is put in `borrow_tracker/mod.rs`.
This is so that the future Tree Borrows model can be later added as a second submodule and reuse all the contents of `borrow_tracker/mod.rs`.

This reorganization is accompanied by renamings, mostly from "stacked borrows" to "borrow tracking".

18 months agofix imports
Vanille-N [Fri, 2 Dec 2022 12:30:06 +0000 (13:30 +0100)]
fix imports

18 months agoother renames, introduction of BorrowTrackerMethod and AllocExtra
Vanille-N [Fri, 2 Dec 2022 12:29:48 +0000 (13:29 +0100)]
other renames, introduction of BorrowTrackerMethod and AllocExtra

18 months agoSbTag -> BorTag everywhere
Vanille-N [Fri, 2 Dec 2022 12:27:41 +0000 (13:27 +0100)]
SbTag -> BorTag everywhere

18 months agomove stacked_borrows to borrow_tracker/stacked_borrows
Vanille-N [Fri, 2 Dec 2022 12:23:57 +0000 (13:23 +0100)]
move stacked_borrows to borrow_tracker/stacked_borrows

18 months agoextract common borrow tracking logic
Vanille-N [Fri, 2 Dec 2022 12:23:37 +0000 (13:23 +0100)]
extract common borrow tracking logic

18 months agoAuto merge of #105166 - matthiaskrgr:rollup-s9l6vt2, r=matthiaskrgr
bors [Fri, 2 Dec 2022 12:03:59 +0000 (12:03 +0000)]
Auto merge of #105166 - matthiaskrgr:rollup-s9l6vt2, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #104614 (Add `type_ascribe!` macro as placeholder syntax for type ascription)
 - #105126 (Make `VecDeque::new_in` unstably const)
 - #105132 (Migrate summary toggle filter to CSS variable)
 - #105136 (clarify comment on Deref promotion)
 - #105137 (Add tracking issue number for `file_create_new` feature)
 - #105143 (rustdoc: use simpler CSS for setting the font on scraped examples)

Failed merges:

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

18 months agoRollup merge of #105143 - notriddle:notriddle/scraped-example-list-font, r=GuillaumeGomez
Matthias Krüger [Fri, 2 Dec 2022 07:28:12 +0000 (08:28 +0100)]
Rollup merge of #105143 - notriddle:notriddle/scraped-example-list-font, r=GuillaumeGomez

rustdoc: use simpler CSS for setting the font on scraped examples

18 months agoRollup merge of #105137 - yjhn:patch-1, r=Dylan-DPC
Matthias Krüger [Fri, 2 Dec 2022 07:28:11 +0000 (08:28 +0100)]
Rollup merge of #105137 - yjhn:patch-1, r=Dylan-DPC

Add tracking issue number for `file_create_new` feature

It was missing a tracking issue, so I opened one (#105135).

18 months agoRollup merge of #105136 - RalfJung:deref-promotion-comment, r=oli-obk
Matthias Krüger [Fri, 2 Dec 2022 07:28:10 +0000 (08:28 +0100)]
Rollup merge of #105136 - RalfJung:deref-promotion-comment, r=oli-obk

clarify comment on Deref promotion

r? `@oli-obk`

18 months agoRollup merge of #105132 - GuillaumeGomez:migrate-summary-toggle-to-var, r=notriddle
Matthias Krüger [Fri, 2 Dec 2022 07:28:09 +0000 (08:28 +0100)]
Rollup merge of #105132 - GuillaumeGomez:migrate-summary-toggle-to-var, r=notriddle

Migrate summary toggle filter to CSS variable

r? `@notriddle`

18 months agoRollup merge of #105126 - Sp00ph:const_new_in, r=dtolnay
Matthias Krüger [Fri, 2 Dec 2022 07:28:09 +0000 (08:28 +0100)]
Rollup merge of #105126 - Sp00ph:const_new_in, r=dtolnay

Make `VecDeque::new_in` unstably const

(See #105072)

18 months agoRollup merge of #104614 - Nilstrieb:type-ascribe!, r=TaKO8Ki
Matthias Krüger [Fri, 2 Dec 2022 07:28:08 +0000 (08:28 +0100)]
Rollup merge of #104614 - Nilstrieb:type-ascribe!, r=TaKO8Ki

Add `type_ascribe!` macro as placeholder syntax for type ascription

This makes it still possible to test the internal semantics of type ascription even once the `:`-syntax is removed from the parser. The macro now gets used in a bunch of UI tests that test the semantics and not syntax of type ascription.

I might have forgotten a few tests but this should hopefully be most of them. The remaining ones will certainly be found once type ascription is removed from the parser altogether.

Part of #101728

18 months agoRevert 88f2140
Michael Goulet [Fri, 2 Dec 2022 04:53:36 +0000 (23:53 -0500)]
Revert 88f2140

18 months agoProperly synthesize fn sig value during cycle
Michael Goulet [Fri, 2 Dec 2022 04:01:59 +0000 (23:01 -0500)]
Properly synthesize fn sig value during cycle

18 months agoAuto merge of #104963 - petrochenkov:noaddids2, r=cjgillot
bors [Fri, 2 Dec 2022 04:24:57 +0000 (04:24 +0000)]
Auto merge of #104963 - petrochenkov:noaddids2, r=cjgillot

rustc_ast_lowering: Stop lowering imports into multiple items

Lower them into a single item with multiple resolutions instead.
This also allows to remove additional `NodId`s and `DefId`s related to those additional items.

18 months agoInline and remove `early_lint_node`.
Nicholas Nethercote [Thu, 1 Dec 2022 02:31:48 +0000 (13:31 +1100)]
Inline and remove `early_lint_node`.

It has a single call site.

18 months agoMerge `builtins` into `EarlyLintPassObjects`.
Nicholas Nethercote [Thu, 1 Dec 2022 02:22:08 +0000 (13:22 +1100)]
Merge `builtins` into `EarlyLintPassObjects`.

This avoids calling `early_lint_node` twice.

Note: one `early_lint_node` call had `!pre_expansion` for the second
argument and the other had `false`. The new single call just has
`!pre_expansion`. This results in a reduction of duplicate error
messages in some `ui-fulldeps` tests. The order of some `ui-fulldeps`
output also changes, but that doesn't matter.

18 months agoCheck lifetime param count in collect_trait_impl_trait_tys
Michael Goulet [Fri, 2 Dec 2022 04:00:15 +0000 (04:00 +0000)]
Check lifetime param count in collect_trait_impl_trait_tys

18 months agoRemove some unnecessary `Send` bounds.
Nicholas Nethercote [Thu, 1 Dec 2022 04:42:31 +0000 (15:42 +1100)]
Remove some unnecessary `Send` bounds.

Required to get the parallel compiler building again.

18 months agoInline and remove `late_lint_pass_crate`.
Nicholas Nethercote [Thu, 1 Dec 2022 01:23:16 +0000 (12:23 +1100)]
Inline and remove `late_lint_pass_crate`.

It has a single call site.

18 months agoInline and remove `late_lint_mod_pass`.
Nicholas Nethercote [Thu, 1 Dec 2022 01:18:02 +0000 (12:18 +1100)]
Inline and remove `late_lint_mod_pass`.

It has a single call site.

18 months agoMerge `builtins` into `LateLintPassObjects`.
Nicholas Nethercote [Thu, 1 Dec 2022 01:10:23 +0000 (12:10 +1100)]
Merge `builtins` into `LateLintPassObjects`.

This avoids calling the `late_lint_{mod_pass,pass_crate}` twice.

18 months agoRemove six macros relating to lint definitions.
Nicholas Nethercote [Fri, 25 Nov 2022 04:01:29 +0000 (15:01 +1100)]
Remove six macros relating to lint definitions.

These were enabled by the removal of `-Zno-interleave-lints`.

18 months agoRemove `-Zno-interleave-lints`.
Nicholas Nethercote [Fri, 25 Nov 2022 03:42:43 +0000 (14:42 +1100)]
Remove `-Zno-interleave-lints`.

Because it complicates lint implementation greatly.

18 months agoEliminate four unnecessary lint macros.
Nicholas Nethercote [Fri, 25 Nov 2022 02:42:01 +0000 (13:42 +1100)]
Eliminate four unnecessary lint macros.

The lint definitions use macros heavily. This commit merges some of them
that are split unnecessarily. I find the reduced indirection makes it
easier to imagine what the generated code will look like.